Station.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885
  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">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 volume = this.player.getVolume() <= 0 ? 20 : 0;
  267. this.muted = !this.muted;
  268. $("#volumeSlider").val(volume);
  269. this.player.setVolume(volume);
  270. }
  271. },
  272. toggleLike: function() {
  273. let _this = this;
  274. if (_this.liked) _this.socket.emit('songs.unlike', _this.currentSong._id, data => {
  275. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  276. }); else _this.socket.emit('songs.like', _this.currentSong._id, data => {
  277. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  278. });
  279. },
  280. toggleDislike: function() {
  281. let _this = this;
  282. if (_this.disliked) return _this.socket.emit('songs.undislike', _this.currentSong._id, data => {
  283. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  284. });
  285. _this.socket.emit('songs.dislike', _this.currentSong._id, data => {
  286. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  287. });
  288. },
  289. addFirstPrivatePlaylistSongToQueue: function() {
  290. let _this = this;
  291. let isInQueue = false;
  292. let userId = _this.$parent.userId;
  293. if (_this.type === 'community') {
  294. _this.songsList.forEach((queueSong) => {
  295. if (queueSong.requestedBy === userId) isInQueue = true;
  296. });
  297. if (!isInQueue && _this.privatePlaylistQueueSelected) {
  298. _this.socket.emit('playlists.getFirstSong', _this.privatePlaylistQueueSelected, data => {
  299. if (data.status === 'success') {
  300. let songId = data.song._id;
  301. _this.automaticallyRequestedSongId = songId;
  302. _this.socket.emit('stations.addToQueue', _this.stationId, songId, data => {
  303. if (data.status === 'success') {
  304. _this.socket.emit('playlists.moveSongToBottom', _this.privatePlaylistQueueSelected, songId, data => {
  305. if (data.status === 'success') {}
  306. });
  307. }
  308. });
  309. }
  310. });
  311. }
  312. }
  313. },
  314. joinStation: function () {
  315. let _this = this;
  316. _this.socket.emit('stations.join', _this.stationId, res => {
  317. if (res.status === 'success') {
  318. _this.station = {
  319. displayName: res.data.displayName,
  320. description: res.data.description,
  321. privacy: res.data.privacy,
  322. partyMode: res.data.partyMode,
  323. owner: res.data.owner,
  324. privatePlaylist: res.data.privatePlaylist
  325. };
  326. _this.currentSong = (res.data.currentSong) ? res.data.currentSong : {};
  327. _this.type = res.data.type;
  328. _this.startedAt = res.data.startedAt;
  329. _this.paused = res.data.paused;
  330. _this.timePaused = res.data.timePaused;
  331. if (res.data.currentSong) {
  332. _this.noSong = false;
  333. _this.simpleSong = (res.data.currentSong.likes === -1 && res.data.currentSong.dislikes === -1);
  334. if (_this.simpleSong) {
  335. _this.currentSong.skipDuration = 0;
  336. }
  337. _this.youtubeReady();
  338. _this.playVideo();
  339. _this.socket.emit('songs.getOwnSongRatings', res.data.currentSong._id, data => {
  340. if (_this.currentSong._id === data.songId) {
  341. _this.liked = data.liked;
  342. _this.disliked = data.disliked;
  343. }
  344. });
  345. } else {
  346. if (_this.playerReady) _this.player.pauseVideo();
  347. _this.noSong = true;
  348. }
  349. if (_this.type === 'community') {
  350. _this.socket.emit('stations.getQueue', _this.stationId, data => {
  351. if (data.status === 'success') _this.songsList = data.queue;
  352. });
  353. }
  354. }
  355. _this.socket.emit('stations.getPlaylist', _this.stationId, res => {
  356. if (res.status == 'success') _this.songsList = res.data;
  357. });
  358. // UNIX client time before ping
  359. let beforePing = Date.now();
  360. _this.socket.emit('apis.ping', res => {
  361. // UNIX client time after ping
  362. let afterPing = Date.now();
  363. // Average time in MS it took between the server responding and the client receiving
  364. let connectionLatency = (afterPing - beforePing) / 2;
  365. console.log(connectionLatency, beforePing - afterPing);
  366. // UNIX server time
  367. let serverDate = res.date;
  368. // Difference between the server UNIX time and the client UNIX time after ping, with the connectionLatency added to the server UNIX time
  369. let difference = (serverDate + connectionLatency) - afterPing;
  370. console.log("Difference: ", difference);
  371. if (difference > 3000 || difference < -3000) {
  372. console.log("System time difference is bigger than 3 seconds.");
  373. }
  374. _this.systemDifference = difference;
  375. });
  376. });
  377. }
  378. },
  379. ready: function() {
  380. let _this = this;
  381. Date.now2 = function() {
  382. return new Date().getTime() + _this.systemDifference;
  383. };
  384. _this.stationId = _this.$route.params.id;
  385. window.stationInterval = 0;
  386. io.getSocket((socket) => {
  387. _this.socket = socket;
  388. io.removeAllListeners();
  389. if (_this.socket.connected) _this.joinStation();
  390. io.onConnect(() => {
  391. _this.joinStation();
  392. });
  393. _this.socket.emit('stations.find', _this.stationId, res => {
  394. if (res.status === 'error') {
  395. _this.$router.go('/404');
  396. Toast.methods.addToast(res.message, 3000);
  397. }
  398. });
  399. _this.socket.on('event:songs.next', data => {
  400. _this.previousSong = (_this.currentSong._id) ? _this.currentSong : null;
  401. _this.currentSong = (data.currentSong) ? data.currentSong : {};
  402. _this.startedAt = data.startedAt;
  403. _this.paused = data.paused;
  404. _this.timePaused = data.timePaused;
  405. if (data.currentSong) {
  406. _this.noSong = false;
  407. _this.simpleSong = (data.currentSong.likes === -1 && data.currentSong.dislikes === -1);
  408. if (_this.simpleSong) _this.currentSong.skipDuration = 0;
  409. if (!_this.playerReady) _this.youtubeReady();
  410. else _this.playVideo();
  411. _this.socket.emit('songs.getOwnSongRatings', data.currentSong._id, (data) => {
  412. if (_this.currentSong._id === data.songId) {
  413. _this.liked = data.liked;
  414. _this.disliked = data.disliked;
  415. }
  416. });
  417. } else {
  418. if (_this.playerReady) _this.player.pauseVideo();
  419. _this.noSong = true;
  420. }
  421. let isInQueue = false;
  422. let userId = _this.$parent.userId;
  423. _this.songsList.forEach((queueSong) => {
  424. if (queueSong.requestedBy === userId) isInQueue = true;
  425. });
  426. if (!isInQueue && _this.privatePlaylistQueueSelected && (_this.automaticallyRequestedSongId !== _this.currentSong._id || !_this.currentSong._id)) {
  427. _this.addFirstPrivatePlaylistSongToQueue();
  428. }
  429. });
  430. _this.socket.on('event:stations.pause', data => {
  431. _this.pauseLocalStation();
  432. });
  433. _this.socket.on('event:stations.resume', data => {
  434. _this.timePaused = data.timePaused;
  435. _this.resumeLocalStation();
  436. });
  437. _this.socket.on('event:song.like', data => {
  438. if (!this.noSong) {
  439. if (data.songId === _this.currentSong._id) {
  440. _this.currentSong.dislikes = data.dislikes;
  441. _this.currentSong.likes = data.likes;
  442. }
  443. }
  444. });
  445. _this.socket.on('event:song.dislike', data => {
  446. if (!this.noSong) {
  447. if (data.songId === _this.currentSong._id) {
  448. _this.currentSong.dislikes = data.dislikes;
  449. _this.currentSong.likes = data.likes;
  450. }
  451. }
  452. });
  453. _this.socket.on('event:song.unlike', data => {
  454. if (!this.noSong) {
  455. if (data.songId === _this.currentSong._id) {
  456. _this.currentSong.dislikes = data.dislikes;
  457. _this.currentSong.likes = data.likes;
  458. }
  459. }
  460. });
  461. _this.socket.on('event:song.undislike', data => {
  462. if (!this.noSong) {
  463. if (data.songId === _this.currentSong._id) {
  464. _this.currentSong.dislikes = data.dislikes;
  465. _this.currentSong.likes = data.likes;
  466. }
  467. }
  468. });
  469. _this.socket.on('event:song.newRatings', data => {
  470. if (!this.noSong) {
  471. if (data.songId === _this.currentSong._id) {
  472. _this.liked = data.liked;
  473. _this.disliked = data.disliked;
  474. }
  475. }
  476. });
  477. _this.socket.on('event:queue.update', queue => {
  478. if (this.type === 'community') this.songsList = queue;
  479. });
  480. _this.socket.on('event:song.voteSkipSong', () => {
  481. if (this.currentSong) this.currentSong.skipVotes++;
  482. });
  483. _this.socket.on('event:privatePlaylist.selected', (playlistId) => {
  484. if (this.type === 'community') {
  485. this.station.privatePlaylist = playlistId;
  486. }
  487. });
  488. _this.socket.on('event:partyMode.updated', (partyMode) => {
  489. if (this.type === 'community') {
  490. this.station.partyMode = partyMode;
  491. }
  492. });
  493. _this.socket.on('event:newOfficialPlaylist', (playlist) => {
  494. console.log(playlist);
  495. if (this.type === 'official') {
  496. this.songsList = playlist;
  497. }
  498. });
  499. });
  500. let volume = parseInt(localStorage.getItem("volume"));
  501. volume = (typeof volume === "number" && !isNaN(volume)) ? volume : 20;
  502. localStorage.setItem("volume", volume);
  503. $("#volumeSlider").val(volume);
  504. },
  505. components: {
  506. OfficialHeader,
  507. CommunityHeader,
  508. SongQueue,
  509. EditPlaylist,
  510. CreatePlaylist,
  511. EditStation,
  512. Report,
  513. SongsListSidebar,
  514. PlaylistSidebar,
  515. UsersSidebar
  516. }
  517. }
  518. </script>
  519. <style lang="scss">
  520. .no-song {
  521. color: #03A9F4;
  522. text-align: center;
  523. }
  524. #volumeSlider {
  525. padding: 0 15px;
  526. background: transparent;
  527. }
  528. .volume-slider-wrapper {
  529. margin-top: 0;
  530. position: relative;
  531. display: flex;
  532. align-items: center;
  533. }
  534. .material-icons { cursor: pointer; }
  535. .stationDisplayName {
  536. color: white !important;
  537. }
  538. .slideout {
  539. top: 50px;
  540. height: 100%;
  541. position: fixed;
  542. right: 0;
  543. width: 350px;
  544. background-color: white;
  545. box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
  546. .slideout-header {
  547. text-align: center;
  548. background-color: rgb(3, 169, 244) !important;
  549. margin: 0;
  550. padding-top: 5px;
  551. padding-bottom: 7px;
  552. color: white;
  553. }
  554. .slideout-content {
  555. height: 100%;
  556. }
  557. }
  558. .modal-large {
  559. width: 75%;
  560. }
  561. .station {
  562. flex: 1 0 auto;
  563. padding-top: 0.5vw;
  564. transition: all 0.1s;
  565. margin: 0 auto;
  566. max-width: 1280px;
  567. width: 90%;
  568. @media only screen and (min-width: 993px) {
  569. width: 70%;
  570. }
  571. @media only screen and (min-width: 601px) {
  572. width: 85%;
  573. }
  574. input[type=range] {
  575. -webkit-appearance: none;
  576. width: 100%;
  577. margin: 7.3px 0;
  578. }
  579. input[type=range]:focus {
  580. outline: none;
  581. }
  582. input[type=range]::-webkit-slider-runnable-track {
  583. width: 100%;
  584. height: 5.2px;
  585. cursor: pointer;
  586. box-shadow: 0;
  587. background: #c2c0c2;
  588. border-radius: 0;
  589. border: 0;
  590. }
  591. input[type=range]::-webkit-slider-thumb {
  592. box-shadow: 0;
  593. border: 0;
  594. height: 19px;
  595. width: 19px;
  596. border-radius: 15px;
  597. background: #03a9f4;
  598. cursor: pointer;
  599. -webkit-appearance: none;
  600. margin-top: -6.5px;
  601. }
  602. input[type=range]::-moz-range-track {
  603. width: 100%;
  604. height: 5.2px;
  605. cursor: pointer;
  606. box-shadow: 0;
  607. background: #c2c0c2;
  608. border-radius: 0;
  609. border: 0;
  610. }
  611. input[type=range]::-moz-range-thumb {
  612. box-shadow: 0;
  613. border: 0;
  614. height: 19px;
  615. width: 19px;
  616. border-radius: 15px;
  617. background: #03a9f4;
  618. cursor: pointer;
  619. -webkit-appearance: none;
  620. margin-top: -6.5px;
  621. }
  622. input[type=range]::-ms-track {
  623. width: 100%;
  624. height: 5.2px;
  625. cursor: pointer;
  626. box-shadow: 0;
  627. background: #c2c0c2;
  628. border-radius: 1.3px;
  629. }
  630. input[type=range]::-ms-fill-lower {
  631. background: #c2c0c2;
  632. border: 0;
  633. border-radius: 0;
  634. box-shadow: 0;
  635. }
  636. input[type=range]::-ms-fill-upper {
  637. background: #c2c0c2;
  638. border: 0;
  639. border-radius: 0;
  640. box-shadow: 0;
  641. }
  642. input[type=range]::-ms-thumb {
  643. box-shadow: 0;
  644. border: 0;
  645. height: 15px;
  646. width: 15px;
  647. border-radius: 15px;
  648. background: #03a9f4;
  649. cursor: pointer;
  650. -webkit-appearance: none;
  651. margin-top: 1.5px;
  652. }
  653. .video-container {
  654. position: relative;
  655. padding-bottom: 56.25%;
  656. height: 0;
  657. overflow: hidden;
  658. iframe {
  659. position: absolute;
  660. top: 0;
  661. left: 0;
  662. width: 100%;
  663. height: 100%;
  664. }
  665. }
  666. .video-col {
  667. padding-right: 0.75rem;
  668. padding-left: 0.75rem;
  669. }
  670. }
  671. .room-title {
  672. left: 50%;
  673. -webkit-transform: translateX(-50%);
  674. transform: translateX(-50%);
  675. font-size: 2.1em;
  676. }
  677. #ratings {
  678. span {
  679. font-size: 1.68rem;
  680. }
  681. i {
  682. color: #9e9e9e !important;
  683. cursor: pointer;
  684. transition: 0.1s color;
  685. }
  686. }
  687. #time-display {
  688. margin-top: 30px;
  689. float: right;
  690. }
  691. #thumbs_up:hover, #thumbs_up.liked {
  692. color: #87D37C !important;
  693. }
  694. #thumbs_down:hover, #thumbs_down.disliked {
  695. color: #EC644B !important;
  696. }
  697. #song-thumbnail {
  698. max-width: 100%;
  699. width: 85%;
  700. }
  701. .seeker-bar-container {
  702. position: relative;
  703. height: 5px;
  704. display: block;
  705. width: 100%;
  706. overflow: hidden;
  707. }
  708. .seeker-bar {
  709. top: 0;
  710. left: 0;
  711. bottom: 0;
  712. position: absolute;
  713. }
  714. ul {
  715. list-style: none;
  716. margin: 0;
  717. display: block;
  718. }
  719. h1, h2, h3, h4, h5, h6 {
  720. font-weight: 400;
  721. line-height: 1.1;
  722. }
  723. h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
  724. font-weight: inherit;
  725. }
  726. h1 {
  727. font-size: 4.2rem;
  728. line-height: 110%;
  729. margin: 2.1rem 0 1.68rem 0;
  730. }
  731. h2 {
  732. font-size: 3.56rem;
  733. line-height: 110%;
  734. margin: 1.78rem 0 1.424rem 0;
  735. }
  736. h3 {
  737. font-size: 2.92rem;
  738. line-height: 110%;
  739. margin: 1.46rem 0 1.168rem 0;
  740. }
  741. h4 {
  742. font-size: 2.28rem;
  743. line-height: 110%;
  744. margin: 1.14rem 0 0.912rem 0;
  745. }
  746. h5 {
  747. font-size: 1.64rem;
  748. line-height: 110%;
  749. margin: 0.82rem 0 0.656rem 0;
  750. }
  751. h6 {
  752. font-size: 1rem;
  753. line-height: 110%;
  754. margin: 0.5rem 0 0.4rem 0;
  755. }
  756. .thin {
  757. font-weight: 200;
  758. }
  759. .left {
  760. float: left !important;
  761. }
  762. .right {
  763. float: right !important;
  764. }
  765. .light-blue {
  766. background-color: #03a9f4 !important;
  767. }
  768. .white {
  769. background-color: #FFFFFF !important;
  770. }
  771. .btn-search {
  772. font-size: 14px;
  773. }
  774. .menu { padding: 0 10px; }
  775. .menu-list li a:hover { color: #000 !important; }
  776. .menu-list li {
  777. display: flex;
  778. justify-content: space-between;
  779. }
  780. .menu-list a {
  781. /*padding: 0 10px !important;*/
  782. }
  783. .menu-list a:hover {
  784. background-color : transparent;
  785. }
  786. .icons-group { display: flex; }
  787. #like, #dislike {
  788. position: relative;
  789. }
  790. .behind {
  791. z-index: -1;
  792. }
  793. .behind:focus {
  794. z-index: 0;
  795. }
  796. </style>