Sfoglia il codice sorgente

Made very small change to stations.

KrisVos130 8 anni fa
parent
commit
fcf5334372
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      frontend/components/Station/Station.vue

+ 4 - 4
frontend/components/Station/Station.vue

@@ -240,13 +240,13 @@
 
 			_this.socket = _this.$parent.socket;
 
-			_this.socket.on('event:songs.next', data => {
+			/*_this.socket.on('event:songs.next', data => {
 				let { currentSong, startedAt } = data;
 				this.currentSong = currentSong;
 				this.startedAt = startedAt;
 				this.timePaused = 0;
 				this.playVideo();
-			});
+			});*/
 
 			lofig.folder = '../config/default.json';
 			lofig.get('socket.url', function(res) {
@@ -259,9 +259,11 @@
 					_this.paused = data.paused;
 					_this.timePaused = data.timePaused;
 					_this.currentTime  = data.currentTime;
+					this.youtubeReady();
 				});
 
 				_this.stationSocket.on("nextSong", (currentSong, startedAt) => {
+					console.log(currentSong, startedAt);
 					_this.currentSong = currentSong;
 					_this.startedAt = startedAt;
 					_this.timePaused = 0;
@@ -269,8 +271,6 @@
 				});
 			});
 
-			this.youtubeReady();
-
 			let volume = parseInt(localStorage.getItem("volume"));
 			volume = (typeof volume === "number") ? volume : 20;
 			$("#volumeSlider").val(volume);