Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,38 @@

<data android:scheme="magnet" />
</intent-filter>
<!-- External player: receive video/audio URLs from other apps (e.g. Stremio, browsers) -->
<intent-filter android:label="@string/play_with_app_name">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="http" />
<data android:scheme="https" />
<data android:mimeType="video/*" />
</intent-filter>
<intent-filter android:label="@string/play_with_app_name">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="http" />
<data android:scheme="https" />
<data android:mimeType="application/x-mpegURL" />
<data android:mimeType="application/vnd.apple.mpegurl" />
</intent-filter>
<intent-filter android:label="@string/play_with_app_name">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="http" />
<data android:scheme="https" />
<data android:mimeType="audio/*" />
</intent-filter>
<!--<intent-filter tools:ignore="AppLinkUrlError">
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.SEND" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ class DownloadedPlayerActivity : AppCompatActivity() {
val item = if (cd != null && cd.itemCount > 0) cd.getItemAt(0) else null
val url = item?.text?.toString()
when {
item?.uri != null && item.uri.scheme in listOf("http", "https") ->
playLink(this, item.uri.toString())
item?.uri != null -> playUri(this, item.uri)
url != null -> playLink(this, url)
data != null && data.scheme in listOf("http", "https") ->
playLink(this, data.toString())
data != null -> playUri(this, data)
extraText != null -> playLink(this, extraText)
else -> { finish(); return }
Expand Down
Loading