Support sharing live links to LibreTube

This commit is contained in:
Bnyro 2023-03-28 18:17:12 +02:00
parent 98a094ffd7
commit 7a2f97de6d
3 changed files with 5 additions and 2 deletions

View File

@ -264,6 +264,7 @@
<data android:pathPrefix="/embed/" /> <data android:pathPrefix="/embed/" />
<data android:pathPrefix="/watch" /> <data android:pathPrefix="/watch" />
<data android:pathPrefix="/shorts/" /> <data android:pathPrefix="/shorts/" />
<data android:pathPrefix="/live/" />
<!-- channel prefix --> <!-- channel prefix -->
<data android:pathPrefix="/channel/" /> <data android:pathPrefix="/channel/" />
<data android:pathPrefix="/user/" /> <data android:pathPrefix="/user/" />

View File

@ -51,12 +51,14 @@ class RouterActivity : BaseActivity() {
} }
uri.path!!.contains("/shorts/") || uri.path!!.contains("/shorts/") ||
uri.path!!.contains("/embed/") || uri.path!!.contains("/embed/") ||
uri.path!!.contains("/v/") uri.path!!.contains("/v/") ||
uri.path!!.contains("/live/")
-> { -> {
val videoId = uri.path!! val videoId = uri.path!!
.replace("/shorts/", "") .replace("/shorts/", "")
.replace("/v/", "") .replace("/v/", "")
.replace("/embed/", "") .replace("/embed/", "")
.replace("/live/", "")
intent.putExtra(IntentData.videoId, videoId) intent.putExtra(IntentData.videoId, videoId)
} }

View File

@ -334,7 +334,7 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
if (PlayerHelper.swipeGestureEnabled) { if (PlayerHelper.swipeGestureEnabled) {
binding.playerMotionLayout.addSwipeUpListener { binding.playerMotionLayout.addSwipeUpListener {
if(this::streams.isInitialized) { if (this::streams.isInitialized) {
binding.player.hideController() binding.player.hideController()
setFullscreen() setFullscreen()
} }