import React from 'react'; import { useMedia } from 'react-use'; import { VolumeTwoIcon } from '@100mslive/react-icons'; import { Button, config, Dialog, IconButton, Text } from '../../..'; // @ts-ignore import { DialogContent, DialogRow } from '../../primitives/DialogContent'; import { useIsLandscape } from '../../common/hooks'; export function HLSAutoplayBlockedPrompt({ open, unblockAutoPlay, }: { open: boolean; unblockAutoPlay: () => Promise; }) { const isLandscape = useIsLandscape(); const isMobile = useMedia(config.media.md); if ((isMobile || isLandscape) && open) { return ( await unblockAutoPlay()} > Tap To Unmute ); } return ( { if (!value) { await unblockAutoPlay(); } }} > The browser wants us to get a confirmation for playing the HLS Stream. Please click "play stream" to proceed. ); }