@@ -238,16 +245,12 @@ export default {
});
},
handleConnection(e) {
- // console.log('getPlaying', e);
const jsonData = JSON.parse(e.data);
- // console.log('jsonData', jsonData);
const data =
// Второй ответ
jsonData?.pub?.data ||
// Первый ответ
jsonData?.connect?.subs?.['station:it-radio']?.publications?.[0]?.data;
- // console.log('getPlaying', data);
- // console.log(data);
if (!data) return;
if (this.currentPlay.live) {
@@ -255,12 +258,9 @@ export default {
const dataUrl = data.np.station.listen_url;
// Объект с данными музыки
const dataSong = data.np.now_playing.song;
- // console.log(dataSong);
const playerUrl = this.player.target.src;
if (dataUrl !== playerUrl) {
- // console.log('data.np.station.listen_url', dataUrl);
this.$store.dispatch('changePlayer', dataUrl);
- // console.log(this.player);
this.actionCurrentPlay(dataSong);
}
if (dataSong.id !== this.currentPlay.id) {
@@ -269,7 +269,7 @@ export default {
}
},
actionCurrentPlay(song) {
- // console.log('actionCurrentPlay', data);
+ console.log('actionCurrentPlay', song);
const currentPlay = {
...this.currentPlay, // Инфа про текущий трек
...song,
@@ -278,7 +278,6 @@ export default {
live: true,
currentIndex: null,
};
- // console.log('params in getPlaying ', params);
// delete params.unique_id;
this.$store.dispatch('setCurrentPlay', currentPlay);
},
diff --git a/client/src/router/index.js b/client/src/router/index.js
index 9e29984..cd9f072 100644
--- a/client/src/router/index.js
+++ b/client/src/router/index.js
@@ -49,7 +49,7 @@ export default route(function (/* { store, ssrContext } */) {
});
Router.beforeEach((to, from, next) => {
- console.log(process.env.SERVER);
+ // console.log(process.env.SERVER);
//уточнить зачем нужен process.env.SERVER
if (to.meta.isAuth && !process.env.SERVER) {
if (store.state.user) {