Skip to content

Commit bfc2d6d

Browse files
committed
chore: Use removeAttribute
1 parent 4dda437 commit bfc2d6d

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

packages/video_player/video_player_web/lib/src/video_player.dart

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -232,19 +232,13 @@ class VideoPlayer {
232232

233233
void _resetOptions() {
234234
_videoElement.controls = false;
235-
if (_videoElement.hasAttribute('controlsList')) {
236-
_videoElement.setAttribute('controlsList', '');
237-
}
238-
if (_videoElement.hasAttribute('disablePictureInPicture')) {
239-
_videoElement.setAttribute('disablePictureInPicture', false);
240-
}
235+
_videoElement.removeAttribute('controlsList');
236+
_videoElement.removeAttribute('disablePictureInPicture');
241237
if (_onContextMenu != null) {
242238
_videoElement.removeEventListener('contextmenu', _onContextMenu);
243239
_onContextMenu = null;
244240
}
245-
if (_videoElement.hasAttribute('disableRemotePlayback')) {
246-
_videoElement.setAttribute('disableRemotePlayback', false);
247-
}
241+
_videoElement.removeAttribute('disableRemotePlayback');
248242
}
249243

250244
/// Disposes of the current [html.VideoElement].

0 commit comments

Comments
 (0)