mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-11 00:05:09 +01:00
Fix feature detection
This commit is contained in:
parent
163ca0df29
commit
4a38c77e2d
@ -4,7 +4,10 @@ import { useTranslation } from "react-i18next";
|
||||
import { useControls } from "@/video/state/logic/controls";
|
||||
import { useVideoPlayerDescriptor } from "@/video/state/hooks";
|
||||
import { useCallback } from "react";
|
||||
import { canPictureInPicture } from "@/utils/detectFeatures";
|
||||
import {
|
||||
canPictureInPicture,
|
||||
canWebkitPictureInPicture,
|
||||
} from "@/utils/detectFeatures";
|
||||
import { VideoPlayerIconButton } from "../parts/VideoPlayerIconButton";
|
||||
|
||||
interface Props {
|
||||
@ -22,7 +25,7 @@ export function PictureInPictureAction(props: Props) {
|
||||
controls.togglePictureInPicture();
|
||||
}, [controls]);
|
||||
|
||||
if (!canPictureInPicture()) return null;
|
||||
if (!canPictureInPicture() && !canWebkitPictureInPicture()) return null;
|
||||
|
||||
return (
|
||||
<VideoPlayerIconButton
|
||||
|
Loading…
Reference in New Issue
Block a user