mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-15 06:40:30 +05:30
fix open crash
This commit is contained in:
parent
d2b0f34757
commit
3f6da4102e
@ -892,7 +892,7 @@ class PlayerFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (response.hls != null) {
|
if (response.hls != null) {
|
||||||
binding.relPlayerVlc.setOnClickListener {
|
binding.relPlayerOpen.setOnClickListener {
|
||||||
// start an intent with video as mimetype using the hls stream
|
// start an intent with video as mimetype using the hls stream
|
||||||
val uri: Uri = Uri.parse(response.hls)
|
val uri: Uri = Uri.parse(response.hls)
|
||||||
val intent = Intent()
|
val intent = Intent()
|
||||||
@ -904,7 +904,11 @@ class PlayerFragment : Fragment() {
|
|||||||
intent.putExtra("artist", uploader)
|
intent.putExtra("artist", uploader)
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||||
|
|
||||||
startActivity(intent)
|
try {
|
||||||
|
startActivity(intent)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Toast.makeText(context, R.string.no_player_found, Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (relatedStreamsEnabled) {
|
if (relatedStreamsEnabled) {
|
||||||
|
@ -185,7 +185,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/relPlayer_vlc"
|
android:id="@+id/relPlayer_open"
|
||||||
style="@style/PlayerActionsLayout">
|
style="@style/PlayerActionsLayout">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -241,4 +241,5 @@
|
|||||||
<string name="autoRotatePlayer_summary">Automatically switch to player fullscreen when the device gets turned.</string>
|
<string name="autoRotatePlayer_summary">Automatically switch to player fullscreen when the device gets turned.</string>
|
||||||
<string name="pure_theme">Pure theme</string>
|
<string name="pure_theme">Pure theme</string>
|
||||||
<string name="pure_theme_summary">Pure white/black theme</string>
|
<string name="pure_theme_summary">Pure white/black theme</string>
|
||||||
|
<string name="no_player_found">No external player found. Please make sure you have one installed.</string>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue
Block a user