Skip to content

Commit

Permalink
chore: Use removeAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
defuncart committed Jul 27, 2023
1 parent 4dda437 commit bfc2d6d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions packages/video_player/video_player_web/lib/src/video_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -232,19 +232,13 @@ class VideoPlayer {

void _resetOptions() {
_videoElement.controls = false;
if (_videoElement.hasAttribute('controlsList')) {
_videoElement.setAttribute('controlsList', '');
}
if (_videoElement.hasAttribute('disablePictureInPicture')) {
_videoElement.setAttribute('disablePictureInPicture', false);
}
_videoElement.removeAttribute('controlsList');
_videoElement.removeAttribute('disablePictureInPicture');
if (_onContextMenu != null) {
_videoElement.removeEventListener('contextmenu', _onContextMenu);
_onContextMenu = null;
}
if (_videoElement.hasAttribute('disableRemotePlayback')) {
_videoElement.setAttribute('disableRemotePlayback', false);
}
_videoElement.removeAttribute('disableRemotePlayback');
}

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

0 comments on commit bfc2d6d

Please sign in to comment.