Browse Source

Fixed issue where a video would sometimes not properly end in EditSong

Kristian Vos 3 years ago
parent
commit
3a64e21abd
1 changed files with 7 additions and 2 deletions
  1. 7 2
      frontend/src/components/modals/EditSong.vue

+ 7 - 2
frontend/src/components/modals/EditSong.vue

@@ -700,9 +700,12 @@ export default {
 						this.song.duration !== -1 &&
 						this.video.paused === false &&
 						this.playerReady &&
-						this.video.player.getCurrentTime() -
+						(this.video.player.getCurrentTime() -
 							this.song.skipDuration >
-							this.song.duration
+							this.song.duration ||
+							(this.video.player.getCurrentTime() > 0 &&
+								this.video.player.getCurrentTime() >=
+									this.video.player.getDuration()))
 					) {
 						this.video.paused = true;
 						this.video.player.stopVideo();
@@ -1581,6 +1584,8 @@ export default {
 					hostname: window.location.hostname
 				};
 
+				console.log("SENDING VIDEO DATA");
+
 				aw.sendVideoData(videoData);
 			} else {
 				this.activityWatchVideoLastStatus = "not_playing";