diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt index b05624a71..51ceca53a 100644 --- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt @@ -892,7 +892,7 @@ class PlayerFragment : Fragment() { } if (response.hls != null) { - binding.relPlayerVlc.setOnClickListener { + binding.relPlayerOpen.setOnClickListener { // start an intent with video as mimetype using the hls stream val uri: Uri = Uri.parse(response.hls) val intent = Intent() @@ -904,7 +904,11 @@ class PlayerFragment : Fragment() { intent.putExtra("artist", uploader) 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) { diff --git a/app/src/main/res/layout/fragment_player.xml b/app/src/main/res/layout/fragment_player.xml index 6584543e2..527da5407 100644 --- a/app/src/main/res/layout/fragment_player.xml +++ b/app/src/main/res/layout/fragment_player.xml @@ -185,7 +185,7 @@ Automatically switch to player fullscreen when the device gets turned. Pure theme Pure white/black theme + No external player found. Please make sure you have one installed. \ No newline at end of file