Docile-Alligator / Infinity-For-Reddit

A Reddit client for Android
https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforreddit
GNU Affero General Public License v3.0
4.26k stars 410 forks source link

For v.reddit HLS, try to prefer the stereo audio track. #1376

Closed camporter closed 1 year ago

camporter commented 1 year ago

Fixes an issue reported here: https://www.reddit.com/r/Infinity_For_Reddit/comments/10v2vik/headset_on_stereo_doesnt_work_properly_in_the/

Reddit video HLS (usually) provides two different audio tracks, the first being single channel (mono) audio, which exoplayer uses by default because there is no metadata from HLS about which audio track has more channels. The second audio track is usually stereo, so pick the second audio track by default. The HLS metadata does not contain a media tag that defines the number of channels for each audio track, so (it seems that) exoplayer won't pick stereo by default.

DASH reddit video seems to provide only one audio track, which might make this simpler. Though I'm not sure if there's some media that is HLS-only.

Docile-Alligator commented 1 year ago

Thank you!