feat: add external player intent filter for HTTP/HTTPS video/audio URLs#2837
Open
AiCurv wants to merge 1 commit into
Open
feat: add external player intent filter for HTTP/HTTPS video/audio URLs#2837AiCurv wants to merge 1 commit into
AiCurv wants to merge 1 commit into
Conversation
Allow CloudStream to appear in Android's 'Open with' menu when clicking video/audio/HLS URLs from other apps like Stremio or browsers. - Add 3 intent-filters to DownloadedPlayerActivity for video/*, HLS (x-mpegURL, vnd.apple.mpegurl), and audio/* MIME types over http/https schemes - Route http/https URIs through playLink() instead of playUri() so network streams are handled correctly instead of being treated as local content URIs
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
Allows CloudStream to appear in Android's "Open with" / "Share" menu when clicking video, audio, or HLS URLs from other apps (e.g., Stremio, web browsers, media apps).
Currently, CloudStream's
DownloadedPlayerActivityonly handlescontent://URIs and magnet links via intent filters. If you click anhttp/httpsvideo URL in another app, CloudStream doesn't show up as an option.Changes
AndroidManifest.xml
Added 3 new
<intent-filter>blocks toDownloadedPlayerActivity:ACTION_VIEWforhttp/https+video/*MIME typeACTION_VIEWforhttp/https+application/x-mpegURL+application/vnd.apple.mpegurl(HLS)ACTION_VIEWforhttp/https+audio/*MIME typeAll use
@string/play_with_app_nameas the label and include bothDEFAULTandBROWSABLEcategories.DownloadedPlayerActivity.kt
Fixed URL routing:
http/httpsURIs are now routed throughplayLink()instead ofplayUri(). Without this fix, network URLs would be passed toplayUri()which treats them as local content URIs and fails to play.Use Case
As an example, Stremio users can now select CloudStream as an external player for streaming URLs. This also works with any app that shares video/audio URLs via Android's standard intent system.
Testing
playLink()instead of failing viaplayUri()Screenshots
N/A — this is an intent-filter change, no UI changes