.RequestImmersivePlayback(*this);Oleh Desiatyrikov (xWF)not sure i follow this - it feels wrong to request immersive every time, unconditionally.
Oleh Desiatyrikov (xWF)The idea was to check `WebContentsDelegate::IsImmersivePlaybackEnabled` and fall back if it's not supported. I could probably put this into a `web_settings` and check the current state of the feature this way.
I added a check for the `GetDocument().GetSettings()->GetImmersiveVideoPlaybackEnabled()` flag. So, we won't try to request the playback if it's not enabled.
pending_video_element_ = &video_element;Oleh Desiatyrikov (xWF)this pattern feels very fragile - e.g. if a second request comes in while the first is pending. i suggest binding it as an argument into the callback @643, if there's a way to do that with oilpan. i forget the rules.
Oleh Desiatyrikov (xWF)Yep, now I see it (after splitting the entire implementation into a smaller chunks). I will look into making it more robust.
Bound the video element into a callback.
if (pending_video_element_ &&Oleh Desiatyrikov (xWF)this feels like a race - lots of stuff can happen while the user is considering their answer carefully.
it might work out because EnterPictureInPicture() might check all the state we care about.
Oleh Desiatyrikov (xWF)I was thinking about mechanism to dismiss the dialog if element leaves fullscreen or is destroyed. But yes, I need to add more checks here at least to ensure the element is still valid.
Added an extra check for `IsElementAllowed` before calling the `EnterImmersivePlayback`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// Handles the result of an immersive session request.Oleh Desiatyrikov (xWF)i think you need to describe 'immersive' better. most folks who touch this will not understand what that means.
Oleh Desiatyrikov (xWF)Something like "Xr Immersive Video Playback Session"?
Renamed to `OnImmersivePlaybackConfirmationResult` for clarity.