Skip to content
Merged
Prev Previous commit
Next Next commit
feat: Add allowPictureInPicture (controls), allowRemotePlayback
  • Loading branch information
defuncart committed Aug 22, 2023
commit d24aedc78c69c0695464ccf75a3faf388fdf1911
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,20 @@ class VideoPlayer {
if (controlsList.isNotEmpty) {
_videoElement.setAttribute('controlsList', controlsList);
}

if (!options.controls.allowPictureInPicture) {
_videoElement.setAttribute('disablePictureInPicture', true);
}
}

if (!options.allowContextMenu) {
_onContextMenu = (html.Event event) => event.preventDefault();
_videoElement.addEventListener('contextmenu', _onContextMenu);
}

if (!options.allowRemotePlayback) {
_videoElement.setAttribute('disableRemotePlayback', true);
}
}

/// Disposes of the current [html.VideoElement].
Expand Down