RESOLVED FIXED Bug 170545
Add hasVideo property to WebAVPlayerController.
https://bugs.webkit.org/show_bug.cgi?id=170545
Summary Add hasVideo property to WebAVPlayerController.
Per Arne Vollan
Reported 2017-04-06 06:41:27 PDT
The existing “hasEnabledVideo” property may briefly toggle to NO at video item boundaries if the audio track is a tiny bit longer than the video track. We would like to add a new "hasVideo" property which does not have this behavior, but can be used to discover if any video content is present in the playback item, whether video content is currently enabled or not.
Attachments
Patch (3.76 KB, patch)
2017-04-06 07:08 PDT, Per Arne Vollan
no flags
Patch (3.76 KB, patch)
2017-04-06 08:13 PDT, Per Arne Vollan
no flags
Patch (2.70 KB, patch)
2017-04-07 05:23 PDT, Per Arne Vollan
no flags
Per Arne Vollan
Comment 1 2017-04-06 06:42:29 PDT
Per Arne Vollan
Comment 2 2017-04-06 07:08:55 PDT
Per Arne Vollan
Comment 3 2017-04-06 08:13:05 PDT
Eric Carlson
Comment 4 2017-04-06 09:32:26 PDT
Comment on attachment 306389 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=306389&action=review > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:541 > + if (hasVideo) > + [playerController() setHasVideo:hasVideo]; Won't this do the wrong thing if a media stream switches from video+audio to audio-only (eg. an HLS stream when available bandwidth is too low)?
Per Arne Vollan
Comment 5 2017-04-07 05:23:49 PDT
Per Arne Vollan
Comment 6 2017-04-07 05:36:43 PDT
(In reply to Eric Carlson from comment #4) > Comment on attachment 306389 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=306389&action=review > > > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:541 > > + if (hasVideo) > > + [playerController() setHasVideo:hasVideo]; > > Won't this do the wrong thing if a media stream switches from video+audio to > audio-only (eg. an HLS stream when available bandwidth is too low)? I removed the if statement, which appears to be unnecessary since WebVideoFullscreenInterfaceAVKit::hasVideoChanged is only called when we enter/leave fullscreen/PiP, as far as I can see. This means the value of the "hasVideo" property equals 'true' in this implementation, also when the audio track is a bit longer than the video track. Thanks for reviewing!
WebKit Commit Bot
Comment 7 2017-04-07 06:43:41 PDT
Comment on attachment 306489 [details] Patch Clearing flags on attachment: 306489 Committed r215092: <http://trac.webkit.org/changeset/215092>
WebKit Commit Bot
Comment 8 2017-04-07 06:43:43 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.