mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-20 14:37:43 +01:00
Merge pull request #1088 from movie-web/fix/vidsrcto-and-ridomovies
Fixes for VidSrcTo & Ridomovies
This commit is contained in:
commit
17d7f292b5
1 changed files with 3 additions and 1 deletions
|
@ -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 {
|
|||
}
|
||||
|
||||
function setupSource(vid: HTMLVideoElement, src: LoadableSource) {
|
||||
hls = null;
|
||||
if (src.type === "hls") {
|
||||
if (canPlayHlsNatively(vid)) {
|
||||
vid.src = processCdnLink(src.url);
|
||||
|
|
Loading…
Reference in a new issue