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.
rdar://problem/31325182
Created attachment 306379 [details] Patch
Created attachment 306389 [details] Patch
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)?
Created attachment 306489 [details] Patch
(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!
Comment on attachment 306489 [details] Patch Clearing flags on attachment: 306489 Committed r215092: <http://trac.webkit.org/changeset/215092>
All reviewed patches have been landed. Closing bug.