Station.vue 21 KB

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