<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://interfaces3.hunter.cryptograss.live/index.php?action=history&amp;feed=atom&amp;title=Cryptograss%3AVideo_player_decisions</id>
	<title>Cryptograss:Video player decisions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://interfaces3.hunter.cryptograss.live/index.php?action=history&amp;feed=atom&amp;title=Cryptograss%3AVideo_player_decisions"/>
	<link rel="alternate" type="text/html" href="https://interfaces3.hunter.cryptograss.live/index.php?title=Cryptograss:Video_player_decisions&amp;action=history"/>
	<updated>2026-11-15T08:04:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://interfaces3.hunter.cryptograss.live/index.php?title=Cryptograss:Video_player_decisions&amp;diff=8803&amp;oldid=prev</id>
		<title>Magent: Two decisions about the video player: the quality selector, and moving it out of MediaWiki:Common.js</title>
		<link rel="alternate" type="text/html" href="https://interfaces3.hunter.cryptograss.live/index.php?title=Cryptograss:Video_player_decisions&amp;diff=8803&amp;oldid=prev"/>
		<updated>2026-09-18T16:13:00Z</updated>

		<summary type="html">&lt;p&gt;Two decisions about the video player: the quality selector, and moving it out of MediaWiki:Common.js&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Two decisions about the video player&amp;#039;&amp;#039;&amp;#039;, written for Justin, September 2026. Sky asked for them in one place rather than scattered across [https://github.com/cryptograss/pickipedia/issues/111 pickipedia#111].&lt;br /&gt;
&lt;br /&gt;
Nothing here is urgent and nothing is half-finished: the selector is built and tested, and the structural change is optional. Both are waiting on a call, not on work.&lt;br /&gt;
&lt;br /&gt;
== Decision 1: ship the quality selector? ==&lt;br /&gt;
&lt;br /&gt;
Every video now publishes as four streams — 1080p, 720p, 360p and audio-only — but &amp;#039;&amp;#039;&amp;#039;nobody can choose between them&amp;#039;&amp;#039;&amp;#039;. The player picks by bandwidth. That means the audio-only stream, the one added for campground connections, cannot be reached deliberately.&lt;br /&gt;
&lt;br /&gt;
The selector is a row of buttons under the player: &amp;lt;code&amp;gt;Auto | 1080p | 720p | 360p | Audio only&amp;lt;/code&amp;gt;. The choice is remembered per viewer, so picking &amp;quot;Audio only&amp;quot; on a tether holds for the evening rather than for one video. Renditions are named by the short side of the picture, so an upright phone video reads 1080p, not 1920p.&lt;br /&gt;
&lt;br /&gt;
Tested in a headless browser against a real published release:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buttons      : Auto | 1080p | 720p | 360p | Audio only&lt;br /&gt;
default      : Auto&lt;br /&gt;
after 360p   : 360p   playing at t=7.5     (switch mid-playback, no reload)&lt;br /&gt;
after audio  : Audio only   stored=Audio only&lt;br /&gt;
after reload : Audio only                  (remembered)&lt;br /&gt;
page errors  : none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Video quality selector test.png|thumb|none|400px|The selector, playing [[Release:QmSAeiTZ2gMUYPfF9p8kj5ApuKohSgEru3RzRBBc82o8xS|Some band practice... in a field somewhere]] with Audio only selected.]]&lt;br /&gt;
&lt;br /&gt;
=== The catch ===&lt;br /&gt;
&lt;br /&gt;
To make the buttons work in Chrome, &amp;#039;&amp;#039;&amp;#039;the player has to change which engine it uses&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The code asks the browser &amp;quot;can you play HLS?&amp;quot; and uses the browser&amp;#039;s own player if it says yes. That was written on the assumption that only Safari says yes. &amp;#039;&amp;#039;&amp;#039;Chrome answers &amp;quot;maybe&amp;quot; as well&amp;#039;&amp;#039;&amp;#039; — confirmed in a headless Chromium, which both claims support and plays these streams. So Chrome has been using its built-in player all along, and that path hides the list of renditions from the page: no selector is possible, and playback errors can only be guessed at.&lt;br /&gt;
&lt;br /&gt;
The fix is to prefer hls.js (the library already loaded) wherever it works, and fall back to the browser&amp;#039;s own player otherwise, which still covers iOS Safari. Through hls.js the page can see the ladder, offer the choice, and tell a decoder failure apart from a missing file.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;This changes how every viewer plays video&amp;#039;&amp;#039;&amp;#039;, not only the new buttons. That is the part worth a deliberate yes.&lt;br /&gt;
&lt;br /&gt;
; If yes&lt;br /&gt;
: One paste, and the buttons appear. Playback moves to hls.js for Chrome and Firefox; Safari on iOS is unaffected.&lt;br /&gt;
; If no&lt;br /&gt;
: The selector can be limited to browsers already using hls.js — but that is mostly Firefox, so most viewers would never see it, and the audio-only stream stays unreachable for them.&lt;br /&gt;
&lt;br /&gt;
The file is ready at [[User:Magent/Common.js proposal]] — 742 lines, md5 &amp;lt;code&amp;gt;6b8f497226ac633c9efee1886b1fd58a&amp;lt;/code&amp;gt;, passing a syntax check, and byte-identical to the copy that was tested.&lt;br /&gt;
&lt;br /&gt;
== Decision 2: move the player out of MediaWiki:Common.js? ==&lt;br /&gt;
&lt;br /&gt;
This one is about how the code gets deployed, not what it does.&lt;br /&gt;
&lt;br /&gt;
The video player lives in [[MediaWiki:Common.js]] — &amp;#039;&amp;#039;&amp;#039;a wiki page, not a file in the repository&amp;#039;&amp;#039;&amp;#039;. Every change means a person copying several hundred lines into a text box. That has three consequences:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;No review, no tests, no CI.&amp;#039;&amp;#039;&amp;#039; A change is live for every visitor the moment it is saved.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;It has already broken.&amp;#039;&amp;#039;&amp;#039; On 15 September the site&amp;#039;s JavaScript was down for 23 minutes — every video player, the block-height widgets, the forms — because the copy was taken from a view that escaped some characters. The fault was in the handoff, not the code.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;No history alongside the code it belongs to.&amp;#039;&amp;#039;&amp;#039; Page history exists, but it sits apart from the repo, the PRs and the deploys.&lt;br /&gt;
&lt;br /&gt;
The alternative is to move the player into the &amp;#039;&amp;#039;&amp;#039;PickiPediaReleases extension&amp;#039;&amp;#039;&amp;#039;, where it becomes an ordinary file in the pickipedia repo, loaded as a ResourceLoader module. Then it ships the way everything else does: a PR, CI, Jenkins. The quality selector would simply be a PR on top.&lt;br /&gt;
&lt;br /&gt;
; Cost&lt;br /&gt;
: Roughly half a day. Move the player code, register the module, delete the copy from Common.js.&lt;br /&gt;
; Risk&lt;br /&gt;
: It changes how every page loads its player, so it wants a real browser check on a Release page, a jam page and a draft page before it counts as done. Unlike a paste, all of that is testable in advance.&lt;br /&gt;
; If not done&lt;br /&gt;
: Everything keeps working. It just means every future player change is another hand-paste, with the same failure mode available each time.&lt;br /&gt;
&lt;br /&gt;
== Recommendation ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Yes to both, in the order 2 then 1.&amp;#039;&amp;#039;&amp;#039; Do the move first and the selector arrives as a reviewable PR, making the September 15 paste the last one. If only one is wanted, take the selector — the ladder is half-delivered without it.&lt;br /&gt;
&lt;br /&gt;
If the answer is &amp;quot;not now&amp;quot;, nothing is lost. The selector sits on its wiki page, and the player keeps working exactly as it does today.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/cryptograss/pickipedia/issues/111 pickipedia#111] — the issue this came from, with the test output&lt;br /&gt;
* [[Cryptograss:Video encoding pipeline]] — what the four streams are and why AV1&lt;br /&gt;
* [[User:Magent/Common.js proposal]] — the file itself&lt;/div&gt;</summary>
		<author><name>Magent</name></author>
	</entry>
</feed>