NEW 210058
[Safari]When video is hidden, after entering and exiting fullscreen at the end of the playback the video doesn't replay to start
https://bugs.webkit.org/show_bug.cgi?id=210058
Summary [Safari]When video is hidden, after entering and exiting fullscreen at the en...
Roy Bregman
Reported 2020-04-06 11:00:11 PDT
I attached an example to reproduce. This bug happens in Safari (tested in MAC) * Video should be hidden (display: none) * Play the video (HLS) * Enter full screen * Exit full screen * Seek to end of playback * When playing the video the video is expected to start over from currentTime 0. Instead the playback plays the last second of the playback. This is the example (Try few times as this doesn't reproduce 100% of the attempts): <!DOCTYPE html> <html lang="en"> <head> <script> setInterval(()=>{document.getElementById("currTime").innerHTML = document.getElementById('vid').currentTime}, 500) </script> </head> <body> <div id="videoContainer" style="width: 640px; height: 480px"> <div> <video id="vid" src='http://qa-apache-php7.dev.kaltura.com/p/1091/sp/109100/playManifest/entryId/0_xjjki1id/protocol/http/format/applehttp/flavorIds/0_jpggin3q,0_8e75zdb1,0_8bdtuqj2,0_v3u9vh5n/a.m3u8?playSessionId=bf508128-58ae-9cc1-2c88-93751b645189:1a994be0-18d0-6afe-aabe-d42507e84500&referrer=aHR0cDovL2xvY2FsaG9zdDo4MDgwLw==&clientTag=html5:v0.53.0' playsinline controls style="display: none;"/> </div> <span id="currTime"></span> <button onclick="document.getElementById('vid').play()">play</button> <button onclick="document.getElementById('vid').currentTime = document.getElementById('vid').duration">seek to end</button> <button onclick="document.getElementById('videoContainer').webkitRequestFullScreen();">fullscreen</button> <button onclick="document.webkitExitFullscreen();">Exit fullscreen</button> </div> </body>
Attachments
Radar WebKit Bug Importer
Comment 1 2020-04-07 11:43:47 PDT
Jer Noble
Comment 2 2020-04-08 16:06:36 PDT
Playing a HLS stream with "display:none" will always give terrible results. AVFoundation uses the current display size to determine which variant to switch to, and when the element is hidden in CSS, it has a display size of zero, and AVFoundation will naturally want to switch to the lowest video bitrate tier. Can I ask what the use case is here?
Roy Bregman
Comment 3 2020-04-09 00:44:01 PDT
Hey, thanks for the quick answer. We are using a VR plugin which consumes the video and displays it on Canvas
Oren Me
Comment 4 2020-05-20 21:45:01 PDT
Jer, can you give other recommendation how to manage VR then? You don’t want the video to be seen while you sample it on a canvas. Should we instead of doing “display: none” do “visibility: hidden;” or “opacity: 0;” or “position: absolute; top: -9999px; left: -9999px;”
Note You need to log in before you can comment on or make changes to this bug.