Station.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850
  1. <template>
  2. <official-header v-if='type == "official"'></official-header>
  3. <community-header v-if='type == "community"'></community-header>
  4. <song-queue v-if='modals.addSongToQueue'></song-queue>
  5. <edit-playlist v-if='modals.editPlaylist'></edit-playlist>
  6. <create-playlist v-if='modals.createPlaylist'></create-playlist>
  7. <edit-station v-if='modals.editStation'></edit-station>
  8. <report v-if='modals.report'></report>
  9. <songs-list-sidebar v-if='sidebars.songslist'></songs-list-sidebar>
  10. <playlist-sidebar v-if='sidebars.playlist'></playlist-sidebar>
  11. <users-sidebar v-if='sidebars.users'></users-sidebar>
  12. <div class="station">
  13. <div v-show="noSong" class="no-song">
  14. <h1>No song is currently playing</h1>
  15. <h4 v-if='type === "community" && station.partyMode'>
  16. <a href='#' class='no-song' @click='modals.addSongToQueue = true'>Add a Song to the Queue</a>
  17. </h4>
  18. <h4 v-if='type === "community" && !station.partyMode && $parent.userId === station.owner && !station.privatePlaylist'>
  19. <a href='#' class='no-song' @click='sidebars.playlist = true'>Play a private playlist</a>
  20. </h4>
  21. <h1 v-if='type === "community" && !station.partyMode && $parent.userId === station.owner && station.privatePlaylist'>Maybe you can add some songs to your selected private playlist and then press the skip button</h1>
  22. </div>
  23. <div class="columns is-mobile" v-show="!noSong">
  24. <div class="column is-8-desktop is-offset-2-desktop is-12-mobile">
  25. <div class="video-container">
  26. <div id="player"></div>
  27. <div class="seeker-bar-container white" id="preview-progress">
  28. <div class="seeker-bar light-blue" style="width: 0%;"></div>
  29. </div>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="columns is-mobile" v-show="!noSong">
  34. <div class="column is-8-desktop is-offset-2-desktop is-12-mobile">
  35. <div class="columns is-mobile">
  36. <div class="column is-12-mobile" v-bind:class="{'is-8-desktop': !simpleSong}">
  37. <h4 id="time-display">{{timeElapsed}} / {{formatTime(currentSong.duration)}}</h4>
  38. <h3>{{currentSong.title}}</h3>
  39. <h4 class="thin" style="margin-left: 0">{{currentSong.artists}}</h4>
  40. <div class="columns is-mobile">
  41. <form style="margin-top: 12px; margin-bottom: 0;" action="#" class="column is-7-desktop is-4-mobile">
  42. <p class='volume-slider-wrapper'>
  43. <i class="material-icons">volume_down</i>
  44. <input type="range" id="volumeSlider" min="0" max="100" class="active" v-on:change="changeVolume()" v-on:input="changeVolume()">
  45. <i class="material-icons">volume_up</i>
  46. </p>
  47. </form>
  48. <div class="column is-8-mobile is-5-desktop" style="float: right;">
  49. <ul id="ratings" v-if="currentSong.likes !== -1 && currentSong.dislikes !== -1">
  50. <li id="like" class="right" @click="toggleLike()">
  51. <span class="flow-text">{{currentSong.likes}} </span>
  52. <i id="thumbs_up" class="material-icons grey-text" v-bind:class="{ liked: liked }">thumb_up</i>
  53. <a class='absolute-a behind' @click="toggleLike()" href='#'></a>
  54. </li>
  55. <li style="margin-right: 10px;" id="dislike" class="right" @click="toggleDislike()">
  56. <span class="flow-text">{{currentSong.dislikes}} </span>
  57. <i id="thumbs_down" class="material-icons grey-text" v-bind:class="{ disliked: disliked }">thumb_down</i>
  58. <a class='absolute-a behind' @click="toggleDislike()" href='#'></a>
  59. </li>
  60. </ul>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="column is-4-desktop" v-if="!simpleSong">
  65. <img class="image" id="song-thumbnail" style="margin-top: 10px !important" :src="currentSong.thumbnail" alt="Song Thumbnail" onerror="this.src='/assets/notes-transparent.png'" />
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </template>
  72. <script>
  73. import { Toast } from 'vue-roaster';
  74. import SongQueue from '../Modals/AddSongToQueue.vue';
  75. import EditPlaylist from '../Modals/Playlists/Edit.vue';
  76. import CreatePlaylist from '../Modals/Playlists/Create.vue';
  77. import EditStation from '../Modals/EditStation.vue';
  78. import Report from '../Modals/Report.vue';
  79. import SongsListSidebar from '../Sidebars/SongsList.vue';
  80. import PlaylistSidebar from '../Sidebars/Playlist.vue';
  81. import UsersSidebar from '../Sidebars/UsersList.vue';
  82. import OfficialHeader from './OfficialHeader.vue';
  83. import CommunityHeader from './CommunityHeader.vue';
  84. import io from '../../io';
  85. export default {
  86. data() {
  87. return {
  88. type: '',
  89. playerReady: false,
  90. previousSong: null,
  91. currentSong: {},
  92. player: undefined,
  93. timePaused: 0,
  94. paused: false,
  95. timeElapsed: '0:00',
  96. liked: false,
  97. disliked: false,
  98. modals: {
  99. addSongToQueue: false,
  100. editPlaylist: false,
  101. createPlaylist: false,
  102. editStation: false,
  103. report: false
  104. },
  105. sidebars: {
  106. songslist: false,
  107. users: false,
  108. playlist: false
  109. },
  110. noSong: false,
  111. simpleSong: false,
  112. songsList: [],
  113. timeBeforePause: 0,
  114. station: {},
  115. skipVotes: 0,
  116. privatePlaylistQueueSelected: null,
  117. automaticallyRequestedSongId: null
  118. }
  119. },
  120. methods: {
  121. editPlaylist: function (id) {
  122. this.playlistBeingEdited = id;
  123. this.modals.editPlaylist = !this.modals.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 && (local.getTimeElapsed() / 1000) < local.currentSong.duration) {
  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. if (_this.type === 'community') {
  282. _this.songsList.forEach((queueSong) => {
  283. if (queueSong.requestedBy === userId) isInQueue = true;
  284. });
  285. if (!isInQueue && _this.privatePlaylistQueueSelected) {
  286. _this.socket.emit('playlists.getFirstSong', _this.privatePlaylistQueueSelected, data => {
  287. if (data.status === 'success') {
  288. let songId = data.song._id;
  289. _this.automaticallyRequestedSongId = songId;
  290. _this.socket.emit('stations.addToQueue', _this.stationId, songId, data => {
  291. if (data.status === 'success') {
  292. _this.socket.emit('playlists.moveSongToBottom', _this.privatePlaylistQueueSelected, songId, data => {
  293. if (data.status === 'success') {}
  294. });
  295. }
  296. });
  297. }
  298. });
  299. }
  300. }
  301. },
  302. joinStation: function () {
  303. let _this = this;
  304. _this.socket.emit('stations.join', _this.stationId, res => {
  305. if (res.status === 'success') {
  306. _this.station = {
  307. displayName: res.data.displayName,
  308. description: res.data.description,
  309. privacy: res.data.privacy,
  310. partyMode: res.data.partyMode,
  311. owner: res.data.owner,
  312. privatePlaylist: res.data.privatePlaylist
  313. };
  314. _this.currentSong = (res.data.currentSong) ? res.data.currentSong : {};
  315. _this.type = res.data.type;
  316. _this.startedAt = res.data.startedAt;
  317. _this.paused = res.data.paused;
  318. _this.timePaused = res.data.timePaused;
  319. if (res.data.currentSong) {
  320. _this.noSong = false;
  321. _this.simpleSong = (res.data.currentSong.likes === -1 && res.data.currentSong.dislikes === -1);
  322. if (_this.simpleSong) {
  323. _this.currentSong.skipDuration = 0;
  324. }
  325. _this.youtubeReady();
  326. _this.playVideo();
  327. _this.socket.emit('songs.getOwnSongRatings', res.data.currentSong._id, data => {
  328. if (_this.currentSong._id === data.songId) {
  329. _this.liked = data.liked;
  330. _this.disliked = data.disliked;
  331. }
  332. });
  333. } else {
  334. if (_this.playerReady) _this.player.pauseVideo();
  335. _this.noSong = true;
  336. }
  337. if (_this.type === 'community') {
  338. _this.socket.emit('stations.getQueue', _this.stationId, data => {
  339. if (data.status === 'success') _this.songsList = data.queue;
  340. });
  341. }
  342. }
  343. _this.socket.emit('stations.getPlaylist', _this.stationId, res => {
  344. if (res.status == 'success') _this.songsList = res.data;
  345. });
  346. });
  347. }
  348. },
  349. ready: function() {
  350. let _this = this;
  351. _this.stationId = _this.$route.params.id;
  352. window.stationInterval = 0;
  353. io.getSocket((socket) => {
  354. _this.socket = socket;
  355. io.removeAllListeners();
  356. if (_this.socket.connected) _this.joinStation();
  357. io.onConnect(() => {
  358. _this.joinStation();
  359. });
  360. _this.socket.emit('stations.find', _this.stationId, res => {
  361. if (res.status === 'error') {
  362. _this.$router.go('/404');
  363. Toast.methods.addToast(res.message, 3000);
  364. }
  365. });
  366. _this.socket.on('event:songs.next', data => {
  367. _this.previousSong = (_this.currentSong._id) ? _this.currentSong : null;
  368. _this.currentSong = (data.currentSong) ? data.currentSong : {};
  369. _this.startedAt = data.startedAt;
  370. _this.paused = data.paused;
  371. _this.timePaused = data.timePaused;
  372. if (data.currentSong) {
  373. _this.noSong = false;
  374. _this.simpleSong = (data.currentSong.likes === -1 && data.currentSong.dislikes === -1);
  375. if (_this.simpleSong) _this.currentSong.skipDuration = 0;
  376. if (!_this.playerReady) _this.youtubeReady();
  377. else _this.playVideo();
  378. _this.socket.emit('songs.getOwnSongRatings', data.currentSong._id, (data) => {
  379. if (_this.currentSong._id === data.songId) {
  380. _this.liked = data.liked;
  381. _this.disliked = data.disliked;
  382. }
  383. });
  384. } else {
  385. if (_this.playerReady) _this.player.pauseVideo();
  386. _this.noSong = true;
  387. }
  388. let isInQueue = false;
  389. let userId = _this.$parent.userId;
  390. _this.songsList.forEach((queueSong) => {
  391. if (queueSong.requestedBy === userId) isInQueue = true;
  392. });
  393. if (!isInQueue && _this.privatePlaylistQueueSelected && (_this.automaticallyRequestedSongId !== _this.currentSong._id || !_this.currentSong._id)) {
  394. _this.addFirstPrivatePlaylistSongToQueue();
  395. }
  396. });
  397. _this.socket.on('event:stations.pause', data => {
  398. _this.pauseLocalStation();
  399. });
  400. _this.socket.on('event:stations.resume', data => {
  401. _this.timePaused = data.timePaused;
  402. _this.resumeLocalStation();
  403. });
  404. _this.socket.on('event:song.like', data => {
  405. if (!this.noSong) {
  406. if (data.songId === _this.currentSong._id) {
  407. _this.currentSong.dislikes = data.dislikes;
  408. _this.currentSong.likes = data.likes;
  409. }
  410. }
  411. });
  412. _this.socket.on('event:song.dislike', data => {
  413. if (!this.noSong) {
  414. if (data.songId === _this.currentSong._id) {
  415. _this.currentSong.dislikes = data.dislikes;
  416. _this.currentSong.likes = data.likes;
  417. }
  418. }
  419. });
  420. _this.socket.on('event:song.unlike', data => {
  421. if (!this.noSong) {
  422. if (data.songId === _this.currentSong._id) {
  423. _this.currentSong.dislikes = data.dislikes;
  424. _this.currentSong.likes = data.likes;
  425. }
  426. }
  427. });
  428. _this.socket.on('event:song.undislike', data => {
  429. if (!this.noSong) {
  430. if (data.songId === _this.currentSong._id) {
  431. _this.currentSong.dislikes = data.dislikes;
  432. _this.currentSong.likes = data.likes;
  433. }
  434. }
  435. });
  436. _this.socket.on('event:song.newRatings', data => {
  437. if (!this.noSong) {
  438. if (data.songId === _this.currentSong._id) {
  439. _this.liked = data.liked;
  440. _this.disliked = data.disliked;
  441. }
  442. }
  443. });
  444. _this.socket.on('event:queue.update', queue => {
  445. if (this.type === 'community') this.songsList = queue;
  446. });
  447. _this.socket.on('event:song.voteSkipSong', () => {
  448. if (this.currentSong) this.currentSong.skipVotes++;
  449. });
  450. _this.socket.on('event:privatePlaylist.selected', (playlistId) => {
  451. if (this.type === 'community') {
  452. this.station.privatePlaylist = playlistId;
  453. }
  454. });
  455. _this.socket.on('event:partyMode.updated', (partyMode) => {
  456. if (this.type === 'community') {
  457. this.station.partyMode = partyMode;
  458. }
  459. });
  460. _this.socket.on('event:newOfficialPlaylist', (playlist) => {
  461. console.log(playlist);
  462. if (this.type === 'official') {
  463. this.songsList = playlist;
  464. }
  465. });
  466. });
  467. let volume = parseInt(localStorage.getItem("volume"));
  468. volume = (typeof volume === "number" && !isNaN(volume)) ? volume : 20;
  469. localStorage.setItem("volume", volume);
  470. $("#volumeSlider").val(volume);
  471. },
  472. components: {
  473. OfficialHeader,
  474. CommunityHeader,
  475. SongQueue,
  476. EditPlaylist,
  477. CreatePlaylist,
  478. EditStation,
  479. Report,
  480. SongsListSidebar,
  481. PlaylistSidebar,
  482. UsersSidebar
  483. }
  484. }
  485. </script>
  486. <style lang="scss">
  487. .no-song {
  488. color: #03A9F4;
  489. text-align: center;
  490. }
  491. #volumeSlider {
  492. padding: 0 15px;
  493. background: transparent;
  494. }
  495. .volume-slider-wrapper {
  496. margin-top: 0;
  497. position: relative;
  498. display: flex;
  499. align-items: center;
  500. }
  501. .stationDisplayName {
  502. color: white !important;
  503. }
  504. .slideout {
  505. top: 50px;
  506. height: 100%;
  507. position: fixed;
  508. right: 0;
  509. width: 350px;
  510. background-color: white;
  511. box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
  512. .slideout-header {
  513. text-align: center;
  514. background-color: rgb(3, 169, 244) !important;
  515. margin: 0;
  516. padding-top: 5px;
  517. padding-bottom: 7px;
  518. color: white;
  519. }
  520. .slideout-content {
  521. height: 100%;
  522. }
  523. }
  524. .modal-large {
  525. width: 75%;
  526. }
  527. .station {
  528. flex: 1 0 auto;
  529. padding-top: 0.5vw;
  530. transition: all 0.1s;
  531. margin: 0 auto;
  532. max-width: 1280px;
  533. width: 90%;
  534. @media only screen and (min-width: 993px) {
  535. width: 70%;
  536. }
  537. @media only screen and (min-width: 601px) {
  538. width: 85%;
  539. }
  540. input[type=range] {
  541. -webkit-appearance: none;
  542. width: 100%;
  543. margin: 7.3px 0;
  544. }
  545. input[type=range]:focus {
  546. outline: none;
  547. }
  548. input[type=range]::-webkit-slider-runnable-track {
  549. width: 100%;
  550. height: 5.2px;
  551. cursor: pointer;
  552. box-shadow: 0;
  553. background: #c2c0c2;
  554. border-radius: 0;
  555. border: 0;
  556. }
  557. input[type=range]::-webkit-slider-thumb {
  558. box-shadow: 0;
  559. border: 0;
  560. height: 19px;
  561. width: 19px;
  562. border-radius: 15px;
  563. background: #03a9f4;
  564. cursor: pointer;
  565. -webkit-appearance: none;
  566. margin-top: -6.5px;
  567. }
  568. input[type=range]::-moz-range-track {
  569. width: 100%;
  570. height: 5.2px;
  571. cursor: pointer;
  572. box-shadow: 0;
  573. background: #c2c0c2;
  574. border-radius: 0;
  575. border: 0;
  576. }
  577. input[type=range]::-moz-range-thumb {
  578. box-shadow: 0;
  579. border: 0;
  580. height: 19px;
  581. width: 19px;
  582. border-radius: 15px;
  583. background: #03a9f4;
  584. cursor: pointer;
  585. -webkit-appearance: none;
  586. margin-top: -6.5px;
  587. }
  588. input[type=range]::-ms-track {
  589. width: 100%;
  590. height: 5.2px;
  591. cursor: pointer;
  592. box-shadow: 0;
  593. background: #c2c0c2;
  594. border-radius: 1.3px;
  595. }
  596. input[type=range]::-ms-fill-lower {
  597. background: #c2c0c2;
  598. border: 0;
  599. border-radius: 0;
  600. box-shadow: 0;
  601. }
  602. input[type=range]::-ms-fill-upper {
  603. background: #c2c0c2;
  604. border: 0;
  605. border-radius: 0;
  606. box-shadow: 0;
  607. }
  608. input[type=range]::-ms-thumb {
  609. box-shadow: 0;
  610. border: 0;
  611. height: 15px;
  612. width: 15px;
  613. border-radius: 15px;
  614. background: #03a9f4;
  615. cursor: pointer;
  616. -webkit-appearance: none;
  617. margin-top: 1.5px;
  618. }
  619. .video-container {
  620. position: relative;
  621. padding-bottom: 56.25%;
  622. height: 0;
  623. overflow: hidden;
  624. iframe {
  625. position: absolute;
  626. top: 0;
  627. left: 0;
  628. width: 100%;
  629. height: 100%;
  630. }
  631. }
  632. .video-col {
  633. padding-right: 0.75rem;
  634. padding-left: 0.75rem;
  635. }
  636. }
  637. .room-title {
  638. left: 50%;
  639. -webkit-transform: translateX(-50%);
  640. transform: translateX(-50%);
  641. font-size: 2.1em;
  642. }
  643. #ratings {
  644. span {
  645. font-size: 1.68rem;
  646. }
  647. i {
  648. color: #9e9e9e !important;
  649. cursor: pointer;
  650. transition: 0.1s color;
  651. }
  652. }
  653. #time-display {
  654. margin-top: 30px;
  655. float: right;
  656. }
  657. #thumbs_up:hover, #thumbs_up.liked {
  658. color: #87D37C !important;
  659. }
  660. #thumbs_down:hover, #thumbs_down.disliked {
  661. color: #EC644B !important;
  662. }
  663. #song-thumbnail {
  664. max-width: 100%;
  665. width: 85%;
  666. }
  667. .seeker-bar-container {
  668. position: relative;
  669. height: 5px;
  670. display: block;
  671. width: 100%;
  672. overflow: hidden;
  673. }
  674. .seeker-bar {
  675. top: 0;
  676. left: 0;
  677. bottom: 0;
  678. position: absolute;
  679. }
  680. ul {
  681. list-style: none;
  682. margin: 0;
  683. display: block;
  684. }
  685. h1, h2, h3, h4, h5, h6 {
  686. font-weight: 400;
  687. line-height: 1.1;
  688. }
  689. h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
  690. font-weight: inherit;
  691. }
  692. h1 {
  693. font-size: 4.2rem;
  694. line-height: 110%;
  695. margin: 2.1rem 0 1.68rem 0;
  696. }
  697. h2 {
  698. font-size: 3.56rem;
  699. line-height: 110%;
  700. margin: 1.78rem 0 1.424rem 0;
  701. }
  702. h3 {
  703. font-size: 2.92rem;
  704. line-height: 110%;
  705. margin: 1.46rem 0 1.168rem 0;
  706. }
  707. h4 {
  708. font-size: 2.28rem;
  709. line-height: 110%;
  710. margin: 1.14rem 0 0.912rem 0;
  711. }
  712. h5 {
  713. font-size: 1.64rem;
  714. line-height: 110%;
  715. margin: 0.82rem 0 0.656rem 0;
  716. }
  717. h6 {
  718. font-size: 1rem;
  719. line-height: 110%;
  720. margin: 0.5rem 0 0.4rem 0;
  721. }
  722. .thin {
  723. font-weight: 200;
  724. }
  725. .left {
  726. float: left !important;
  727. }
  728. .right {
  729. float: right !important;
  730. }
  731. .light-blue {
  732. background-color: #03a9f4 !important;
  733. }
  734. .white {
  735. background-color: #FFFFFF !important;
  736. }
  737. .btn-search {
  738. font-size: 14px;
  739. }
  740. .menu { padding: 0 10px; }
  741. .menu-list li a:hover { color: #000 !important; }
  742. .menu-list li {
  743. display: flex;
  744. justify-content: space-between;
  745. }
  746. .menu-list a {
  747. /*padding: 0 10px !important;*/
  748. }
  749. .menu-list a:hover {
  750. background-color : transparent;
  751. }
  752. .icons-group { display: flex; }
  753. #like, #dislike {
  754. position: relative;
  755. }
  756. .behind {
  757. z-index: -1;
  758. }
  759. .behind:focus {
  760. z-index: 0;
  761. }
  762. </style>