Browse Source

Merge pull request #1088 from movie-web/fix/vidsrcto-and-ridomovies

Fixes for VidSrcTo & Ridomovies
pull/1089/head
Jorrin 1 year ago committed by GitHub
parent
commit
17d7f292b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      src/components/player/display/base.ts

4
src/components/player/display/base.ts

@ -83,7 +83,8 @@ export function makeVideoElementDisplayInterface(): DisplayInterface { @@ -83,7 +83,8 @@ export function makeVideoElementDisplayInterface(): DisplayInterface {
function reportAudioTracks() {
if (!hls) return;
const currentTrack = hls.audioTracks[hls.audioTrack];
const currentTrack = hls.audioTracks?.[hls.audioTrack ?? 0];
if (!currentTrack) return;
emit("changedaudiotrack", {
id: currentTrack.id.toString(),
label: currentTrack.name,
@ -129,6 +130,7 @@ export function makeVideoElementDisplayInterface(): DisplayInterface { @@ -129,6 +130,7 @@ export function makeVideoElementDisplayInterface(): DisplayInterface {
}
function setupSource(vid: HTMLVideoElement, src: LoadableSource) {
hls = null;
if (src.type === "hls") {
if (canPlayHlsNatively(vid)) {
vid.src = processCdnLink(src.url);

Loading…
Cancel
Save