Station.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831
  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. <queue-sidebar v-if='sidebars.queue'></queue-sidebar>
  10. <official-queue-sidebar v-if='sidebars.officialqueue'></official-queue-sidebar>
  11. <playlist-sidebar v-if='sidebars.playlist'></playlist-sidebar>
  12. <users-sidebar v-if='sidebars.users'></users-sidebar>
  13. <div class="station">
  14. <div v-show="noSong" class="no-song">
  15. <h1>No song is currently playing</h1>
  16. <h4 v-if='type === "community" && station.partyMode'>
  17. <a href='#' class='no-song' @click='sidebars.queue = true'>Add a Song to the Queue</a>
  18. </h4>
  19. <h4 v-if='type === "community" && !station.partyMode && $parent.userId === station.owner && !station.privatePlaylist'>
  20. <a href='#' class='no-song' @click='sidebars.playlist = true'>Play a private playlist</a>
  21. </h4>
  22. <h1 v-if='type === "community" && !station.partyMode && $parent.userId === station.owner && station.privatePlaylist'>Maybe you can add some songs to your selected private playlist</h1>
  23. </div>
  24. <div class="columns is-mobile" v-show="!noSong">
  25. <div class="column is-8-desktop is-offset-2-desktop is-12-mobile">
  26. <div class="video-container">
  27. <div id="player"></div>
  28. <div class="seeker-bar-container white" id="preview-progress">
  29. <div class="seeker-bar light-blue" style="width: 0%;"></div>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="columns is-mobile" v-show="!noSong">
  35. <div class="column is-8-desktop is-offset-2-desktop is-12-mobile">
  36. <div class="columns is-mobile">
  37. <div class="column is-12-mobile" v-bind:class="{'is-8-desktop': !simpleSong}">
  38. <h4 id="time-display">{{timeElapsed}} / {{formatTime(currentSong.duration)}}</h4>
  39. <h3>{{currentSong.title}}</h3>
  40. <h4 class="thin" style="margin-left: 0">{{currentSong.artists}}</h4>
  41. <div class="columns is-mobile">
  42. <form style="margin-top: 12px; margin-bottom: 0;" action="#" class="column is-7-desktop is-4-mobile">
  43. <p class='volume-slider-wrapper'>
  44. <i class="material-icons">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 QueueSidebar from '../Sidebars/Queue.vue';
  81. import OfficialQueueSidebar from '../Sidebars/OfficialQueue.vue';
  82. import PlaylistSidebar from '../Sidebars/Playlist.vue';
  83. import UsersSidebar from '../Sidebars/UsersList.vue';
  84. import OfficialHeader from './OfficialHeader.vue';
  85. import CommunityHeader from './CommunityHeader.vue';
  86. import io from '../../io';
  87. export default {
  88. data() {
  89. return {
  90. type: '',
  91. playerReady: false,
  92. previousSong: null,
  93. currentSong: {},
  94. player: undefined,
  95. timePaused: 0,
  96. paused: 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. queue: false,
  109. officialqueue: false,
  110. users: false,
  111. playlist: false
  112. },
  113. noSong: false,
  114. simpleSong: false,
  115. queue: [],
  116. timeBeforePause: 0,
  117. station: {},
  118. skipVotes: 0,
  119. privatePlaylistQueueSelected: null,
  120. automaticallyRequestedSongId: null
  121. }
  122. },
  123. methods: {
  124. editPlaylist: function (id) {
  125. this.playlistBeingEdited = id;
  126. this.toggleModal('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) {
  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.now() - 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. return ((d.hours() > 0) ? (d.hours() < 10 ? ("0" + d.hours() + ":") : (d.hours() + ":")) : "") + (d.minutes() + ":") + (d.seconds() < 10 ? ("0" + d.seconds()) : d.seconds());
  197. },
  198. calculateTimeElapsed: function() {
  199. let local = this;
  200. let currentTime = Date.now();
  201. if (local.currentTime !== undefined && local.paused) {
  202. local.timePaused += (Date.now() - local.currentTime);
  203. local.currentTime = undefined;
  204. }
  205. let duration = (Date.now() - local.startedAt - local.timePaused) / 1000;
  206. let songDuration = local.currentSong.duration;
  207. if (songDuration <= duration) local.player.pauseVideo();
  208. if ((!local.paused) && duration <= songDuration) local.timeElapsed = local.formatTime(duration);
  209. },
  210. changeVolume: function() {
  211. let local = this;
  212. let volume = $("#volumeSlider").val();
  213. localStorage.setItem("volume", volume);
  214. if (local.playerReady) {
  215. local.player.setVolume(volume);
  216. if (volume > 0) local.player.unMute();
  217. }
  218. },
  219. resumeLocalStation: function() {
  220. this.paused = false;
  221. if (!this.noSong) {
  222. if (this.playerReady) {
  223. this.player.seekTo(this.getTimeElapsed() / 1000 + this.currentSong.skipDuration);
  224. this.player.playVideo();
  225. }
  226. }
  227. },
  228. pauseLocalStation: function() {
  229. this.paused = true;
  230. if (!this.noSong) {
  231. this.timeBeforePause = this.getTimeElapsed();
  232. if (this.playerReady) this.player.pauseVideo();
  233. }
  234. },
  235. skipStation: function () {
  236. let _this = this;
  237. _this.socket.emit('stations.forceSkip', _this.stationId, data => {
  238. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  239. else Toast.methods.addToast('Successfully skipped the station\'s current song.', 4000);
  240. });
  241. },
  242. voteSkipStation: function () {
  243. let _this = this;
  244. _this.socket.emit('stations.voteSkip', _this.stationId, data => {
  245. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  246. else Toast.methods.addToast('Successfully voted to skip the current song.', 4000);
  247. });
  248. },
  249. resumeStation: function () {
  250. let _this = this;
  251. _this.socket.emit('stations.resume', _this.stationId, data => {
  252. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  253. else Toast.methods.addToast('Successfully resumed the station.', 4000);
  254. });
  255. },
  256. pauseStation: function () {
  257. let _this = this;
  258. _this.socket.emit('stations.pause', _this.stationId, data => {
  259. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  260. else Toast.methods.addToast('Successfully paused the station.', 4000);
  261. });
  262. },
  263. toggleLike: function() {
  264. let _this = this;
  265. if (_this.liked) _this.socket.emit('songs.unlike', _this.currentSong._id, data => {
  266. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  267. }); else _this.socket.emit('songs.like', _this.currentSong._id, data => {
  268. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  269. });
  270. },
  271. toggleDislike: function() {
  272. let _this = this;
  273. if (_this.disliked) return _this.socket.emit('songs.undislike', _this.currentSong._id, data => {
  274. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  275. });
  276. _this.socket.emit('songs.dislike', _this.currentSong._id, data => {
  277. if (data.status !== 'success') Toast.methods.addToast(`Error: ${data.message}`, 8000);
  278. });
  279. },
  280. addFirstPrivatePlaylistSongToQueue: function() {
  281. let _this = this;
  282. let isInQueue = false;
  283. let userId = _this.$parent.userId;
  284. _this.queue.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. joinStation: function () {
  304. let _this = this;
  305. _this.socket.emit('stations.join', _this.stationId, res => {
  306. if (res.status === 'success') {
  307. _this.station = {
  308. displayName: res.data.displayName,
  309. description: res.data.description,
  310. privacy: res.data.privacy,
  311. partyMode: res.data.partyMode,
  312. owner: res.data.owner,
  313. privatePlaylist: res.data.privatePlaylist
  314. };
  315. _this.currentSong = (res.data.currentSong) ? res.data.currentSong : {};
  316. _this.type = res.data.type;
  317. _this.startedAt = res.data.startedAt;
  318. _this.paused = res.data.paused;
  319. _this.timePaused = res.data.timePaused;
  320. if (res.data.currentSong) {
  321. _this.noSong = false;
  322. _this.simpleSong = (res.data.currentSong.likes === -1 && res.data.currentSong.dislikes === -1);
  323. if (_this.simpleSong) {
  324. _this.currentSong.skipDuration = 0;
  325. }
  326. _this.youtubeReady();
  327. _this.playVideo();
  328. _this.socket.emit('songs.getOwnSongRatings', res.data.currentSong._id, data => {
  329. if (_this.currentSong._id === data.songId) {
  330. _this.liked = data.liked;
  331. _this.disliked = data.disliked;
  332. }
  333. });
  334. } else {
  335. if (_this.playerReady) _this.player.pauseVideo();
  336. _this.noSong = true;
  337. }
  338. if (_this.type === 'community') {
  339. _this.socket.emit('stations.getQueue', _this.stationId, data => {
  340. if (data.status === 'success') _this.queue = data.queue;
  341. });
  342. }
  343. }
  344. });
  345. }
  346. },
  347. ready: function() {
  348. let _this = this;
  349. _this.stationId = _this.$route.params.id;
  350. window.stationInterval = 0;
  351. io.getSocket((socket) => {
  352. _this.socket = socket;
  353. io.removeAllListeners();
  354. if (_this.socket.connected) _this.joinStation();
  355. io.onConnect(() => {
  356. _this.joinStation();
  357. });
  358. _this.socket.emit('stations.find', _this.stationId, res => {
  359. if (res.status === 'error') {
  360. _this.$router.go('/404');
  361. Toast.methods.addToast(res.message, 3000);
  362. }
  363. });
  364. _this.socket.on('event:songs.next', data => {
  365. _this.previousSong = (_this.currentSong._id) ? _this.currentSong : null;
  366. _this.currentSong = (data.currentSong) ? data.currentSong : {};
  367. _this.startedAt = data.startedAt;
  368. _this.paused = data.paused;
  369. _this.timePaused = data.timePaused;
  370. if (data.currentSong) {
  371. _this.noSong = false;
  372. _this.simpleSong = (data.currentSong.likes === -1 && data.currentSong.dislikes === -1);
  373. if (_this.simpleSong) _this.currentSong.skipDuration = 0;
  374. if (!_this.playerReady) _this.youtubeReady();
  375. else _this.playVideo();
  376. _this.socket.emit('songs.getOwnSongRatings', data.currentSong._id, (data) => {
  377. if (_this.currentSong._id === data.songId) {
  378. _this.liked = data.liked;
  379. _this.disliked = data.disliked;
  380. }
  381. });
  382. } else {
  383. if (_this.playerReady) _this.player.pauseVideo();
  384. _this.noSong = true;
  385. }
  386. let isInQueue = false;
  387. let userId = _this.$parent.userId;
  388. _this.queue.forEach((queueSong) => {
  389. if (queueSong.requestedBy === userId) isInQueue = true;
  390. });
  391. if (!isInQueue && _this.privatePlaylistQueueSelected && (_this.automaticallyRequestedSongId !== _this.currentSong._id || !_this.currentSong._id)) {
  392. _this.addFirstPrivatePlaylistSongToQueue();
  393. }
  394. });
  395. _this.socket.on('event:stations.pause', data => {
  396. _this.pauseLocalStation();
  397. });
  398. _this.socket.on('event:stations.resume', data => {
  399. _this.timePaused = data.timePaused;
  400. _this.resumeLocalStation();
  401. });
  402. _this.socket.on('event:song.like', data => {
  403. if (!this.noSong) {
  404. if (data.songId === _this.currentSong._id) {
  405. _this.currentSong.likes++;
  406. if (data.undisliked) _this.currentSong.dislikes--;
  407. }
  408. }
  409. });
  410. _this.socket.on('event:song.dislike', data => {
  411. if (!this.noSong) {
  412. if (data.songId === _this.currentSong._id) {
  413. _this.currentSong.dislikes++;
  414. if (data.unliked) _this.currentSong.likes--;
  415. }
  416. }
  417. });
  418. _this.socket.on('event:song.unlike', data => {
  419. if (!this.noSong) {
  420. if (data.songId === _this.currentSong._id) _this.currentSong.likes--;
  421. }
  422. });
  423. _this.socket.on('event:song.undislike', data => {
  424. if (!this.noSong) {
  425. if (data.songId === _this.currentSong._id) _this.currentSong.dislikes--;
  426. }
  427. });
  428. _this.socket.on('event:song.newRatings', data => {
  429. if (!this.noSong) {
  430. if (data.songId === _this.currentSong._id) {
  431. _this.liked = data.liked;
  432. _this.disliked = data.disliked;
  433. }
  434. }
  435. });
  436. _this.socket.on('event:queue.update', queue => {
  437. if (this.type === 'community') this.queue = queue;
  438. });
  439. _this.socket.on('event:song.voteSkipSong', () => {
  440. if (this.currentSong) this.currentSong.skipVotes++;
  441. });
  442. _this.socket.on('event:privatePlaylist.selected', (playlistId) => {
  443. if (this.type === 'community') {
  444. this.station.privatePlaylist = playlistId;
  445. }
  446. });
  447. _this.socket.on('event:partyMode.updated', (partyMode) => {
  448. if (this.type === 'community') {
  449. this.station.partyMode = partyMode;
  450. }
  451. });
  452. });
  453. let volume = parseInt(localStorage.getItem("volume"));
  454. volume = (typeof volume === "number") ? volume : 20;
  455. localStorage.setItem("volume", volume);
  456. $("#volumeSlider").val(volume);
  457. },
  458. components: {
  459. OfficialHeader,
  460. CommunityHeader,
  461. SongQueue,
  462. EditPlaylist,
  463. CreatePlaylist,
  464. EditStation,
  465. Report,
  466. QueueSidebar,
  467. OfficialQueueSidebar,
  468. PlaylistSidebar,
  469. UsersSidebar
  470. }
  471. }
  472. </script>
  473. <style lang="scss">
  474. .no-song {
  475. color: #03A9F4;
  476. text-align: center;
  477. }
  478. #volumeSlider {
  479. padding: 0 15px;
  480. background: transparent;
  481. }
  482. .volume-slider-wrapper {
  483. margin-top: 0;
  484. position: relative;
  485. display: flex;
  486. align-items: center;
  487. }
  488. .stationDisplayName {
  489. color: white !important;
  490. }
  491. .slideout {
  492. top: 50px;
  493. height: 100%;
  494. position: fixed;
  495. right: 0;
  496. width: 350px;
  497. background-color: white;
  498. box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
  499. .slideout-header {
  500. text-align: center;
  501. background-color: rgb(3, 169, 244) !important;
  502. margin: 0;
  503. padding-top: 5px;
  504. padding-bottom: 7px;
  505. color: white;
  506. }
  507. .slideout-content {
  508. height: 100%;
  509. }
  510. }
  511. .modal-large {
  512. width: 75%;
  513. }
  514. .station {
  515. flex: 1 0 auto;
  516. padding-top: 0.5vw;
  517. transition: all 0.1s;
  518. margin: 0 auto;
  519. max-width: 1280px;
  520. width: 90%;
  521. @media only screen and (min-width: 993px) {
  522. width: 70%;
  523. }
  524. @media only screen and (min-width: 601px) {
  525. width: 85%;
  526. }
  527. input[type=range] {
  528. -webkit-appearance: none;
  529. width: 100%;
  530. margin: 7.3px 0;
  531. }
  532. input[type=range]:focus {
  533. outline: none;
  534. }
  535. input[type=range]::-webkit-slider-runnable-track {
  536. width: 100%;
  537. height: 5.2px;
  538. cursor: pointer;
  539. box-shadow: 0;
  540. background: #c2c0c2;
  541. border-radius: 0;
  542. border: 0;
  543. }
  544. input[type=range]::-webkit-slider-thumb {
  545. box-shadow: 0;
  546. border: 0;
  547. height: 19px;
  548. width: 19px;
  549. border-radius: 15px;
  550. background: #03a9f4;
  551. cursor: pointer;
  552. -webkit-appearance: none;
  553. margin-top: -6.5px;
  554. }
  555. input[type=range]::-moz-range-track {
  556. width: 100%;
  557. height: 5.2px;
  558. cursor: pointer;
  559. box-shadow: 0;
  560. background: #c2c0c2;
  561. border-radius: 0;
  562. border: 0;
  563. }
  564. input[type=range]::-moz-range-thumb {
  565. box-shadow: 0;
  566. border: 0;
  567. height: 19px;
  568. width: 19px;
  569. border-radius: 15px;
  570. background: #03a9f4;
  571. cursor: pointer;
  572. -webkit-appearance: none;
  573. margin-top: -6.5px;
  574. }
  575. input[type=range]::-ms-track {
  576. width: 100%;
  577. height: 5.2px;
  578. cursor: pointer;
  579. box-shadow: 0;
  580. background: #c2c0c2;
  581. border-radius: 1.3px;
  582. }
  583. input[type=range]::-ms-fill-lower {
  584. background: #c2c0c2;
  585. border: 0;
  586. border-radius: 0;
  587. box-shadow: 0;
  588. }
  589. input[type=range]::-ms-fill-upper {
  590. background: #c2c0c2;
  591. border: 0;
  592. border-radius: 0;
  593. box-shadow: 0;
  594. }
  595. input[type=range]::-ms-thumb {
  596. box-shadow: 0;
  597. border: 0;
  598. height: 15px;
  599. width: 15px;
  600. border-radius: 15px;
  601. background: #03a9f4;
  602. cursor: pointer;
  603. -webkit-appearance: none;
  604. margin-top: 1.5px;
  605. }
  606. .video-container {
  607. position: relative;
  608. padding-bottom: 56.25%;
  609. height: 0;
  610. overflow: hidden;
  611. iframe {
  612. position: absolute;
  613. top: 0;
  614. left: 0;
  615. width: 100%;
  616. height: 100%;
  617. }
  618. }
  619. .video-col {
  620. padding-right: 0.75rem;
  621. padding-left: 0.75rem;
  622. }
  623. }
  624. .room-title {
  625. left: 50%;
  626. -webkit-transform: translateX(-50%);
  627. transform: translateX(-50%);
  628. font-size: 2.1em;
  629. }
  630. #ratings {
  631. span {
  632. font-size: 1.68rem;
  633. }
  634. i {
  635. color: #9e9e9e !important;
  636. cursor: pointer;
  637. transition: 0.1s color;
  638. }
  639. }
  640. #time-display {
  641. margin-top: 30px;
  642. float: right;
  643. }
  644. #thumbs_up:hover, #thumbs_up.liked {
  645. color: #87D37C !important;
  646. }
  647. #thumbs_down:hover, #thumbs_down.disliked {
  648. color: #EC644B !important;
  649. }
  650. #song-thumbnail {
  651. max-width: 100%;
  652. width: 85%;
  653. }
  654. .seeker-bar-container {
  655. position: relative;
  656. height: 5px;
  657. display: block;
  658. width: 100%;
  659. overflow: hidden;
  660. }
  661. .seeker-bar {
  662. top: 0;
  663. left: 0;
  664. bottom: 0;
  665. position: absolute;
  666. }
  667. ul {
  668. list-style: none;
  669. margin: 0;
  670. display: block;
  671. }
  672. h1, h2, h3, h4, h5, h6 {
  673. font-weight: 400;
  674. line-height: 1.1;
  675. }
  676. h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
  677. font-weight: inherit;
  678. }
  679. h1 {
  680. font-size: 4.2rem;
  681. line-height: 110%;
  682. margin: 2.1rem 0 1.68rem 0;
  683. }
  684. h2 {
  685. font-size: 3.56rem;
  686. line-height: 110%;
  687. margin: 1.78rem 0 1.424rem 0;
  688. }
  689. h3 {
  690. font-size: 2.92rem;
  691. line-height: 110%;
  692. margin: 1.46rem 0 1.168rem 0;
  693. }
  694. h4 {
  695. font-size: 2.28rem;
  696. line-height: 110%;
  697. margin: 1.14rem 0 0.912rem 0;
  698. }
  699. h5 {
  700. font-size: 1.64rem;
  701. line-height: 110%;
  702. margin: 0.82rem 0 0.656rem 0;
  703. }
  704. h6 {
  705. font-size: 1rem;
  706. line-height: 110%;
  707. margin: 0.5rem 0 0.4rem 0;
  708. }
  709. .thin {
  710. font-weight: 200;
  711. }
  712. .left {
  713. float: left !important;
  714. }
  715. .right {
  716. float: right !important;
  717. }
  718. .light-blue {
  719. background-color: #03a9f4 !important;
  720. }
  721. .white {
  722. background-color: #FFFFFF !important;
  723. }
  724. .btn-search {
  725. font-size: 14px;
  726. }
  727. .menu { padding: 0 10px; }
  728. .menu-list li a:hover { color: #000 !important; }
  729. .menu-list li {
  730. display: flex;
  731. justify-content: space-between;
  732. }
  733. .menu-list a {
  734. padding: 0 10px !important;
  735. }
  736. .icons-group { display: flex; }
  737. #like, #dislike {
  738. position: relative;
  739. }
  740. .behind {
  741. z-index: -1;
  742. }
  743. .behind:focus {
  744. z-index: 0;
  745. }
  746. </style>