Bug 228101 - Webkit show black screen instead of video before triggering onvisilbilitychange event.
Summary: Webkit show black screen instead of video before triggering onvisilbilitychan...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 14
Hardware: Mac (Apple Silicon) macOS 10.14
: P2 Normal
Assignee: Nobody
URL:
Keywords: HTML5, InRadar
Depends on:
Blocks:
 
Reported: 2021-07-20 00:34 PDT by Kirill
Modified: 2021-08-02 09:33 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill 2021-07-20 00:34:31 PDT
Hello! I trying to inserting and playing a live stream inside video tag. In chrome it works perfectly, video start playing as soon as possible, but in safari I can see when live stream is available and poster was removed(autoplay was successful triggered), but until I switch between browser tabs, I see only black screen where the video should be. Also I can see my livestream if I switch between applications windows e.g. I switch to slack then back to the safari and video will playing. During the study of the problem, I managed to find out that is not problem about webrtc (because on server I can see that live stream bytes was delivered to client), and it's not problem of html5 video tag, because autoplay (muted, of course) always triggered as expected. But this may be due to internal safari tricks with web pages, because only one thing happens when I switch between tabs/apps -- it's document.visibilityState. Manually pausing and then playing the video not works too. I can see video only after browser was trigger 'onvisibilitychange'.
Comment 1 Smoley 2021-07-22 16:47:58 PDT
Thanks for filing, can you please provide a reduced test case and steps to reproduce on our end?
Comment 2 Radar WebKit Bug Importer 2021-07-22 16:48:08 PDT
<rdar://problem/80990483>
Comment 3 Kirill 2021-08-01 19:05:51 PDT
Hello! The error was on the side of the meteor framework. The problem is also described here: javascript - Meteor Safari Video Wont Display - Stack Overflow
Comment 4 Kirill 2021-08-01 19:06:17 PDT
(In reply to Kirill from comment #3)
> Hello! The error was on the side of the meteor framework. The problem is
> also described here: javascript - Meteor Safari Video Wont Display - Stack
> Overflow

https://stackoverflow.com/questions/59955141/meteor-safari-video-wont-display
Comment 5 youenn fablet 2021-08-02 09:33:21 PDT
Might be a dupe of https://bugs.webkit.org/show_bug.cgi?id=222115.
@Kirill, can you try without your workaround on the latest Safari betas?