mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Fix for videos with no dash streams.
This works by loading the best premuxed stream.
This commit is contained in:
parent
c9065b3ac5
commit
b18c34eb78
1 changed files with 4 additions and 2 deletions
|
@ -44,13 +44,15 @@ export default {
|
|||
|
||||
if (this.video.livestream) {
|
||||
uri = this.video.hls;
|
||||
} else {
|
||||
} else if (this.video.audioStreams.length > 0) {
|
||||
const dash = require("@/utils/DashUtils.js").default.generate_dash_file_from_formats(
|
||||
streams,
|
||||
this.video.duration,
|
||||
);
|
||||
|
||||
uri = "data:application/dash+xml;charset=utf-8;base64," + btoa(dash);
|
||||
} else {
|
||||
uri = this.video.videoStreams[0].url;
|
||||
}
|
||||
|
||||
if (noPrevPlayer)
|
||||
|
@ -132,7 +134,7 @@ export default {
|
|||
)
|
||||
this.player.configure("manifest.disableVideo", true);
|
||||
|
||||
player.load(uri).then(() => {
|
||||
player.load(uri, 0, uri.indexOf("dash+xml") >= 0 ? "application/dash+xml" : "video/mp4").then(() => {
|
||||
this.video.subtitles.map(subtitle => {
|
||||
player.addTextTrackAsync(
|
||||
subtitle.url,
|
||||
|
|
Loading…
Reference in a new issue