player: Add quality selector for livestreams.

This commit is contained in:
FireMasterK 2021-01-20 21:21:14 +05:30
parent 9c68e1bc40
commit bf651da5e7
No known key found for this signature in database
GPG Key ID: 8DFF5DD33E93DB58

View File

@ -199,19 +199,14 @@ export default {
// label: "DASH" // label: "DASH"
// }); // });
if (this.video.livestream) { this.video.videoStreams.map(stream =>
src.push({ src.push({
src: this.video.hls, src: stream.url,
type: "application/x-mpegURL" type: stream.mimeType,
}); label: stream.quality,
} else { videoOnly: stream.videoOnly
this.video.videoStreams.map(stream => })
src.push({ );
src: stream.url,
type: stream.mimeType,
label: stream.quality
})
);
this.video.audioStreams.map(stream => this.video.audioStreams.map(stream =>
src.push({ src.push({
@ -220,7 +215,7 @@ export default {
label: stream.quality label: stream.quality
}) })
); );
}
if (!this.audioplayer) if (!this.audioplayer)
this.audioplayer = new Audio( this.audioplayer = new Audio(