mirror of
https://github.com/iv-org/invidious.git
synced 2024-10-01 01:35:38 -04:00
DASH playback force highest quality m4a
Since VideoJS is unable to handle adaptive audio quality, the best audo quality is forced for every video quality.
This commit is contained in:
parent
6c73614a47
commit
140b6c1227
@ -61,7 +61,18 @@ module Invidious::Routes::API::Manifest
|
|||||||
next if mime_streams.empty?
|
next if mime_streams.empty?
|
||||||
|
|
||||||
xml.element("AdaptationSet", id: i, mimeType: mime_type, startWithSAP: 1, subsegmentAlignment: true) do
|
xml.element("AdaptationSet", id: i, mimeType: mime_type, startWithSAP: 1, subsegmentAlignment: true) do
|
||||||
|
# ignore the 64k m4a stream, only consider the 128k m4a stream
|
||||||
|
best_m4a_stream = mime_streams[0]
|
||||||
|
best_m4a_stream_bitrate = 0
|
||||||
mime_streams.each do |fmt|
|
mime_streams.each do |fmt|
|
||||||
|
bandwidth = fmt["bitrate"].as_i
|
||||||
|
if (bandwidth > best_m4a_stream_bitrate)
|
||||||
|
best_m4a_stream_bitrate = bandwidth
|
||||||
|
best_m4a_stream = fmt
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
[best_m4a_stream].each do |fmt|
|
||||||
# OTF streams aren't supported yet (See https://github.com/TeamNewPipe/NewPipe/issues/2415)
|
# OTF streams aren't supported yet (See https://github.com/TeamNewPipe/NewPipe/issues/2415)
|
||||||
next if !(fmt.has_key?("indexRange") && fmt.has_key?("initRange"))
|
next if !(fmt.has_key?("indexRange") && fmt.has_key?("initRange"))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user