Skip to content

Commit

Permalink
fix(player): can use video presentation throwing
Browse files Browse the repository at this point in the history
closes #989
  • Loading branch information
mihar-22 committed Nov 24, 2023
1 parent 024a797 commit aff2d29
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/vidstack/src/utils/support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ export function canUsePictureInPicture(video: HTMLVideoElement): boolean {
*
* @see {@link https://developer.apple.com/documentation/webkitjs/htmlvideoelement/1631913-webkitpresentationmode}
*/
export function canUseVideoPresentation(video: HTMLVideoElement): boolean {
export function canUseVideoPresentation(video: HTMLVideoElement | null): boolean {
if (__SERVER__) return false;
return (
isFunction(video.webkitSupportsPresentationMode) && isFunction(video.webkitSetPresentationMode)
isFunction(video?.webkitSupportsPresentationMode) &&
isFunction(video?.webkitSetPresentationMode)
);
}

Expand Down

0 comments on commit aff2d29

Please sign in to comment.