Station.vue 24 KB

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