feat: enable HLS playback on Android#3
Closed
towneh wants to merge 1 commit into
Closed
Conversation
The HLS source (protocol/basis_hls.c) is portable C and already ships in the Android build; only the HTTP provider selection in run_hls was Windows-only. Wire the JNI HttpsURLConnection byte source in as the Android provider, so playlist and segment fetches ride the same code path the push-model https fallback already uses (TLS, redirects and thread attach handled there). The read timeout is 60s to sit out LL-HLS blocking playlist reloads. Also hand .m3u8 URLs to the HLS source ahead of the AMediaExtractor attempt: the extractor cannot stitch segments, so trying it first only added a rejected network round-trip before the fallback. No behaviour change on Windows, where basis_decoder_try_open_url always returns 0. Delivery semantics carry over unchanged from the portable core: live playlists present at the live edge with AU-level delivery pacing, ENDLIST playlists auto-detect as VOD and play once. fMP4/CMAF-segment HLS remains unsupported on every platform; TS-segment HLS is the working case. Rebuilt libbasis_media_native.so (arm64-v8a).
27 tasks
Contributor
Author
|
Re-raised on the main repository as BasisVR/Basis#927 (stacked on the monorepo sync, BasisVR/Basis#926) as part of collapsing this repo back into BasisVR/Basis — same change, rebased over everything the sync carries. Still draft pending the Quest pass listed there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enables HLS playback on Android/Quest. The HLS source (
protocol/basis_hls.c) is portable C and already ships in the Android build — the only gate wasrun_hlsconstructing its HTTP provider under#if defined(_WIN32). This wires the existing JNIHttpsURLConnectionbyte source in as the Android provider (same code path the push-model https fallback already uses: TLS, redirects and JVM thread-attach handled there), with a 60 s read timeout to sit out LL-HLS blocking playlist reloads..m3u8URLs are also handed to the HLS source ahead of theAMediaExtractorattempt — the extractor can't stitch segments, so trying it first only added a rejected network round-trip. No behaviour change on Windows, wherebasis_decoder_try_open_urlalways returns 0.Delivery semantics carry over unchanged from the portable core: live playlists present at the live edge with AU-level delivery pacing, ENDLIST playlists auto-detect as VOD and play once.
Rebuilt
libbasis_media_native.so(arm64-v8a); the Windows DLL is untouched.Status — draft pending device validation
Code-complete and reviewed, but not yet Quest-tested — keeping this a draft until the headset pass, which covers:
mpegtsvariant).EXT-X-ENDLIST) + real TLS via a public TS-segment HLS VOD stream — also exercises redirects through the JNI fetch.Note for testers:
http://origins additionally need a build with cleartext traffic allowed (Android policy);https://origins need nothing special.Ported from the pre-split working branch (same commit), now that this repository is the media player's home.