Station.vue 22 KB

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