Skip to content

Commit

Permalink
fix(player): accept none value for fullscreen orientation attr/prop
Browse files Browse the repository at this point in the history
  • Loading branch information
mihar-22 committed Mar 20, 2024
1 parent 5aa7e4f commit 545b7d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/vidstack/src/core/api/player-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export interface MediaPlayerProps
* This method will indicate the orientation to lock the screen to when in fullscreen mode and
* the Screen Orientation API is available.
*/
fullscreenOrientation: ScreenOrientationLockType | undefined;
fullscreenOrientation: ScreenOrientationLockType | 'no' | undefined;
/**
* Google Cast options.
*
Expand Down
2 changes: 1 addition & 1 deletion packages/vidstack/src/core/state/media-request-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ export class MediaRequestManager extends MediaPlayerController implements MediaR
const lockType = peek(this.$props.fullscreenOrientation),
isFullscreen = event.detail;

if (isUndefined(lockType) || !this._orientation.supported) return;
if (isUndefined(lockType) || lockType === 'no' || !this._orientation.supported) return;

if (isFullscreen) {
if (this._orientation.locked) return;
Expand Down

0 comments on commit 545b7d6

Please sign in to comment.