Skip to content

Commit

Permalink
fix: Disable HLS on Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
kovipu committed Oct 28, 2024
1 parent 47dda85 commit ad34fea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ import { ChatWrapper } from '@/components/ShoutBox/shoutbox';
import VideoPlayer from '@/components/videoPlayer';
import { ShoutBoxAndVideoProvider } from '@/hooks/useShoutboxAndVideo';

// Check if the user is on WebKit.
const isSafari = typeof window !== 'undefined' && CSS.supports('-webkit-hyphens:none');

const isHlsLive =
Hls.isSupported() && process.env.NEXT_PUBLIC_HLS_MODE === 'live';
!isSafari && Hls.isSupported() && process.env.NEXT_PUBLIC_HLS_MODE === 'live';

const AUDIO_STREAM_URL = 'https://player.turunwappuradio.com/wappuradio.mp3';
const HLS_STREAM_URL = 'https://stream.turunwappuradio.com/twr_chunklist.m3u8';
Expand Down

0 comments on commit ad34fea

Please sign in to comment.