Station.vue 23 KB

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