Station.vue 23 KB

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