News for hackers. Stuff that matters.
Re:Firefox 70 by pmontra on Tuesday October 22, 2019 @02:11PM (#21326862)
YouTube music video running in another tab. Should it stop render the video and keep playing the audio? Maybe feasible but it should keep receiving both the video and audio data. Stop all of it? Not what I wish to happen.
Re:Firefox 70 by GrayShade on Tuesday October 22, 2019 @04:12PM (#21328064)
Firefox does stop rendering videos in background tabs (or used to, at least). You can see it take a couple of frames to restart.
Re:Firefox 70 by dwaite on Tuesday October 22, 2019 @03:00PM (#21327331)
The javascript engine and rendering engines are what are generally affected by being backgrounded. So yes, generally the media library will continue receiving the combined video/audio stream and not bother rendering the video frames
Re:Firefox 70 by roca on Tuesday October 22, 2019 @08:50PM (#21330012)
Youtube uses the Media Source Extensions API, which means that JS is responsible for fetching compressed video data and feeding it into the decoder, so it can implement adaptive streaming. Pause JS for more than a few seconds and the video will stop playing.
Re:Firefox 70 by dwaite on Wednesday October 23, 2019 @05:29AM (#21332826)
Yes, and this is likely why Youtube now periodically pauses in the background on current macOS/Safari.
Re:Firefox 70 by ripdog on Tuesday October 22, 2019 @11:45PM (#21330867)
My understanding is that most video websites like Youtube use Media Source Extensions, a standard which allows javascript to download and assemble video streams in non-standard ways. This work is done by page JS and passed to the browser to decode and render. AFAIK youtube uses this to implement DASH streaming.

Presumably there is no easy way to disable page JS but keep your youtube video downloading.

Re:Firefox 70 by tass on Tuesday October 22, 2019 @07:25PM (#21329506)
Does HTML video need to catch up based on the most recent keyframe?

If they don't render while backgrounded, how do they do that without being noticeable?

Re:Firefox 70 by vrodic on Tuesday October 22, 2019 @10:48PM (#21330596)
Chrome does this for a long time now and I don't consider it an issue. You see a frozen version of the last decoded keyframe until the next one is decoded. Elegant solution IMO.
Re:Firefox 70 by tass on Tuesday October 22, 2019 @11:24PM (#21330762)
That makes sense, it seems I haven’t looked closely enough to notice.

I couldn’t find info on how often a keyframe is expected from YouTube, but I’m recalling the bad old divx days where you sometimes had a frame per scene and skipping was very slow.

Re:Firefox 70 by baby on Tuesday October 22, 2019 @06:33PM (#21329132)
What about a timer running in a different tab?