mirror of
https://github.com/FreeTubeApp/FreeTube
synced 2024-12-14 05:29:27 +01:00
Prevent PiP video from repeating if video is finished. Also prevent it from holding up navigation on rare occasions
This commit is contained in:
parent
32c3e143c8
commit
6bf54a1dd7
@ -663,14 +663,15 @@ export default Vue.extend({
|
||||
this.updateWatchProgress(payload)
|
||||
}
|
||||
|
||||
if (player.isInPictureInPicture()) {
|
||||
if (player !== null && !player.paused() && player.isInPictureInPicture()) {
|
||||
const playerId = this.videoId
|
||||
setTimeout(() => {
|
||||
player.play()
|
||||
player.on('leavepictureinpicture', () => {
|
||||
const watchTime = player.currentTime()
|
||||
if (this.$route.fullPath.includes('/watch')) {
|
||||
const routeId = this.$route.params.id
|
||||
if (routeId === this.videoId) {
|
||||
if (routeId === playerId) {
|
||||
const activePlayer = $('.ftVideoPlayer video').get(0)
|
||||
activePlayer.currentTime = watchTime
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user