diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-08-09 08:56:35 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-08-09 08:56:35 -0500 |
| commit | a7c6f3538c2621182064be6f24fd3dbd8af618c0 (patch) | |
| tree | 26c159bc450cb2d8c9b05659ff1bc2f9e37ac20e | |
| parent | c09b41a8f86701f12845b8ebe8713eb38596488a (diff) | |
| download | invidious-a7c6f3538c2621182064be6f24fd3dbd8af618c0.tar.gz invidious-a7c6f3538c2621182064be6f24fd3dbd8af618c0.tar.bz2 invidious-a7c6f3538c2621182064be6f24fd3dbd8af618c0.zip | |
Fix typo in DASH manifests
| -rw-r--r-- | src/invidious.cr | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 4f3a88b5..ea8abc88 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -2576,8 +2576,7 @@ get "/api/manifest/dash/id/:id" do |env| minBufferTime: "PT1.5S", profiles: "urn:mpeg:dash:profile:isoff-main:2011", type: "static", mediaPresentationDuration: "PT#{video.info["length_seconds"]}S") do xml.element("Period") do - xml.element("AdaptationSet", id: 0, mimeType: "audio/mp4", subsegmentAlignment: true) do - xml.element("Role", schemeIdUri: "urn:mpeg:DASH:role:2011", value: "main") + xml.element("AdaptationSet", mimeType: "audio/mp4", startWithSAP: 1, subsegmentAlignment: true) do audio_streams.each do |fmt| mimetype = fmt["type"].split(";")[0] codecs = fmt["type"].split("codecs=")[1].strip('"') @@ -2590,15 +2589,15 @@ get "/api/manifest/dash/id/:id" do |env| xml.element("AudioChannelConfiguration", schemeIdUri: "urn:mpeg:dash:23003:3:audio_channel_configuration:2011", value: "2") xml.element("BaseURL") { xml.text url } - xml.element("SegmentBase", indexRange: fmt["init"]) do - xml.element("Initialization", range: fmt["index"]) + xml.element("SegmentBase", indexRange: fmt["index"]) do + xml.element("Initialization", range: fmt["init"]) end end end end - xml.element("AdaptationSet", id: 1, mimeType: "video/mp4", subsegmentAlignment: true) do - xml.element("Role", schemeIdUri: "urn:mpeg:DASH:role:2011", value: "main") + xml.element("AdaptationSet", mimeType: "video/mp4", startWithSAP: 1, subsegmentAlignment: true, + scanType: "progressive") do video_streams.each do |fmt| mimetype = fmt["type"].split(";") codecs = fmt["type"].split("codecs=")[1].strip('"') @@ -2607,11 +2606,12 @@ get "/api/manifest/dash/id/:id" do |env| url = fmt["url"] height, width = fmt["size"].split("x") - xml.element("Representation", id: itag, codecs: codecs, width: width, startWithSAP: "1", maxPlayoutRate: "1", - height: height, bandwidth: bandwidth, frameRate: fmt["fps"]) do + xml.element("Representation", id: itag, codecs: codecs, width: width, height: height, + startWithSAP: "1", maxPlayoutRate: "1", + bandwidth: bandwidth, frameRate: fmt["fps"]) do xml.element("BaseURL") { xml.text url } - xml.element("SegmentBase", indexRange: fmt["init"]) do - xml.element("Initialization", range: fmt["index"]) + xml.element("SegmentBase", indexRange: fmt["index"]) do + xml.element("Initialization", range: fmt["init"]) end end end |
