mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-21 14:47:41 +01:00
Fix feature detection
This commit is contained in:
parent
163ca0df29
commit
4a38c77e2d
1 changed files with 5 additions and 2 deletions
|
@ -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 a new issue