5 ms·
Out of interest: why is a JS player required for video? Is it just to make more browsers compatible, the video more hackable for annotations/ads, or is there so
by vim_wannabe 9y ago
Out of interest: why is a JS player required for video? Is it just to make more browsers compatible, the video more hackable for annotations/ads, or is there something else?
Edit: And a related question: would Cloudflare Stream work without the JS player using a regular video-tag?
- toomuchtodo 9y agoBoth.
- jameslk 9y agoMore reliable & easier to use API, extendable support for other codecs/streams, customizable UI, customizable playback, plugin ecosystem, tracking
- shakkhar 9y ago> Edit: And a related question: would Cloudflare Stream work without the JS player using a regular video-tag? Depends on the browser. This is the primary reason why people actually use a JS player that wraps around video tag. The other reasons are to accommodate business logic (i. e. overlay on top of the video, pre-roll, thumbnail, etc.) and better UX.
- vim_wannabe 9y agoThe latter reason I get, but looking at video-tag compatibility on https://caniuse.com/#feat=video https://caniuse.com/#feat=video shouldn't just offering h264 as the baseline and the higher resolution formats in source-tags (https://caniuse.com/#search=source https://caniuse.com/#search=source) cover almost any browser?
- shakkhar 9y agoYes but that is just the baseline. You want HEVC / VP9 for browsers which can play that, you want 5.1 audio for home theaters, you want adaptive streaming when the support is available, and so on. You don't want just the minimum for _all_ of your clients. You want some code that tailors the experience based on client capability. That's what the JS player handles.
- vim_wannabe 9y agoAdaptive streaming sure, but can you not handle the different audio combinations using source-tags? And HEVC/VP9 with h264 fallback I would imagine is the primary use case they (WHATWG?) were thinking of supporting when creating the source tag.
- prebrov 9y agoTechnically you could have a single URL that returns any manifest based on user-agent or whatever player info is available in the GET request. But yeah, JS players make life a whole lot easier by providing a single API for customisation, handling media source extensions and a bunch of other stuff.
- dzhiurgis 9y agoI do not like the player in post - it stops me using Safari's PiP feature.
- madeofpalk 9y agoHow does it? THere's nothing specifically incompatible between PiP and post-video overlay.
- dzhiurgis 9y agoOk. Turns out there's a button for that. Usually (i.e. in youtube) I right click twice and get option to pip it.
- cramforce 9y agoIt is required for adaptive bitrate streaming in browsers that do not support HLS (all browsers except Safari and Chrome on Android only).