Station.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894
  1. <template>
  2. <official-header v-if='type == "official"'></official-header>
  3. <community-header v-if='type == "community"'></community-header>
  4. <song-queue v-if='modals.addSongToQueue'></song-queue>
  5. <edit-playlist v-if='modals.editPlaylist'></edit-playlist>
  6. <create-playlist v-if='modals.createPlaylist'></create-playlist>
  7. <edit-station v-if='modals.editStation'></edit-station>
  8. <report v-if='modals.report'></report>
  9. <songs-list-sidebar v-if='sidebars.songslist'></songs-list-sidebar>
  10. <playlist-sidebar v-if='sidebars.playlist'></playlist-sidebar>
  11. <users-sidebar v-if='sidebars.users'></users-sidebar>
  12. <div class="station">
  13. <div v-show="noSong" class="no-song">
  14. <h1>No song is currently playing</h1>
  15. <h4 v-if='type === "community" && station.partyMode'>
  16. <a href='#' class='no-song' @click='modals.addSongToQueue = true'>Add a Song to the Queue</a>
  17. </h4>
  18. <h4 v-if='type === "community" && !station.partyMode && $parent.userId === station.owner && !station.privatePlaylist'>
  19. <a href='#' class='no-song' @click='sidebars.playlist = true'>Play a private playlist</a>
  20. </h4>
  21. <h1 v-if='type === "community" && !station.partyMode && $parent.userId === station.owner && station.privatePlaylist'>Maybe you can add some songs to your selected private playlist and then press the skip button</h1>
  22. </div>
  23. <div class="columns is-mobile" v-show="!noSong">
  24. <div class="column is-8-desktop is-offset-2-desktop is-12-mobile">
  25. <div class="video-container">
  26. <div id="player"></div>
  27. <div class="seeker-bar-container white" id="preview-progress">
  28. <div class="seeker-bar light-blue" style="width: 0%;"></div>
  29. </div>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="columns is-mobile" v-show="!noSong">
  34. <div class="column is-8-desktop is-offset-2-desktop is-12-mobile">
  35. <div class="columns is-mobile">
  36. <div class="column is-12-mobile" v-bind:class="{'is-8-desktop': !simpleSong}">
  37. <h4 id="time-display">{{timeElapsed}} / {{formatTime(currentSong.duration)}}</h4>
  38. <h3>{{currentSong.title}}</h3>
  39. <h4 class="thin" style="margin-left: 0">{{currentSong.artists}}</h4>
  40. <div class="columns is-mobile">
  41. <form style="margin-top: 12px; margin-bottom: 0;" action="#" class="column is-7-desktop is-4-mobile">
  42. <p class='volume-slider-wrapper'>
  43. <i class="material-icons" @click='toggleMute()' v-if='muted'>volume_mute</i>
  44. <i class="material-icons" @click='toggleMute()' v-else>volume_down</i>
  45. <input type="range" id="volumeSlider" min="0" max="100" class="active" v-on:change="changeVolume()" v-on:input="changeVolume()">
  46. <i class="material-icons" @click='toggleMaxVolume()'>volume_up</i>
  47. </p>
  48. </form>
  49. <div class="column is-8-mobile is-5-desktop" style="float: right;">
  50. <ul id="ratings" v-if="currentSong.likes !== -1 && currentSong.dislikes !== -1">
  51. <li id="like" class="right" @click="toggleLike()">
  52. <span class="flow-text">{{currentSong.likes}} </span>
  53. <i id="thumbs_up" class="material-icons grey-text" v-bind:class="{ liked: liked }">thumb_up</i>
  54. <a class='absolute-a behind' @click="toggleLike()" href='#'></a>
  55. </li>
  56. <li style="margin-right: 10px;" id="dislike" class="right" @click="toggleDislike()">
  57. <span class="flow-text">{{currentSong.dislikes}} </span>
  58. <i id="thumbs_down" class="material-icons grey-text" v-bind:class="{ disliked: disliked }">thumb_down</i>
  59. <a class='absolute-a behind' @click="toggleDislike()" href='#'></a>
  60. </li>
  61. </ul>
  62. </div>
  63. </div>
  64. </div>
  65. <div class="column is-4-desktop" v-if="!simpleSong">
  66. <img class="image" id="song-thumbnail" style="margin-top: 10px !important" :src="currentSong.thumbnail" alt="Song Thumbnail" onerror="this.src='/assets/notes-transparent.png'" />
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </template>
  73. <script>
  74. import { Toast } from 'vue-roaster';
  75. import SongQueue from '../Modals/AddSongToQueue.vue';
  76. import EditPlaylist from '../Modals/Playlists/Edit.vue';
  77. import CreatePlaylist from '../Modals/Playlists/Create.vue';
  78. import EditStation from '../Modals/EditStation.vue';
  79. import Report from '../Modals/Report.vue';
  80. import SongsListSidebar from '../Sidebars/SongsList.vue';
  81. import PlaylistSidebar from '../Sidebars/Playlist.vue';
  82. import UsersSidebar from '../Sidebars/UsersList.vue';
  83. import OfficialHeader from './OfficialHeader.vue';
  84. import CommunityHeader from './CommunityHeader.vue';
  85. import io from '../../io';
  86. export default {
  87. data() {
  88. return {
  89. type: '',
  90. playerReady: false,
  91. previousSong: null,
  92. currentSong: {},
  93. player: undefined,
  94. timePaused: 0,
  95. paused: false,
  96. muted: false,
  97. timeElapsed: '0:00',
  98. liked: false,
  99. disliked: false,
  100. modals: {
  101. addSongToQueue: false,
  102. editPlaylist: false,
  103. createPlaylist: false,
  104. editStation: false,
  105. report: false
  106. },
  107. sidebars: {
  108. songslist: false,
  109. users: false,
  110. playlist: false
  111. },
  112. noSong: false,
  113. simpleSong: false,
  114. songsList: [],
  115. timeBeforePause: 0,
  116. station: {},
  117. skipVotes: 0,
  118. privatePlaylistQueueSelected: null,
  119. automaticallyRequestedSongId: null,
  120. systemDifference: 0
  121. }
  122. },
  123. methods: {
  124. editPlaylist: function (id) {
  125. this.playlistBeingEdited = id;
  126. this.modals.editPlaylist = !this.modals.editPlaylist;
  127. },
  128. toggleSidebar: function (type) {
  129. Object.keys(this.sidebars).forEach(sidebar => {
  130. if (sidebar !== type) this.sidebars[sidebar] = false;
  131. else this.sidebars[type] = !this.sidebars[type];
  132. });
  133. },
  134. youtubeReady: function() {
  135. let local = this;
  136. if (!local.player) {
  137. local.player = new YT.Player("player", {
  138. height: 270,
  139. width: 480,
  140. videoId: local.currentSong._id,
  141. startSeconds: local.getTimeElapsed() / 1000 + local.currentSong.skipDuration,
  142. playerVars: {controls: 0, iv_load_policy: 3, rel: 0, showinfo: 0},
  143. events: {
  144. 'onReady': function (event) {
  145. local.playerReady = true;
  146. let volume = parseInt(localStorage.getItem("volume"));
  147. volume = (typeof volume === "number") ? volume : 20;
  148. local.player.setVolume(volume);
  149. if (volume > 0) local.player.unMute();
  150. local.playVideo();
  151. },
  152. 'onStateChange': function (event) {
  153. if (event.data === 1 && local.videoLoading === true) {
  154. local.videoLoading = false;
  155. local.player.seekTo(local.getTimeElapsed() / 1000 + local.currentSong.skipDuration, true);
  156. if (local.paused) local.player.pauseVideo();
  157. } else if (event.data === 1 && local.paused) {
  158. local.player.seekTo(local.timeBeforePause / 1000, true);
  159. local.player.pauseVideo();
  160. }
  161. if (event.data === 2 && !local.paused && !local.noSong && (local.player.getDuration() / 1000) < local.currentSong.duration) {
  162. local.player.seekTo(local.getTimeElapsed() / 1000 + local.currentSong.skipDuration, true);
  163. local.player.playVideo();
  164. }
  165. }
  166. }
  167. });
  168. }
  169. },
  170. getTimeElapsed: function() {
  171. let local = this;
  172. if (local.currentSong) return Date.now2() - local.startedAt - local.timePaused;
  173. else return 0;
  174. },
  175. playVideo: function() {
  176. let local = this;
  177. if (local.playerReady) {
  178. local.videoLoading = true;
  179. local.player.loadVideoById(local.currentSong._id, local.getTimeElapsed() / 1000 + local.currentSong.skipDuration);
  180. if (local.currentSong.artists) local.currentSong.artists = local.currentSong.artists.join(", ");
  181. if (window.stationInterval !== 0) clearInterval(window.stationInterval);
  182. window.stationInterval = setInterval(function () {
  183. local.resizeSeekerbar();
  184. local.calculateTimeElapsed();
  185. }, 250);
  186. }
  187. },
  188. resizeSeekerbar: function() {
  189. let local = this;
  190. if (!local.paused) {
  191. $(".seeker-bar").width(parseInt(((local.getTimeElapsed() / 1000) / local.currentSong.duration * 100)) + "%");
  192. }
  193. },
  194. formatTime: function(duration) {
  195. let d = moment.duration(duration, 'seconds');
  196. if (duration < 0) return "0:00";
  197. return ((d.hours() > 0) ? (d.hours() < 10 ? ("0" + d.hours() + ":") : (d.hours() + ":")) : "") + (d.minutes() + ":") + (d.seconds() < 10 ? ("0" + d.seconds()) : d.seconds());
  198. },
  199. calculateTimeElapsed: function() {
  200. let local = this;
  201. let currentTime = Date.now2();
  202. if (local.currentTime !== undefined && local.paused) {
  203. local.timePaused += (Date.now2() - local.currentTime);
  204. local.currentTime = undefined;
  205. }
  206. let duration = (Date.now2() - local.startedAt - local.timePaused) / 1000;
  207. let songDuration = local.currentSong.duration;
  208. if (songDuration <= duration) local.player.pauseVideo();
  209. if ((!local.paused) && duration <= songDuration) local.timeElapsed = local.formatTime(duration);
  210. },
  211. changeVolume: function() {
  212. let local = this;
  213. let volume = $("#volumeSlider").val();
  214. localStorage.setItem("volume", volume);
  215. if (local.playerReady) {
  216. local.player.setVolume(volume);
  217. if (volume > 0) local.player.unMute();
  218. }
  219. },
  220. resumeLocalStation: function() {
  221. this.paused = false;
  222. if (!this.noSong) {
  223. if (this.playerReady) {
  224. this.player.seekTo(this.getTimeElapsed() / 1000 + this.currentSong.skipDuration);
  225. this.player.playVideo();
  226. }
  227. }
  228. },
  229. pauseLocalStation: function() {
  230. this.paused = true;
  231. if (!this.noSong) {
  232. this.timeBeforePause = this.getTimeElapsed();
  233. if (this.playerReady) this.player.pauseVideo();
  234. }
  235. },
  236. skipStation: function () {
  237. let _this = this;
  238. _this.socket.emit('stations.forceSkip', _this.stationId, data => {
  239. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  240. else Toast.methods.addToast('Successfully skipped the station\'s current song.', 4000);
  241. });
  242. },
  243. voteSkipStation: function () {
  244. let _this = this;
  245. _this.socket.emit('stations.voteSkip', _this.stationId, data => {
  246. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  247. else Toast.methods.addToast('Successfully voted to skip the current song.', 4000);
  248. });
  249. },
  250. resumeStation: function () {
  251. let _this = this;
  252. _this.socket.emit('stations.resume', _this.stationId, data => {
  253. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  254. else Toast.methods.addToast('Successfully resumed the station.', 4000);
  255. });
  256. },
  257. pauseStation: function () {
  258. let _this = this;
  259. _this.socket.emit('stations.pause', _this.stationId, data => {
  260. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  261. else Toast.methods.addToast('Successfully paused the station.', 4000);
  262. });
  263. },
  264. toggleMute: function () {
  265. if (this.playerReady) {
  266. let previousVolume = parseInt(localStorage.getItem("volume"));
  267. let volume = this.player.getVolume() <= 0 ? previousVolume : 0;
  268. this.muted = !this.muted;
  269. $("#volumeSlider").val(volume);
  270. this.player.setVolume(volume);
  271. }
  272. },
  273. toggleMaxVolume: function () {
  274. if (this.playerReady) {
  275. let previousVolume = parseInt(localStorage.getItem("volume"));
  276. let volume = this.player.getVolume() <= previousVolume ? 100 : previousVolume;
  277. $("#volumeSlider").val(volume);
  278. this.player.setVolume(volume);
  279. }
  280. },
  281. toggleLike: function() {
  282. let _this = this;
  283. if (_this.liked) _this.socket.emit('songs.unlike', _this.currentSong._id, data => {
  284. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  285. }); else _this.socket.emit('songs.like', _this.currentSong._id, data => {
  286. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  287. });
  288. },
  289. toggleDislike: function() {
  290. let _this = this;
  291. if (_this.disliked) return _this.socket.emit('songs.undislike', _this.currentSong._id, data => {
  292. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  293. });
  294. _this.socket.emit('songs.dislike', _this.currentSong._id, data => {
  295. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  296. });
  297. },
  298. addFirstPrivatePlaylistSongToQueue: function() {
  299. let _this = this;
  300. let isInQueue = false;
  301. let userId = _this.$parent.userId;
  302. if (_this.type === 'community') {
  303. _this.songsList.forEach((queueSong) => {
  304. if (queueSong.requestedBy === userId) isInQueue = true;
  305. });
  306. if (!isInQueue && _this.privatePlaylistQueueSelected) {
  307. _this.socket.emit('playlists.getFirstSong', _this.privatePlaylistQueueSelected, data => {
  308. if (data.status === 'success') {
  309. let songId = data.song._id;
  310. _this.automaticallyRequestedSongId = songId;
  311. _this.socket.emit('stations.addToQueue', _this.stationId, songId, data => {
  312. if (data.status === 'success') {
  313. _this.socket.emit('playlists.moveSongToBottom', _this.privatePlaylistQueueSelected, songId, data => {
  314. if (data.status === 'success') {}
  315. });
  316. }
  317. });
  318. }
  319. });
  320. }
  321. }
  322. },
  323. joinStation: function () {
  324. let _this = this;
  325. _this.socket.emit('stations.join', _this.stationId, res => {
  326. if (res.status === 'success') {
  327. _this.station = {
  328. displayName: res.data.displayName,
  329. description: res.data.description,
  330. privacy: res.data.privacy,
  331. partyMode: res.data.partyMode,
  332. owner: res.data.owner,
  333. privatePlaylist: res.data.privatePlaylist
  334. };
  335. _this.currentSong = (res.data.currentSong) ? res.data.currentSong : {};
  336. _this.type = res.data.type;
  337. _this.startedAt = res.data.startedAt;
  338. _this.paused = res.data.paused;
  339. _this.timePaused = res.data.timePaused;
  340. if (res.data.currentSong) {
  341. _this.noSong = false;
  342. _this.simpleSong = (res.data.currentSong.likes === -1 && res.data.currentSong.dislikes === -1);
  343. if (_this.simpleSong) {
  344. _this.currentSong.skipDuration = 0;
  345. }
  346. _this.youtubeReady();
  347. _this.playVideo();
  348. _this.socket.emit('songs.getOwnSongRatings', res.data.currentSong._id, data => {
  349. if (_this.currentSong._id === data.songId) {
  350. _this.liked = data.liked;
  351. _this.disliked = data.disliked;
  352. }
  353. });
  354. } else {
  355. if (_this.playerReady) _this.player.pauseVideo();
  356. _this.noSong = true;
  357. }
  358. if (_this.type === 'community') {
  359. _this.socket.emit('stations.getQueue', _this.stationId, data => {
  360. if (data.status === 'success') _this.songsList = data.queue;
  361. });
  362. }
  363. }
  364. _this.socket.emit('stations.getPlaylist', _this.stationId, res => {
  365. if (res.status == 'success') _this.songsList = res.data;
  366. });
  367. // UNIX client time before ping
  368. let beforePing = Date.now();
  369. _this.socket.emit('apis.ping', res => {
  370. // UNIX client time after ping
  371. let afterPing = Date.now();
  372. // Average time in MS it took between the server responding and the client receiving
  373. let connectionLatency = (afterPing - beforePing) / 2;
  374. console.log(connectionLatency, beforePing - afterPing);
  375. // UNIX server time
  376. let serverDate = res.date;
  377. // Difference between the server UNIX time and the client UNIX time after ping, with the connectionLatency added to the server UNIX time
  378. let difference = (serverDate + connectionLatency) - afterPing;
  379. console.log("Difference: ", difference);
  380. if (difference > 3000 || difference < -3000) {
  381. console.log("System time difference is bigger than 3 seconds.");
  382. }
  383. _this.systemDifference = difference;
  384. });
  385. });
  386. }
  387. },
  388. ready: function() {
  389. let _this = this;
  390. Date.now2 = function() {
  391. return new Date().getTime() + _this.systemDifference;
  392. };
  393. _this.stationId = _this.$route.params.id;
  394. window.stationInterval = 0;
  395. io.getSocket((socket) => {
  396. _this.socket = socket;
  397. io.removeAllListeners();
  398. if (_this.socket.connected) _this.joinStation();
  399. io.onConnect(() => {
  400. _this.joinStation();
  401. });
  402. _this.socket.emit('stations.find', _this.stationId, res => {
  403. if (res.status === 'error') {
  404. _this.$router.go('/404');
  405. Toast.methods.addToast(res.message, 3000);
  406. }
  407. });
  408. _this.socket.on('event:songs.next', data => {
  409. _this.previousSong = (_this.currentSong._id) ? _this.currentSong : null;
  410. _this.currentSong = (data.currentSong) ? data.currentSong : {};
  411. _this.startedAt = data.startedAt;
  412. _this.paused = data.paused;
  413. _this.timePaused = data.timePaused;
  414. if (data.currentSong) {
  415. _this.noSong = false;
  416. _this.simpleSong = (data.currentSong.likes === -1 && data.currentSong.dislikes === -1);
  417. if (_this.simpleSong) _this.currentSong.skipDuration = 0;
  418. if (!_this.playerReady) _this.youtubeReady();
  419. else _this.playVideo();
  420. _this.socket.emit('songs.getOwnSongRatings', data.currentSong._id, (data) => {
  421. if (_this.currentSong._id === data.songId) {
  422. _this.liked = data.liked;
  423. _this.disliked = data.disliked;
  424. }
  425. });
  426. } else {
  427. if (_this.playerReady) _this.player.pauseVideo();
  428. _this.noSong = true;
  429. }
  430. let isInQueue = false;
  431. let userId = _this.$parent.userId;
  432. _this.songsList.forEach((queueSong) => {
  433. if (queueSong.requestedBy === userId) isInQueue = true;
  434. });
  435. if (!isInQueue && _this.privatePlaylistQueueSelected && (_this.automaticallyRequestedSongId !== _this.currentSong._id || !_this.currentSong._id)) {
  436. _this.addFirstPrivatePlaylistSongToQueue();
  437. }
  438. });
  439. _this.socket.on('event:stations.pause', data => {
  440. _this.pauseLocalStation();
  441. });
  442. _this.socket.on('event:stations.resume', data => {
  443. _this.timePaused = data.timePaused;
  444. _this.resumeLocalStation();
  445. });
  446. _this.socket.on('event:song.like', data => {
  447. if (!this.noSong) {
  448. if (data.songId === _this.currentSong._id) {
  449. _this.currentSong.dislikes = data.dislikes;
  450. _this.currentSong.likes = data.likes;
  451. }
  452. }
  453. });
  454. _this.socket.on('event:song.dislike', data => {
  455. if (!this.noSong) {
  456. if (data.songId === _this.currentSong._id) {
  457. _this.currentSong.dislikes = data.dislikes;
  458. _this.currentSong.likes = data.likes;
  459. }
  460. }
  461. });
  462. _this.socket.on('event:song.unlike', data => {
  463. if (!this.noSong) {
  464. if (data.songId === _this.currentSong._id) {
  465. _this.currentSong.dislikes = data.dislikes;
  466. _this.currentSong.likes = data.likes;
  467. }
  468. }
  469. });
  470. _this.socket.on('event:song.undislike', data => {
  471. if (!this.noSong) {
  472. if (data.songId === _this.currentSong._id) {
  473. _this.currentSong.dislikes = data.dislikes;
  474. _this.currentSong.likes = data.likes;
  475. }
  476. }
  477. });
  478. _this.socket.on('event:song.newRatings', data => {
  479. if (!this.noSong) {
  480. if (data.songId === _this.currentSong._id) {
  481. _this.liked = data.liked;
  482. _this.disliked = data.disliked;
  483. }
  484. }
  485. });
  486. _this.socket.on('event:queue.update', queue => {
  487. if (this.type === 'community') this.songsList = queue;
  488. });
  489. _this.socket.on('event:song.voteSkipSong', () => {
  490. if (this.currentSong) this.currentSong.skipVotes++;
  491. });
  492. _this.socket.on('event:privatePlaylist.selected', (playlistId) => {
  493. if (this.type === 'community') {
  494. this.station.privatePlaylist = playlistId;
  495. }
  496. });
  497. _this.socket.on('event:partyMode.updated', (partyMode) => {
  498. if (this.type === 'community') {
  499. this.station.partyMode = partyMode;
  500. }
  501. });
  502. _this.socket.on('event:newOfficialPlaylist', (playlist) => {
  503. console.log(playlist);
  504. if (this.type === 'official') {
  505. this.songsList = playlist;
  506. }
  507. });
  508. });
  509. let volume = parseInt(localStorage.getItem("volume"));
  510. volume = (typeof volume === "number" && !isNaN(volume)) ? volume : 20;
  511. localStorage.setItem("volume", volume);
  512. $("#volumeSlider").val(volume);
  513. },
  514. components: {
  515. OfficialHeader,
  516. CommunityHeader,
  517. SongQueue,
  518. EditPlaylist,
  519. CreatePlaylist,
  520. EditStation,
  521. Report,
  522. SongsListSidebar,
  523. PlaylistSidebar,
  524. UsersSidebar
  525. }
  526. }
  527. </script>
  528. <style lang="scss">
  529. .no-song {
  530. color: #03A9F4;
  531. text-align: center;
  532. }
  533. #volumeSlider {
  534. padding: 0 15px;
  535. background: transparent;
  536. }
  537. .volume-slider-wrapper {
  538. margin-top: 0;
  539. position: relative;
  540. display: flex;
  541. align-items: center;
  542. }
  543. .material-icons { cursor: pointer; }
  544. .stationDisplayName {
  545. color: white !important;
  546. }
  547. .slideout {
  548. top: 50px;
  549. height: 100%;
  550. position: fixed;
  551. right: 0;
  552. width: 350px;
  553. background-color: white;
  554. box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
  555. .slideout-header {
  556. text-align: center;
  557. background-color: rgb(3, 169, 244) !important;
  558. margin: 0;
  559. padding-top: 5px;
  560. padding-bottom: 7px;
  561. color: white;
  562. }
  563. .slideout-content {
  564. height: 100%;
  565. }
  566. }
  567. .modal-large {
  568. width: 75%;
  569. }
  570. .station {
  571. flex: 1 0 auto;
  572. padding-top: 0.5vw;
  573. transition: all 0.1s;
  574. margin: 0 auto;
  575. max-width: 1280px;
  576. width: 90%;
  577. @media only screen and (min-width: 993px) {
  578. width: 70%;
  579. }
  580. @media only screen and (min-width: 601px) {
  581. width: 85%;
  582. }
  583. input[type=range] {
  584. -webkit-appearance: none;
  585. width: 100%;
  586. margin: 7.3px 0;
  587. }
  588. input[type=range]:focus {
  589. outline: none;
  590. }
  591. input[type=range]::-webkit-slider-runnable-track {
  592. width: 100%;
  593. height: 5.2px;
  594. cursor: pointer;
  595. box-shadow: 0;
  596. background: #c2c0c2;
  597. border-radius: 0;
  598. border: 0;
  599. }
  600. input[type=range]::-webkit-slider-thumb {
  601. box-shadow: 0;
  602. border: 0;
  603. height: 19px;
  604. width: 19px;
  605. border-radius: 15px;
  606. background: #03a9f4;
  607. cursor: pointer;
  608. -webkit-appearance: none;
  609. margin-top: -6.5px;
  610. }
  611. input[type=range]::-moz-range-track {
  612. width: 100%;
  613. height: 5.2px;
  614. cursor: pointer;
  615. box-shadow: 0;
  616. background: #c2c0c2;
  617. border-radius: 0;
  618. border: 0;
  619. }
  620. input[type=range]::-moz-range-thumb {
  621. box-shadow: 0;
  622. border: 0;
  623. height: 19px;
  624. width: 19px;
  625. border-radius: 15px;
  626. background: #03a9f4;
  627. cursor: pointer;
  628. -webkit-appearance: none;
  629. margin-top: -6.5px;
  630. }
  631. input[type=range]::-ms-track {
  632. width: 100%;
  633. height: 5.2px;
  634. cursor: pointer;
  635. box-shadow: 0;
  636. background: #c2c0c2;
  637. border-radius: 1.3px;
  638. }
  639. input[type=range]::-ms-fill-lower {
  640. background: #c2c0c2;
  641. border: 0;
  642. border-radius: 0;
  643. box-shadow: 0;
  644. }
  645. input[type=range]::-ms-fill-upper {
  646. background: #c2c0c2;
  647. border: 0;
  648. border-radius: 0;
  649. box-shadow: 0;
  650. }
  651. input[type=range]::-ms-thumb {
  652. box-shadow: 0;
  653. border: 0;
  654. height: 15px;
  655. width: 15px;
  656. border-radius: 15px;
  657. background: #03a9f4;
  658. cursor: pointer;
  659. -webkit-appearance: none;
  660. margin-top: 1.5px;
  661. }
  662. .video-container {
  663. position: relative;
  664. padding-bottom: 56.25%;
  665. height: 0;
  666. overflow: hidden;
  667. iframe {
  668. position: absolute;
  669. top: 0;
  670. left: 0;
  671. width: 100%;
  672. height: 100%;
  673. }
  674. }
  675. .video-col {
  676. padding-right: 0.75rem;
  677. padding-left: 0.75rem;
  678. }
  679. }
  680. .room-title {
  681. left: 50%;
  682. -webkit-transform: translateX(-50%);
  683. transform: translateX(-50%);
  684. font-size: 2.1em;
  685. }
  686. #ratings {
  687. span {
  688. font-size: 1.68rem;
  689. }
  690. i {
  691. color: #9e9e9e !important;
  692. cursor: pointer;
  693. transition: 0.1s color;
  694. }
  695. }
  696. #time-display {
  697. margin-top: 30px;
  698. float: right;
  699. }
  700. #thumbs_up:hover, #thumbs_up.liked {
  701. color: #87D37C !important;
  702. }
  703. #thumbs_down:hover, #thumbs_down.disliked {
  704. color: #EC644B !important;
  705. }
  706. #song-thumbnail {
  707. max-width: 100%;
  708. width: 85%;
  709. }
  710. .seeker-bar-container {
  711. position: relative;
  712. height: 5px;
  713. display: block;
  714. width: 100%;
  715. overflow: hidden;
  716. }
  717. .seeker-bar {
  718. top: 0;
  719. left: 0;
  720. bottom: 0;
  721. position: absolute;
  722. }
  723. ul {
  724. list-style: none;
  725. margin: 0;
  726. display: block;
  727. }
  728. h1, h2, h3, h4, h5, h6 {
  729. font-weight: 400;
  730. line-height: 1.1;
  731. }
  732. h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
  733. font-weight: inherit;
  734. }
  735. h1 {
  736. font-size: 4.2rem;
  737. line-height: 110%;
  738. margin: 2.1rem 0 1.68rem 0;
  739. }
  740. h2 {
  741. font-size: 3.56rem;
  742. line-height: 110%;
  743. margin: 1.78rem 0 1.424rem 0;
  744. }
  745. h3 {
  746. font-size: 2.92rem;
  747. line-height: 110%;
  748. margin: 1.46rem 0 1.168rem 0;
  749. }
  750. h4 {
  751. font-size: 2.28rem;
  752. line-height: 110%;
  753. margin: 1.14rem 0 0.912rem 0;
  754. }
  755. h5 {
  756. font-size: 1.64rem;
  757. line-height: 110%;
  758. margin: 0.82rem 0 0.656rem 0;
  759. }
  760. h6 {
  761. font-size: 1rem;
  762. line-height: 110%;
  763. margin: 0.5rem 0 0.4rem 0;
  764. }
  765. .thin {
  766. font-weight: 200;
  767. }
  768. .left {
  769. float: left !important;
  770. }
  771. .right {
  772. float: right !important;
  773. }
  774. .light-blue {
  775. background-color: #03a9f4 !important;
  776. }
  777. .white {
  778. background-color: #FFFFFF !important;
  779. }
  780. .btn-search {
  781. font-size: 14px;
  782. }
  783. .menu { padding: 0 10px; }
  784. .menu-list li a:hover { color: #000 !important; }
  785. .menu-list li {
  786. display: flex;
  787. justify-content: space-between;
  788. }
  789. .menu-list a {
  790. /*padding: 0 10px !important;*/
  791. }
  792. .menu-list a:hover {
  793. background-color : transparent;
  794. }
  795. .icons-group { display: flex; }
  796. #like, #dislike {
  797. position: relative;
  798. }
  799. .behind {
  800. z-index: -1;
  801. }
  802. .behind:focus {
  803. z-index: 0;
  804. }
  805. </style>