fix(#1701): fix play episodes for hls

keep-around/fdb88b04b32b9392e76795099e2ec47c9856b38b
Andrei Dekterev 4 years ago
parent 3fd323594e
commit a2e6a38054
  1. 16
      package-lock.json
  2. 8
      src/features/StreamPlayer/hooks/index.tsx

16
package-lock.json generated

@ -39870,12 +39870,6 @@
"integrity": "sha512-MUc6zSmU3tEVnkQ78q0peeEjKWPUADMlC/t++2bI8WnAG2tvYRPIgHG8lWkXwqc8MsUF6Z2MOf+Mh5sazOmhiQ==",
"dev": true
},
"@types/hls.js": {
"version": "0.13.3",
"resolved": "https://registry.npmjs.org/@types/hls.js/-/hls.js-0.13.3.tgz",
"integrity": "sha512-Po8ZPCsAcPPuf5OODPEkb6cdWJ/w4BdX1veP7IIOc2WG0x1SW4GEQ1+FHKN1AMG2AePJfNUceJbh5PKtP92yRQ==",
"dev": true
},
"@types/hoist-non-react-statics": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",
@ -47032,13 +47026,9 @@
}
},
"hls.js": {
"version": "0.14.17",
"resolved": "https://registry.npmjs.org/hls.js/-/hls.js-0.14.17.tgz",
"integrity": "sha512-25A7+m6qqp6UVkuzUQ//VVh2EEOPYlOBg32ypr34bcPO7liBMOkKFvbjbCBfiPAOTA/7BSx1Dujft3Th57WyFg==",
"requires": {
"eventemitter3": "^4.0.3",
"url-toolkit": "^2.1.6"
}
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.1.5.tgz",
"integrity": "sha512-mQX5TSNtJEzGo5HPpvcQgCu+BWoKDQM6YYtg/KbgWkmVAcqOCvSTi0SuqG2ZJLXxIzdnFcKU2z7Mrw/YQWhPOA=="
},
"hmac-drbg": {
"version": "1.0.1",

@ -85,7 +85,9 @@ export const useVideoPlayer = ({
const chaptersDuration = useDuration(chapters)
const duration = isLive ? fullMatchDuration : chaptersDuration
const duration = (isLive && chapters[0]?.isFullMatchChapter)
? fullMatchDuration
: chaptersDuration
const {
onReady,
@ -226,8 +228,6 @@ export const useVideoPlayer = ({
}, [playing, onPlayingChange])
useEffect(() => {
if (isLive || isEmpty(chapters)) return
setPlayerState({
...initialState,
chapters: chaptersProps,
@ -242,7 +242,7 @@ export const useVideoPlayer = ({
])
useEffect(() => {
if (isLive || isEmpty(chapters)) return
if ((isLive && chapters[0]?.isFullMatchChapter) || isEmpty(chapters)) return
const { duration: chapterDuration } = getActiveChapter()
if (playedProgress >= chapterDuration && !seeking) {

Loading…
Cancel
Save