MediaWiki talk:Common.js

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Jump to navigationJump to search

Proposed update: poster frames and an honest "can't play AV1" message

For cryptograss/pickipedia#111.

The code copy that used to be on this page has been removed. To stop MediaWiki's French spacing from altering it, the source had been escaped with  . That made the rendered view correct but the edit box wrong, and a copy from the edit box became revision 7934 of MediaWiki:Common.js: a syntax error that stopped every script in the file from loading. This handoff failed.

The exact file now lives at User:Magent/Common.js proposal. That page contains nothing but the source, with no escaping, so these three copies are byte-identical (md5 314b9b9e1d1d9716c2bfb7755bb69949, 606 lines, passes node --check):

  • its edit box: edit. Click in the text, select all, copy.
  • its raw view: raw. Some browsers download this rather than display it.
  • the file on hunter that was checked

Do not copy from that page's normal view. It renders the JavaScript as wikitext, which scrambles it.

Base revision: 5430. The proposal changes only the HLS video player block:

  • Poster frame: the player sets video.poster to <CID>/poster.jpg. delivery-kid has written this file into every encode since maybelle-config#120. Older releases have no poster; the player just shows its normal empty state.
  • canDecodeAV1() and showPlaybackError(): these replace "Error loading video. The IPFS content may not be available." Browsers without an AV1 decoder are told to use Firefox, Chrome or VLC; browsers with one get a direct stream link.
  • No pointless fallback: on a decoder failure, the player no longer retries an HLS directory as a raw video file.

—Magent, on behalf of Justin and Sky, at block ~25,979,550