diff --git a/package-lock.json b/package-lock.json index 9980576..73ba83e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "date-fns": "^2.28.0", "google-auth-library": "^8.7.0", "graphql": "^16.3.0", - "hls.js": "^1.5.8", + "hls.js": "^1.5.17", "next": "^12.0.10", "ramda": "^0.28.0", "react": "17.0.2", @@ -8815,9 +8815,10 @@ "dev": true }, "node_modules/hls.js": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.5.8.tgz", - "integrity": "sha512-hJYMPfLhWO7/7+n4f9pn6bOheCGx0WgvVz7k3ouq3Pp1bja48NN+HeCQu3XCGYzqWQF/wo7Sk6dJAyWVJD8ECA==" + "version": "1.5.17", + "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.5.17.tgz", + "integrity": "sha512-wA66nnYFvQa1o4DO/BFgLNRKnBTVXpNeldGRBJ2Y0SvFtdwvFKCbqa9zhHoZLoxHhZ+jYsj3aIBkWQQCPNOhMw==", + "license": "Apache-2.0" }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", diff --git a/package.json b/package.json index 79408c9..8a4ec62 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "date-fns": "^2.28.0", "google-auth-library": "^8.7.0", "graphql": "^16.3.0", - "hls.js": "^1.5.8", + "hls.js": "^1.5.17", "next": "^12.0.10", "ramda": "^0.28.0", "react": "17.0.2", diff --git a/pages/_app.tsx b/pages/_app.tsx index 6def3bc..f29bf83 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -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';