Station.vue 22 KB

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