Custom Native HTML5 Player with Shortcuts

Custom html5 player with shortcuts and v.redd.it videos with audio

As of 2020-06-09. See the latest version.

  1. // ==UserScript==//
  2. // @name Custom Native HTML5 Player with Shortcuts
  3. // @namespace https://gist.github.com/narcolepticinsomniac
  4. // @version 0.2
  5. // @description Custom html5 player with shortcuts and v.redd.it videos with audio
  6. // @author narcolepticinsomniac
  7. // @include *
  8. // @require https://cdnjs.cloudflare.com/ajax/libs/arrive/2.4.1/arrive.min.js
  9. // @run-at document-start
  10. // @grant GM_addStyle
  11. // ==/UserScript==
  12.  
  13. let imagusAudio;
  14. let audioSync;
  15. let audioError;
  16. let ytID;
  17. let ytTimeChecked;
  18. const $ = document.querySelector.bind(document);
  19.  
  20. const settings = {
  21. // delay to hide contols and cursor if inactive (set to 3000 milliseconds)
  22. hideControls: 3000,
  23. // delay for fullscreen double-click (set to 300 milliseconds)
  24. clickDelay: 300,
  25. // right-click delay to match imagus user setting (set to 0 milliseconds)
  26. imagusStickyDelay: 0,
  27. // right/left arrows keys or inner skip buttons (set to 10 seconds)
  28. skipNormal: 10,
  29. // Shift + Arrow keys or outer skip buttons (set to 30 seconds)
  30. skipShift: 30,
  31. // Ctrl + Arrow keys skip (set to 1 minute)
  32. skipCtrl: 1,
  33. };
  34.  
  35. const shortcutFuncs = {
  36. toggleCaptions: v => {
  37. const validTracks = [];
  38. for (let i = 0; i < v.textTracks.length; ++i) {
  39. const tt = v.textTracks[i];
  40. if (tt.mode === 'showing') {
  41. tt.mode = 'disabled';
  42. if (v.textTracks.addEventListener) {
  43. // If text track event listeners are supported
  44. // (they are on the most recent Chrome), add
  45. // a marker to remember the old track. Use a
  46. // listener to delete it if a different track
  47. // is selected.
  48. v.cbhtml5vsLastCaptionTrack = tt.label;
  49.  
  50. function cleanup(e) {
  51. for (let i = 0; i < v.textTracks.length; ++i) {
  52. const ott = v.textTracks[i];
  53. if (ott.mode === 'showing') {
  54. delete v.cbhtml5vsLastCaptionTrack;
  55. v.textTracks.removeEventListener('change', cleanup);
  56. return;
  57. }
  58. }
  59. }
  60. v.textTracks.addEventListener('change', cleanup);
  61. }
  62. return;
  63. } else if (tt.mode !== 'hidden') {
  64. validTracks.push(tt);
  65. }
  66. }
  67. // If we got here, none of the tracks were selected.
  68. if (validTracks.length === 0) {
  69. return true; // Do not prevent default if no UI activated
  70. }
  71. // Find the best one and select it.
  72. validTracks.sort((a, b) => {
  73. if (v.cbhtml5vsLastCaptionTrack) {
  74. const lastLabel = v.cbhtml5vsLastCaptionTrack;
  75.  
  76. if (a.label === lastLabel && b.label !== lastLabel) {
  77. return -1;
  78. } else if (b.label === lastLabel && a.label !== lastLabel) {
  79. return 1;
  80. }
  81. }
  82.  
  83. const aLang = a.language.toLowerCase();
  84. const bLang = b.language.toLowerCase();
  85. const navLang = navigator.language.toLowerCase();
  86.  
  87. if (aLang === navLang && bLang !== navLang) {
  88. return -1;
  89. } else if (bLang === navLang && aLang !== navLang) {
  90. return 1;
  91. }
  92.  
  93. const aPre = aLang.split('-')[0];
  94. const bPre = bLang.split('-')[0];
  95. const navPre = navLang.split('-')[0];
  96.  
  97. if (aPre === navPre && bPre !== navPre) {
  98. return -1;
  99. } else if (bPre === navPre && aPre !== navPre) {
  100. return 1;
  101. }
  102.  
  103. return 0;
  104. })[0].mode = 'showing';
  105. },
  106.  
  107. togglePlay: v => {
  108. v.paused ? v.play() : v.pause();
  109. },
  110.  
  111. toStart: v => {
  112. v.currentTime = 0;
  113. },
  114.  
  115. toEnd: v => {
  116. v.currentTime = v.duration;
  117. },
  118.  
  119. skipLeft: (v, key, shift, ctrl) => {
  120. if (shift) {
  121. v.currentTime -= settings.skipShift;
  122. } else if (ctrl) {
  123. v.currentTime -= settings.skipCtrl;
  124. } else {
  125. v.currentTime -= settings.skipNormal;
  126. }
  127. },
  128.  
  129. skipRight: (v, key, shift, ctrl) => {
  130. if (shift) {
  131. v.currentTime += settings.skipShift;
  132. } else if (ctrl) {
  133. v.currentTime += settings.skipCtrl;
  134. } else {
  135. v.currentTime += settings.skipNormal;
  136. }
  137. },
  138.  
  139. increaseVol: v => {
  140. if (audioError) return;
  141. if (v.nextSibling.querySelector('volume.disabled')) {
  142. v.volume = 0;
  143. return;
  144. }
  145. const increase = (v.volume + 0.1).toFixed(1);
  146. if (v.muted) {
  147. v.muted = !v.muted;
  148. v.volume = 0.1;
  149. } else {
  150. v.volume <= 0.9 ? v.volume = increase : v.volume = 1;
  151. }
  152. },
  153.  
  154. decreaseVol: v => {
  155. if (audioError) return;
  156. if (v.nextSibling.querySelector('volume.disabled')) {
  157. v.volume = 0;
  158. return;
  159. }
  160. const decrease = (v.volume - 0.1).toFixed(1);
  161. v.volume >= 0.1 ? v.volume = decrease : v.volume = 0;
  162. },
  163.  
  164. toggleMute: v => {
  165. v.muted = !v.muted;
  166. if (audioSync) imagusAudio.muted = v.muted;
  167. },
  168.  
  169. toggleFS: v => {
  170. if (document.fullscreenElement) {
  171. document.exitFullscreen();
  172. v.parentElement.classList.remove('native-fullscreen');
  173. } else {
  174. v.parentElement.classList.add('native-fullscreen');
  175. v.parentElement.requestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
  176. }
  177. },
  178.  
  179. reloadVideo: v => {
  180. const currTime = v.currentTime;
  181. v.load();
  182. v.currentTime = currTime;
  183. },
  184.  
  185. slowOrPrevFrame: (v, key, shift) => {
  186. if (shift) { // Less-Than
  187. v.currentTime -= 1 / 60;
  188. } else { // Comma
  189. if (v.playbackRate >= 0.1) {
  190. const decrease = (v.playbackRate - 0.1).toFixed(2);
  191. const rate = v.nextSibling.querySelector('rate');
  192. v.playbackRate = decrease;
  193. rate.textContent = `${v.playbackRate}x`;
  194. if (v.playbackRate !== 1) {
  195. rate.setAttribute('data-current-rate', `${v.playbackRate}x`);
  196. }
  197. if (v.playbackRate === 0.9) {
  198. v.classList.add('playback-rate-decreased');
  199. } else if (v.playbackRate === 1.1) {
  200. v.classList.add('playback-rate-increased');
  201. } else if (v.playbackRate === 1) {
  202. v.classList.remove('playback-rate-decreased');
  203. v.classList.remove('playback-rate-increased');
  204. rate.removeAttribute('data-current-rate');
  205. }
  206. } else {
  207. v.playbackRate = 0;
  208. }
  209. if (audioSync) imagusAudio.playbackRate = v.playbackRate;
  210. }
  211. },
  212.  
  213. fastOrNextFrame: (v, key, shift) => {
  214. if (shift) { // Greater-Than
  215. v.currentTime += 1 / 60;
  216. } else { // Period
  217. if (v.playbackRate <= 15.9) {
  218. const increase = (v.playbackRate += 0.1).toFixed(2);
  219. const rate = v.nextSibling.querySelector('rate');
  220. v.playbackRate = increase;
  221. rate.textContent = `${v.playbackRate}x`;
  222. if (v.playbackRate !== 1) {
  223. rate.setAttribute('data-current-rate', `${v.playbackRate}x`);
  224. }
  225. if (v.playbackRate === 0.9) {
  226. v.classList.add('playback-rate-decreased');
  227. } else if (v.playbackRate === 1.1) {
  228. v.classList.add('playback-rate-increased');
  229. } else if (v.playbackRate === 1) {
  230. v.classList.remove('playback-rate-decreased');
  231. v.classList.remove('playback-rate-increased');
  232. rate.removeAttribute('data-current-rate');
  233. }
  234. } else {
  235. v.playbackRate = 16;
  236. }
  237. if (audioSync) imagusAudio.playbackRate = v.playbackRate;
  238. }
  239. },
  240.  
  241. normalSpeed: v => { // ?
  242. v.playbackRate = v.defaultPlaybackRate;
  243. if (audioSync) imagusAudio.playbackRate = v.playbackRate;
  244. v.classList.remove('playback-rate-decreased');
  245. v.classList.remove('playback-rate-increased');
  246. v.nextSibling.querySelector('rate').textContent = '1x';
  247. v.nextSibling.querySelector('rate').removeAttribute('data-current-rate');
  248. },
  249.  
  250. toPercentage: (v, key) => {
  251. v.currentTime = (v.duration * (key - 48)) / 10.0;
  252. },
  253. };
  254.  
  255. const keyFuncs = {
  256. 32: shortcutFuncs.togglePlay, // Space
  257. 75: shortcutFuncs.togglePlay, // K
  258. 35: shortcutFuncs.toEnd, // End
  259. 48: shortcutFuncs.toStart, // 0
  260. 36: shortcutFuncs.toStart, // Home
  261. 37: shortcutFuncs.skipLeft, // Left arrow
  262. 74: shortcutFuncs.skipLeft, // J
  263. 39: shortcutFuncs.skipRight, // Right arrow
  264. 76: shortcutFuncs.skipRight, // L
  265. 38: shortcutFuncs.increaseVol, // Up arrow
  266. 40: shortcutFuncs.decreaseVol, // Down arrow
  267. 77: shortcutFuncs.toggleMute, // M
  268. 70: shortcutFuncs.toggleFS, // F
  269. 67: shortcutFuncs.toggleCaptions, // C
  270. 82: shortcutFuncs.reloadVideo, // R
  271. 188: shortcutFuncs.slowOrPrevFrame, // Comma or Less-Than
  272. 190: shortcutFuncs.fastOrNextFrame, // Period or Greater-Than
  273. 191: shortcutFuncs.normalSpeed, // Forward slash or ?
  274. 49: shortcutFuncs.toPercentage, // 1
  275. 50: shortcutFuncs.toPercentage, // 2
  276. 51: shortcutFuncs.toPercentage, // 3
  277. 52: shortcutFuncs.toPercentage, // 4
  278. 53: shortcutFuncs.toPercentage, // 5
  279. 54: shortcutFuncs.toPercentage, // 6
  280. 55: shortcutFuncs.toPercentage, // 7
  281. 56: shortcutFuncs.toPercentage, // 8
  282. 57: shortcutFuncs.toPercentage, // 9
  283. };
  284.  
  285. function customPlayer(v) {
  286. let videoWrapper;
  287. let savedTimeKey;
  288. let mouseDown;
  289. let isPlaying;
  290. let isSeeking;
  291. let earlyXposPercent;
  292. let preventMouseMove;
  293. let controlsTimeout;
  294. let imagusMouseTimeout;
  295. let imagusVid;
  296. let muteTillSync;
  297. let loaded;
  298. let error;
  299. let elToFocus;
  300. let clickCount = 0;
  301. let repeat = 0;
  302. const directVideo = /video/.test(document.contentType) &&
  303. document.body.firstElementChild === v;
  304. const controls = document.createElement('controls');
  305. const imagus = v.classList.contains('imagus');
  306. if (imagus && !imagusVid) {
  307. imagusVid = v;
  308. imagusAudio = document.createElement('video');
  309. imagusAudio.preload = 'auto';
  310. imagusAudio.autoplay = 'true';
  311. imagusAudio.className = 'imagus imagus-audio';
  312. imagusAudio.style = 'display: none!important;';
  313. imagusVid.parentElement.insertBefore(imagusAudio, imagusVid);
  314. }
  315. if (directVideo) {
  316. elToFocus = document.body;
  317. self === top ? document.body.classList.add('direct-video-top-level') :
  318. document.body.classList.add('direct-video-embed');
  319. } else {
  320. elToFocus = v;
  321. videoWrapper = document.createElement('videowrapper');
  322. v.parentNode.insertBefore(videoWrapper, v);
  323. videoWrapper.appendChild(v);
  324. if (!imagus) {
  325. const compStyles = getComputedStyle(v);
  326. const position = compStyles.getPropertyValue('position');
  327. const zIndex = compStyles.getPropertyValue('z-index');
  328. if (position === 'absolute') {
  329. videoWrapper.style.setProperty('--wrapper-position', `${position}`);
  330. }
  331. if (zIndex !== 'auto') {
  332. controls.style.setProperty('--controls-z-index', `calc(${zIndex} + 1)`);
  333. }
  334. }
  335. }
  336. v.parentNode.insertBefore(controls, v.nextSibling);
  337. const playButton = document.createElement('btn');
  338. playButton.className = 'toggle-play';
  339. controls.appendChild(playButton);
  340. const beginButton = document.createElement('btn');
  341. beginButton.className = 'begin';
  342. controls.appendChild(beginButton);
  343. const skipLongLeft = document.createElement('btn');
  344. skipLongLeft.className = 'skip-long left';
  345. controls.appendChild(skipLongLeft);
  346. const skipShortLeft = document.createElement('btn');
  347. skipShortLeft.className = 'skip-short left';
  348. controls.appendChild(skipShortLeft);
  349. const skipShortRight = document.createElement('btn');
  350. skipShortRight.className = 'skip-short right';
  351. controls.appendChild(skipShortRight);
  352. const skipLongRight = document.createElement('btn');
  353. skipLongRight.className = 'skip-long right';
  354. controls.appendChild(skipLongRight);
  355. const timelineWrapper = document.createElement('timelinewrapper');
  356. controls.appendChild(timelineWrapper);
  357. const currentTime = document.createElement('currenttime');
  358. currentTime.textContent = '0:00';
  359. timelineWrapper.appendChild(currentTime);
  360. const timeline = document.createElement('timeline');
  361. timelineWrapper.appendChild(timeline);
  362. const timeBar = document.createElement('timebar');
  363. timeline.appendChild(timeBar);
  364. const timeBuffer = document.createElement('timebuffer');
  365. timeBar.appendChild(timeBuffer);
  366. const timeProgress = document.createElement('timeprogress');
  367. timeBar.appendChild(timeProgress);
  368. const timeSlider = document.createElement('input');
  369. timeSlider.type = 'range';
  370. timeSlider.value = 0;
  371. timeSlider.min = 0;
  372. timeSlider.max = 100;
  373. timeSlider.step = 0.01;
  374. timeSlider.textContent = '';
  375. timeline.appendChild(timeSlider);
  376. const timeTooltip = document.createElement('timetooltip');
  377. timeTooltip.className = 'hidden';
  378. timeTooltip.textContent = '-:-';
  379. timeline.appendChild(timeTooltip);
  380. const totalTime = document.createElement('totaltime');
  381. totalTime.textContent = '-:-';
  382. timelineWrapper.appendChild(totalTime);
  383. const rateDecrease = document.createElement('btn');
  384. rateDecrease.className = 'rate-decrease';
  385. controls.appendChild(rateDecrease);
  386. const rate = document.createElement('rate');
  387. rate.textContent = '1x';
  388. controls.appendChild(rate);
  389. const rateIncrease = document.createElement('btn');
  390. rateIncrease.className = 'rate-increase';
  391. controls.appendChild(rateIncrease);
  392. const volume = document.createElement('volume');
  393. controls.appendChild(volume);
  394. const volumeBar = document.createElement('volumebar');
  395. volume.appendChild(volumeBar);
  396. const volumeTrail = document.createElement('volumetrail');
  397. volumeBar.appendChild(volumeTrail);
  398. const volumeSlider = document.createElement('input');
  399. volumeSlider.type = 'range';
  400. volumeSlider.min = 0;
  401. volumeSlider.max = 1;
  402. volumeSlider.step = 0.01;
  403. volumeSlider.textContent = '';
  404. volume.appendChild(volumeSlider);
  405. const volumeTooltip = document.createElement('volumetooltip');
  406. volumeTooltip.className = 'hidden';
  407. volumeTooltip.textContent = '0%';
  408. volume.appendChild(volumeTooltip);
  409. const muteButton = document.createElement('btn');
  410. muteButton.className = 'mute';
  411. controls.appendChild(muteButton);
  412. const expandButton = document.createElement('btn');
  413. expandButton.className = 'expand';
  414. controls.appendChild(expandButton);
  415. v.classList.remove('custom-native-player-hidden');
  416. if (v.querySelector('source')) v.classList.add('contains-source');
  417. if (videoWrapper) enforcePosition();
  418. volumeValues();
  419.  
  420. v.onloadedmetadata = () => {
  421. loaded = true;
  422. shortcutFuncs.normalSpeed(v);
  423. v.classList.add('loaded');
  424. if (videoWrapper) videoWrapper.classList.add('loaded');
  425. savedTimeKey = `${location.pathname}${location.search}${v.duration}`;
  426. const savedTime = localStorage.getItem(savedTimeKey);
  427. if (timeSlider.value === '0') {
  428. if (savedTime) v.currentTime = savedTime;
  429. } else if (earlyXposPercent) {
  430. const time = (earlyXposPercent * v.duration) / 100;
  431. v.currentTime = time;
  432. }
  433. currentTime.textContent = formatTime(v.currentTime);
  434. totalTime.textContent = formatTime(v.duration);
  435. v.classList.remove('disabled');
  436. sliderValues();
  437. };
  438.  
  439. v.onloadeddata = () => {
  440. const imagusVreddit = /v\.redd\.it/.test(v.src);
  441. if (!hasAudio(v) && !imagusVreddit) {
  442. v.classList.add('muted');
  443. volumeSlider.value = 0;
  444. muteButton.classList.add('disabled');
  445. volume.classList.add('disabled');
  446. } else if (hasAudio(v) && !imagusVreddit) {
  447. if (v.volume && !v.muted) v.classList.remove('muted');
  448. volumeValues();
  449. if (volume.classList.contains('disabled')) {
  450. muteButton.classList.remove('disabled');
  451. volume.classList.remove('disabled');
  452. }
  453. }
  454. elToFocus.focus({preventScroll: true});
  455. if (v.duration <= settings.skipNormal) {
  456. skipShortLeft.classList.add('disabled');
  457. skipShortRight.classList.add('disabled');
  458. } else {
  459. skipShortLeft.classList.remove('disabled');
  460. skipShortRight.classList.remove('disabled');
  461. }
  462. if (v.duration <= settings.skipShift) {
  463. skipLongLeft.classList.add('disabled');
  464. skipLongRight.classList.add('disabled');
  465. } else {
  466. skipLongLeft.classList.remove('disabled');
  467. skipLongRight.classList.remove('disabled');
  468. }
  469. if (v.paused) {
  470. v.classList.add('paused');
  471. if (videoWrapper) videoWrapper.classList.add('paused');
  472. }
  473. if (imagus) v.currentTime = 0;
  474. };
  475.  
  476. v.oncanplay = () => {
  477. v.oncanplay = null;
  478. if (!loaded) {
  479. v.load();
  480. console.log('reloaded');
  481. }
  482. };
  483.  
  484. v.onprogress = () => {
  485. if (v.readyState > 1 && v.duration > 0) {
  486. const buffer = (v.buffered.end(v.buffered.length - 1) / v.duration) * 100;
  487. timeBuffer.style.width = `${buffer}%`;
  488. }
  489. };
  490.  
  491. v.ontimeupdate = () => {
  492. if (v.readyState > 0) {
  493. if (v.duration > 0 && !mouseDown) {
  494. sliderValues();
  495. totalTime.textContent = formatTime(v.duration);
  496. if (!imagus && savedTimeKey) localStorage.setItem(savedTimeKey, v.currentTime)
  497. }
  498. }
  499. };
  500.  
  501. v.onvolumechange = () => {
  502. if (audioError) return;
  503. if (audioSync) imagusAudio.volume = v.volume;
  504. if (v.muted || !v.volume) {
  505. v.classList.add('muted');
  506. volumeSlider.value = 0;
  507. volumeTrail.style.width = '0';
  508. localStorage.setItem('videomuted', 'true');
  509. } else {
  510. v.classList.remove('muted');
  511. sliderValues();
  512. v.volume > 0.1 ? localStorage.setItem('videovolume', v.volume) :
  513. localStorage.setItem('videovolume', 0.1);
  514. localStorage.setItem('videomuted', 'false');
  515. }
  516. };
  517.  
  518. v.onplay = () => {
  519. if (v === imagusVid && audioSync) imagusAudio.play();
  520. v.classList.remove('paused');
  521. if (videoWrapper) videoWrapper.classList.remove('paused');
  522. v.classList.add('playing');
  523. };
  524.  
  525. v.onpause = () => {
  526. if (v === imagusVid && audioSync) imagusAudio.pause();
  527. if (!isSeeking) {
  528. v.classList.remove('playing');
  529. v.classList.add('paused');
  530. if (videoWrapper) videoWrapper.classList.add('paused');
  531. }
  532. };
  533.  
  534. v.onended = () => {
  535. if (localStorage.getItem(savedTimeKey)) localStorage.removeItem(savedTimeKey);
  536. savedTimeKey = false;
  537. };
  538.  
  539. v.onemptied = () => {
  540. if (v === imagusVid) {
  541. if (v.src !== '') {
  542. if (/v\.redd\.it/.test(v.src)) {
  543. const audioSrc = `${v.src.split('DASH')[0]}audio`;
  544. imagusAudio.src = audioSrc;
  545. if (!imagusAudio.muted) {
  546. muteTillSync = true;
  547. imagusAudio.muted = true;
  548. }
  549. if (imagusVid.hasAttribute('loop')) imagusAudio.setAttribute('loop', 'true');
  550. }
  551. v.parentElement.parentElement.classList.add('imagus-video-wrapper');
  552. window.addEventListener('click', imagusClick, true);
  553. document.addEventListener('keyup', imagusKeys, true);
  554. document.addEventListener('mousedown', imagusMouseDown, true);
  555. document.addEventListener('mouseup', imagusMouseUp, true);
  556. } else {
  557. audioSync = false;
  558. audioError = false;
  559. imagusAudio.pause();
  560. imagusAudio.removeAttribute('src');
  561. imagusAudio.load();
  562. imagusAudio.removeAttribute('loop');
  563. v.parentElement.parentElement.removeAttribute('class');
  564. timeTooltip.classList.add('hidden');
  565. window.removeEventListener('click', imagusClick, true);
  566. document.removeEventListener('keyup', imagusKeys, true);
  567. document.removeEventListener('mousedown', imagusMouseDown, true);
  568. document.removeEventListener('mouseup', imagusMouseUp, true);
  569. }
  570. }
  571. };
  572.  
  573. v.onerror = () => {
  574. error = true;
  575. elToFocus.blur();
  576. v.classList.add('disabled');
  577. };
  578.  
  579. v.onmousedown = e => {
  580. if (error && e.button !== 2) return;
  581. e.stopPropagation();
  582. e.stopImmediatePropagation();
  583. if (e.button === 0) {
  584. clickCount++;
  585. const checkState = v.paused;
  586. if (clickCount === 1) {
  587. setTimeout(() => {
  588. if (clickCount === 1) {
  589. // avoid conflicts with existing click listeners
  590. const recheckState = v.paused;
  591. if (checkState === recheckState) shortcutFuncs.togglePlay(v);
  592. } else {
  593. shortcutFuncs.toggleFS(v);
  594. }
  595. clickCount = 0;
  596. }, settings.clickDelay);
  597. }
  598. } else if (e.button === 2) {
  599. window.addEventListener('contextmenu', preventHijack, true);
  600. }
  601. };
  602.  
  603. v.onmouseup = e => {
  604. if (e.button === 2) {
  605. setTimeout(() => {
  606. window.removeEventListener('contextmenu', preventHijack, true);
  607. }, 100);
  608. }
  609. if (error) elToFocus.blur();
  610. };
  611.  
  612. v.onmousemove = () => {
  613. controlsTimeout ? clearTimeout(controlsTimeout) :
  614. v.classList.add('active');
  615. if (videoWrapper) videoWrapper.classList.add('active');
  616. controlsTimeout = setTimeout(() => {
  617. controlsTimeout = false;
  618. v.classList.remove('active');
  619. if (videoWrapper) videoWrapper.classList.remove('active');
  620. }, settings.hideControls);
  621. };
  622.  
  623. new ResizeObserver(() => {
  624. compactControls();
  625. }).observe(v);
  626.  
  627. controls.onmouseup = () => {
  628. if (error) return;
  629. elToFocus.focus({preventScroll: true});
  630. };
  631.  
  632. timeSlider.onmousemove = () => sliderValues();
  633.  
  634. timeSlider.oninput = () => sliderValues();
  635.  
  636. timeSlider.onmousedown = e => {
  637. if (e.button > 0) return;
  638. mouseDown = true;
  639. isSeeking = true;
  640. if (timeTooltip.classList.contains('hidden')) sliderValues();
  641. if (v.readyState > 0) {
  642. if (!v.paused) {
  643. isPlaying = true;
  644. v.pause();
  645. } else {
  646. isPlaying = false;
  647. }
  648. }
  649. };
  650.  
  651. timeSlider.onmouseup = e => {
  652. if (e.button > 0) return;
  653. mouseDown = false;
  654. isSeeking = false;
  655. if (v.readyState > 0) {
  656. sliderValues();
  657. if (isPlaying) {
  658. v.play();
  659. isPlaying = false;
  660. }
  661. }
  662. };
  663.  
  664. volumeSlider.onmousemove = () => sliderValues();
  665.  
  666. volumeSlider.oninput = () => {
  667. if (v.muted) shortcutFuncs.toggleMute(v);
  668. sliderValues();
  669. };
  670.  
  671. muteButton.onmouseup = e => {
  672. if (e.button > 0) return;
  673. const lastVolume = localStorage.getItem('videovolume');
  674. if (v.muted || v.volume) shortcutFuncs.toggleMute(v);
  675. v.volume = lastVolume;
  676. if (audioSync) imagusAudio.muted = v.muted;
  677. };
  678.  
  679. playButton.onmouseup = e => {
  680. if (e.button > 0) return;
  681. shortcutFuncs.togglePlay(v);
  682. };
  683.  
  684. skipShortLeft.onmouseup = e => {
  685. if (e.button > 0) return;
  686. shortcutFuncs.skipLeft(v);
  687. };
  688.  
  689. skipShortRight.onmouseup = e => {
  690. if (e.button > 0) return;
  691. shortcutFuncs.skipRight(v);
  692. };
  693.  
  694. skipLongLeft.onmouseup = e => {
  695. if (e.button > 0) return;
  696. v.currentTime -= settings.skipShift;
  697. };
  698.  
  699. skipLongRight.onmouseup = e => {
  700. if (e.button > 0) return;
  701. v.currentTime += settings.skipShift;
  702. };
  703.  
  704. beginButton.onmouseup = e => {
  705. if (e.button > 0) return;
  706. v.currentTime = 0;
  707. timeSlider.value = 0;
  708. timeProgress.style.width = '0';
  709. currentTime.textContent = '0:00';
  710. };
  711.  
  712. rateDecrease.onmouseup = e => {
  713. if (e.button > 0) return;
  714. shortcutFuncs.slowOrPrevFrame(v);
  715. };
  716.  
  717. rateIncrease.onmouseup = e => {
  718. if (e.button > 0) return;
  719. shortcutFuncs.fastOrNextFrame(v);
  720. };
  721.  
  722. rate.onmouseup = e => {
  723. if (e.button > 0) return;
  724. shortcutFuncs.normalSpeed(v);
  725. };
  726.  
  727. rate.onmouseenter = () => {
  728. rate.textContent = '1x?';
  729. };
  730.  
  731. rate.onmouseleave = () => {
  732. const currentRate = rate.getAttribute('data-current-rate');
  733. if (currentRate) rate.textContent = currentRate;
  734. };
  735.  
  736. expandButton.onmouseup = e => {
  737. if (e.button > 0) return;
  738. shortcutFuncs.toggleFS(v);
  739. };
  740.  
  741. // exiting fullscreen by escape key or other browser provided method
  742. document.onfullscreenchange = () => {
  743. if (!document.fullscreenElement) {
  744. const nativeFS = $('.native-fullscreen');
  745. if (nativeFS) nativeFS.classList.remove('native-fullscreen');
  746. }
  747. };
  748.  
  749. if (imagusVid) {
  750. imagusAudio.onloadedmetadata = () => {
  751. audioSync = true;
  752. if (v.hasAttribute('autoplay')) imagusAudio.play();
  753. };
  754.  
  755. imagusAudio.onloadeddata = () => {
  756. if (v.volume && !v.muted) v.classList.remove('muted');
  757. volumeValues(v);
  758. if (volume.classList.contains('disabled')) {
  759. muteButton.classList.remove('disabled');
  760. volume.classList.remove('disabled');
  761. }
  762. };
  763.  
  764. imagusAudio.onended = () => {
  765. imagusAudio.currentTime = 0;
  766. if (imagusVid.hasAttribute('loop')) imagusAudio.play();
  767. };
  768.  
  769. imagusAudio.onerror = () => {
  770. audioError = true;
  771. v.classList.add('muted');
  772. volumeSlider.value = 0;
  773. muteButton.classList.add('disabled');
  774. volume.classList.add('disabled');
  775. };
  776. }
  777.  
  778. if (directVideo) {
  779. v.removeAttribute('tabindex');
  780. document.body.setAttribute('tabindex', '0');
  781. document.addEventListener('keydown', docHandleKeyDown, true);
  782. document.addEventListener('keypress', docHandleKeyOther, true);
  783. document.addEventListener('keyup', docHandleKeyOther, true);
  784. } else {
  785. v.addEventListener('keydown', handleKeyDown, false);
  786. v.addEventListener('keypress', handleKeyOther, false);
  787. v.addEventListener('keyup', handleKeyOther, false);
  788. }
  789.  
  790. function sliderValues() {
  791. let slider;
  792. let xPosition;
  793. const vid = audioSync ? imagusAudio && v : v;
  794. const eType = event && event.type;
  795. const eTime = eType === 'timeupdate';
  796. const eVolume = eType === 'volumechange';
  797. const eMeta = eType === 'loadedmetadata';
  798. const eData = eType === 'loadeddata';
  799. const eInput = eType === 'input';
  800. const eMouseUp = eType === 'mouseup';
  801. const eMouseMove = eType === 'mousemove';
  802. const eMouseDown = eType === 'mousedown';
  803. if (eMeta || eTime || eVolume || eData || !event) {
  804. slider = eMeta || eTime ? timeSlider : volumeSlider;
  805. } else {
  806. slider = event.target;
  807. }
  808. const tooltip = slider.nextSibling;
  809. const timeTarget = slider === timeSlider;
  810. const sliderWidth = slider.clientWidth;
  811. const halfSlider = sliderWidth / 2;
  812. const slider14ths = halfSlider / 7;
  813. const eX = event && event.offsetX;
  814. const start7 = eX <= 7;
  815. const end7 = eX >= sliderWidth - 7;
  816. if (eMouseMove || eMouseDown) {
  817. if (start7 || end7) {
  818. xPosition = start7 ? 0 : sliderWidth;
  819. } else {
  820. xPosition = eX < halfSlider ? (eX + (-7 + (eX / slider14ths))).toFixed(1) :
  821. (eX + ((eX - halfSlider) / slider14ths)).toFixed(1);
  822. }
  823. }
  824. if (eMeta || eTime || eVolume || eData || !event) {
  825. xPosition = eMeta || eTime ?
  826. ((((100 / v.duration) * v.currentTime) * sliderWidth) / 100).toFixed(1) :
  827. (v.volume * sliderWidth).toFixed(1);
  828. }
  829. if (eTime && event.target === imagusVid && audioSync) {
  830. if (imagusVid.currentTime - imagusAudio.currentTime >= 0.1 ||
  831. imagusVid.currentTime - imagusAudio.currentTime <= -0.1) {
  832. imagusAudio.currentTime = imagusVid.currentTime + 0.06;
  833. console.log('time sync corrected');
  834. if (muteTillSync && imagusAudio.readyState > 2) {
  835. imagusAudio.muted = false;
  836. muteTillSync = false;
  837. console.log('unmuted after time correct');
  838. }
  839. } else if (muteTillSync && imagusAudio.readyState > 2) {
  840. imagusAudio.muted = false;
  841. muteTillSync = false;
  842. console.log('unmuted');
  843. }
  844. }
  845. if (eInput || eMouseUp) xPosition = +tooltip.getAttribute('data-x-position');
  846. const xPosPercent = timeTarget ? (xPosition / sliderWidth) * 100 :
  847. Math.round((xPosition / sliderWidth) * 100);
  848. const time = (xPosPercent * v.duration) / 100;
  849. if (eInput || eMeta || eTime || eVolume || eData || !event) {
  850. const valueTrail = timeTarget ? timeProgress : volumeTrail;
  851. const offset = halfSlider < xPosition ? -7 + (xPosition / slider14ths) :
  852. (xPosition - halfSlider) / slider14ths;
  853. slider.value = timeTarget ? xPosPercent : xPosPercent / 100;
  854. valueTrail.style.width = `calc(${xPosPercent}% - ${offset}px)`;
  855. if (eInput && !timeTarget) {
  856. if (start7 || end7) {
  857. vid.volume = start7 ? 0 : 1;
  858. } else {
  859. vid.volume = xPosPercent / 100;
  860. }
  861. }
  862. if (eInput && timeTarget && v.readyState > 0) currentTime.textContent = formatTime(time);
  863. if (eTime) currentTime.textContent = formatTime(v.currentTime);
  864. if (eInput && timeTarget && v.readyState < 1) earlyXposPercent = xPosPercent;
  865. } else if (eMouseUp) {
  866. if (audioSync) {
  867. if (start7 || end7) {
  868. imagusAudio.currentTime = start7 ? 0 : v.duration;
  869. } else {
  870. imagusAudio.currentTime = time;
  871. }
  872. }
  873. if (start7 || end7) {
  874. v.currentTime = start7 ? 0 : v.duration;
  875. } else {
  876. v.currentTime = time;
  877. }
  878. preventMouseMove = true;
  879. setTimeout(() => {
  880. preventMouseMove = false;
  881. }, 10);
  882. } else if (eMouseMove || eMouseDown) {
  883. if (!preventMouseMove || eMouseDown) {
  884. tooltip.dataset.xPosition = xPosition;
  885. tooltip.style.left = `${eX}px`;
  886. if (v.readyState > 0 && timeTarget) tooltip.textContent = formatTime(time);
  887. if (!timeTarget) tooltip.textContent = `${xPosPercent}%`;
  888. }
  889. tooltip.classList.remove('hidden');
  890. preventMouseMove = false;
  891. } else if (eMeta) {
  892. tooltip.textContent = formatTime(time);
  893. }
  894. }
  895.  
  896. function formatTime(t) {
  897. let seconds = Math.round(t);
  898. const minutes = Math.floor(seconds / 60);
  899. if (minutes > 0) seconds -= minutes * 60;
  900. if (seconds.toString().length === 1) seconds = `0${seconds}`;
  901. return `${minutes}:${seconds}`;
  902. }
  903.  
  904. function volumeValues() {
  905. const videovolume = localStorage.getItem('videovolume');
  906. const videomuted = localStorage.getItem('videomuted');
  907. if ((!videovolume && !videomuted) ||
  908. (videovolume && videovolume === '1' &&
  909. videomuted && videomuted !== 'true')) {
  910. v.volume = 1;
  911. volumeSlider.value = 1;
  912. volumeTrail.style.width = '100%';
  913. localStorage.setItem('videovolume', v.volume);
  914. localStorage.setItem('videomuted', 'false');
  915. } else if (videomuted && videomuted === 'true') {
  916. v.classList.add('muted');
  917. volumeSlider.value = 0;
  918. volumeTrail.style.width = '0';
  919. v.muted = true;
  920. } else {
  921. v.volume = videovolume;
  922. if (audioSync) imagusAudio.volume = v.volume;
  923. sliderValues();
  924. if (!volumeSlider.clientWidth) {
  925. new MutationObserver((_, observer) => {
  926. const volumeWidthSet = v.parentElement.querySelector('volume input').clientWidth;
  927. if (volumeWidthSet) {
  928. sliderValues();
  929. observer.disconnect();
  930. }
  931. }).observe(v.parentElement, {childList: true, subtree: true});
  932. }
  933. }
  934. }
  935.  
  936. function hasAudio() {
  937. return v.mozHasAudio ||
  938. Boolean(v.webkitAudioDecodedByteCount) ||
  939. Boolean(v.audioTracks && v.audioTracks.length);
  940. }
  941.  
  942. function compactControls() {
  943. const width = v.clientWidth;
  944. width < 892 ? v.classList.add('compact') : v.classList.remove('compact');
  945. width < 412 ? v.classList.add('compact-2') : v.classList.remove('compact-2');
  946. width < 316 ? v.classList.add('compact-3') : v.classList.remove('compact-3');
  947. width < 246 ? v.classList.add('compact-4') : v.classList.remove('compact-4');
  948. }
  949.  
  950. function imagusMouseDown(e) {
  951. const vid = $('.imagus-video-wrapper');
  952. if (vid && e.button === 2) {
  953. e.stopImmediatePropagation();
  954. imagusMouseTimeout = setTimeout(() => {
  955. imagusMouseTimeout = 'sticky';
  956. }, settings.imagusStickyDelay);
  957. }
  958. }
  959.  
  960. function imagusMouseUp(e) {
  961. const vid = $('.imagus-video-wrapper');
  962. if (vid && e.button === 2) {
  963. if (imagusMouseTimeout === 'sticky') {
  964. vid.classList.add('stickied');
  965. if (volume.classList.contains('disabled')) volumeSlider.value = 0;
  966. document.removeEventListener('mousedown', imagusMouseDown, true);
  967. document.removeEventListener('mouseup', imagusMouseUp, true);
  968. } else {
  969. clearInterval(imagusMouseTimeout);
  970. imagusMouseTimeout = false;
  971. }
  972. }
  973. }
  974.  
  975. function imagusClick(e) {
  976. const imagusStickied = $('.imagus-video-wrapper.stickied');
  977. if (imagusStickied) {
  978. if (e.target.closest('.imagus-video-wrapper.stickied')) {
  979. e.stopImmediatePropagation();
  980. } else {
  981. imagusStickied.removeAttribute('class');
  982. e.preventDefault();
  983. }
  984. }
  985. }
  986.  
  987. function imagusKeys(e) {
  988. const vid = $('.imagus-video-wrapper');
  989. if (vid) {
  990. if (e.keyCode === 90) {
  991. vid.classList.add('stickied');
  992. if (volume.classList.contains('disabled')) volumeSlider.value = 0;
  993. document.removeEventListener('mousedown', imagusMouseDown, true);
  994. document.removeEventListener('mouseup', imagusMouseUp, true);
  995. }
  996. }
  997. }
  998.  
  999. function handleKeyDown(e) {
  1000. if (e.altKey || e.metaKey) {
  1001. return true; // Do not activate
  1002. }
  1003. const func = keyFuncs[e.keyCode];
  1004. if (func) {
  1005. if ((func.length < 3 && e.shiftKey) ||
  1006. (func.length < 4 && e.ctrlKey)) {
  1007. return true; // Do not activate
  1008. }
  1009. func(e.target, e.keyCode, e.shiftKey, e.ctrlKey);
  1010. e.preventDefault();
  1011. e.stopPropagation();
  1012. return false;
  1013. }
  1014. }
  1015.  
  1016. function handleKeyOther(e) {
  1017. if (e.altKey || e.metaKey) {
  1018. return true; // Do not prevent default
  1019. }
  1020. const func = keyFuncs[e.keyCode];
  1021. if (func) {
  1022. if ((func.length < 3 && e.shiftKey) ||
  1023. (func.length < 4 && e.ctrlKey)) {
  1024. return true; // Do not prevent default
  1025. }
  1026. e.preventDefault();
  1027. e.stopPropagation();
  1028. return false;
  1029. }
  1030. }
  1031.  
  1032. function docHandleKeyDown(e) {
  1033. if (document.body !== document.activeElement || e.altKey || e.metaKey) {
  1034. return true; // Do not activate
  1035. }
  1036. const func = keyFuncs[e.keyCode];
  1037. if (func) {
  1038. if ((func.length < 3 && e.shiftKey) ||
  1039. (func.length < 4 && e.ctrlKey)) {
  1040. return true; // Do not activate
  1041. }
  1042. func(v, e.keyCode, e.shiftKey, e.ctrlKey);
  1043. e.preventDefault();
  1044. e.stopPropagation();
  1045. return false;
  1046. }
  1047. }
  1048.  
  1049. function docHandleKeyOther(e) {
  1050. if (document.body !== document.activeElement || e.altKey || e.metaKey) {
  1051. return true; // Do not prevent default
  1052. }
  1053. const func = keyFuncs[e.keyCode];
  1054. if (func) {
  1055. if ((func.length < 3 && e.shiftKey) ||
  1056. (func.length < 4 && e.ctrlKey)) {
  1057. return true; // Do not prevent default
  1058. }
  1059. e.preventDefault();
  1060. e.stopPropagation();
  1061. return false;
  1062. }
  1063. }
  1064.  
  1065. // circumvent any scripts attempting to hijack video context menus
  1066. function preventHijack(e) {
  1067. e.stopPropagation();
  1068. e.stopImmediatePropagation();
  1069. const redirectEvent = e.target.ownerDocument.createEvent('MouseEvents');
  1070. redirectEvent.initMouseEvent(e, e.bubbles, e.cancelable);
  1071. return e;
  1072. }
  1073.  
  1074. function enforcePosition() {
  1075. setTimeout(() => {
  1076. let controlsDisplaced = controls !== v.nextSibling;
  1077. const vidDisplaced = videoWrapper !== v.parentNode;
  1078. if (vidDisplaced || controlsDisplaced) {
  1079. if (vidDisplaced) videoWrapper.appendChild(v);
  1080. controlsDisplaced = v !== controls.previousSibling;
  1081. if (controlsDisplaced) videoWrapper.insertBefore(controls, v.nextSibling);
  1082. const bs =
  1083. videoWrapper.querySelectorAll('videowrapper > *:not(video):not(controls)');
  1084. for (let i = 0; i < bs.length; ++i) {
  1085. bs[i].remove();
  1086. }
  1087. }
  1088. repeat++;
  1089. if (repeat < 10) enforcePosition.call(this);
  1090. }, 100);
  1091. }
  1092. }
  1093.  
  1094. function ytSaveCurrentTime(v) {
  1095. v.addEventListener('loadstart', ytCheckSavedTime);
  1096. v.addEventListener('loadeddata', ytCheckSavedTime);
  1097.  
  1098. v.ontimeupdate = () => {
  1099. if (v.currentTime > 0 && ytTimeChecked) localStorage.setItem(ytID, v.currentTime);
  1100. };
  1101.  
  1102. v.onended = () => {
  1103. if (localStorage.getItem(ytID)) localStorage.removeItem(ytID);
  1104. };
  1105. }
  1106.  
  1107. function ytCheckSavedTime(e) {
  1108. ytID = location.href.replace(/.*?\/(watch\?v=|embed\/)(.*?)(\?|&|$).*/, '$2');
  1109. const savedTime = localStorage.getItem(ytID);
  1110. const timeURL = /(\?|&)(t(ime_continue)?|start)=[1-9]/.test(location.href);
  1111. const ytStart = $('.ytp-clip-start:not([style*="left: 0%;"])');
  1112. if (e.type === 'loadstart') {
  1113. ytTimeChecked = false;
  1114. if ((!ytStart || !savedTime) && !timeURL) ytTimeChecked = true;
  1115. if (ytStart) ytStart.click();
  1116. if (ytTimeChecked && savedTime) e.target.currentTime = savedTime;
  1117. e.target.focus({preventScroll: true});
  1118. if (self === top) window.scroll({top: 0, behavior: 'smooth'});
  1119. } else if (e.type === 'loadeddata' && !ytTimeChecked) {
  1120. if (savedTime) e.target.currentTime = savedTime;
  1121. ytTimeChecked = true;
  1122. }
  1123. }
  1124.  
  1125. window.addEventListener('DOMContentLoaded', () => {
  1126. document.arrive(
  1127. 'video[controls], video[style*="visibility: inherit !important"]',
  1128. {fireOnAttributesModification: true, existing: true}, v => {
  1129. if (!v.parentNode.parentNode) return;
  1130. const vP = v.parentNode;
  1131. const vPP = v.parentNode.parentNode;
  1132. const imagus = !v.hasAttribute('controls') &&
  1133. $('html > div[style*="z-index: 2147483647"]') === v.parentNode;
  1134. const vidOrParentsIdOrClass =
  1135. `${v.id}${v.classList}${vP.id}${vP.classList}${vPP.id}${vPP.classList}`;
  1136. const exclude = v.classList.contains('custom-native-player') ||
  1137. v.classList.contains('imagus') ||
  1138. /(v(ideo)?|me)(-|_)?js|jw|jplay|plyr|kalt|flowp|wisti/i.test(vidOrParentsIdOrClass);
  1139. if (imagus || (v.hasAttribute('controls') && !exclude)) {
  1140. if (imagus) v.classList.add('imagus');
  1141. v.classList.add('custom-native-player');
  1142. v.classList.add('custom-native-player-hidden');
  1143. v.setAttribute('tabindex', '0');
  1144. v.setAttribute('preload', 'auto');
  1145. v.removeAttribute('controls');
  1146. customPlayer(v);
  1147. }
  1148. });
  1149. });
  1150.  
  1151. if (/^https?:\/\/www\.youtube\.com/.test(location.href)) {
  1152. document.arrive(
  1153. 'video[src*="youtube.com"]',
  1154. {fireOnAttributesModification: true, existing: true}, v => {
  1155. ytSaveCurrentTime(v);
  1156. });
  1157. }
  1158.  
  1159. GM_addStyle(`/* imagus */
  1160. .imagus-video-wrapper {
  1161. height: min-content!important;
  1162. position: fixed!important;
  1163. left: 0!important;
  1164. right: 0!important;
  1165. top: 0!important;
  1166. bottom: 0!important;
  1167. margin: auto!important;
  1168. box-shadow: none!important;
  1169. background-color: hsl(0, 0%, 0%)!important;
  1170. width: calc(100% - 100px)!important;
  1171. }
  1172.  
  1173. .imagus-video-wrapper.stickied {
  1174. box-shadow: 0 0 0 100000px hsla(0, 0%, 0%, .7)!important;
  1175. }
  1176.  
  1177. .imagus-video-wrapper videowrapper {
  1178. height: 0!important;
  1179. padding-top: 56.25%!important;
  1180. }
  1181.  
  1182. .imagus-video-wrapper videowrapper video.custom-native-player {
  1183. position: absolute!important;
  1184. }
  1185.  
  1186. @media (min-width: 177.778vh) {
  1187. .imagus-video-wrapper {
  1188. margin: 18px auto!important;
  1189. height: calc(100vh - 18px)!important;
  1190. width: calc(((100vh - 18px) * 16) / 9)!important;
  1191. }
  1192.  
  1193. .imagus-video-wrapper videowrapper {
  1194. height: 100%!important;
  1195. padding-top: 0!important;
  1196. }
  1197.  
  1198. .imagus-video-wrapper videowrapper video.custom-native-player {
  1199. position: relative!important;
  1200. }
  1201. }
  1202.  
  1203. html > div[style*="2147483647"] > img[style*="display: block"] ~ videowrapper {
  1204. display: none!important;
  1205. }
  1206.  
  1207. html > div[style*="2147483647"] {
  1208. background: none!important;
  1209. box-shadow: none!important;
  1210. border: 0!important;
  1211. }
  1212.  
  1213. html > div[style*="2147483647"] videowrapper + div {
  1214. -webkit-text-fill-color: hsl(0, 0%, 90%)!important;
  1215. box-shadow: none!important;
  1216. width: 100%!important;
  1217. max-width: 100%!important;
  1218. box-sizing: border-box!important;
  1219. overflow: hidden!important;
  1220. text-overflow: ellipsis!important;
  1221. }
  1222.  
  1223. html > div:not(.stickied) video.custom-native-player + controls,
  1224. video[controls]:not(.custom-native-player) {
  1225. opacity: 0!important;
  1226. pointer-events: none!important;
  1227. }
  1228.  
  1229. videowrapper {
  1230. --wrapper-position: relative;
  1231. position: var(--wrapper-position)!important;
  1232. height: 100%!important;
  1233. display: block!important;
  1234. font-size: 0px!important;
  1235. top: 0!important;
  1236. bottom: 0!important;
  1237. left: 0!important;
  1238. right: 0!important;
  1239. background-color: hsl(0, 0%, 0%)!important;
  1240. overflow: hidden!important;
  1241. }
  1242.  
  1243. video.custom-native-player + controls timetooltip,
  1244. video.custom-native-player + controls volumetooltip {
  1245. position: absolute!important;
  1246. display: none!important;
  1247. top: -25px!important;
  1248. height: 22px!important;
  1249. line-height: 22px!important;
  1250. text-align: center!important;
  1251. border-radius: 4px!important;
  1252. font-size: 12px!important;
  1253. background: hsla(0, 0%, 0%, .7)!important;
  1254. box-shadow: 0 0 4px hsla(0, 0%, 100%, .5)!important;
  1255. color: hsl(0, 0%, 100%)!important;
  1256. pointer-events: none!important;
  1257. }
  1258.  
  1259. video.custom-native-player + controls timetooltip {
  1260. margin-left: -25px!important;
  1261. width: 50px!important;
  1262. }
  1263.  
  1264. video.custom-native-player + controls volumetooltip {
  1265. margin-left: -20px!important;
  1266. width: 40px!important;
  1267. }
  1268.  
  1269. video.custom-native-player.compact + controls timeline timetooltip {
  1270. top: -25px!important;
  1271. }
  1272.  
  1273. video.custom-native-player.compact + controls btn,
  1274. video.custom-native-player.compact + controls rate,
  1275. video.custom-native-player.compact + controls volume {
  1276. height: 24px!important;
  1277. line-height: 22px!important;
  1278. }
  1279.  
  1280. video.custom-native-player.compact + controls volume input {
  1281. padding-bottom: 2px!important;
  1282. }
  1283.  
  1284. video.custom-native-player.compact + controls btn:before {
  1285. margin-top: -2px!important;
  1286. }
  1287.  
  1288. video.custom-native-player.compact + controls volume > volumebar {
  1289. top: 6px!important;
  1290. }
  1291.  
  1292. video.custom-native-player + controls timelinewrapper {
  1293. line-height: 20px!important;
  1294. }
  1295.  
  1296. video.custom-native-player + controls timeline:hover timetooltip:not(.hidden),
  1297. video.custom-native-player + controls volume:hover volumetooltip:not(.hidden) {
  1298. display: inline!important;
  1299. }
  1300.  
  1301. video.custom-native-player {
  1302. cursor: none!important;
  1303. max-height: 100%!important;
  1304. height: 100%!important;
  1305. width: 100%!important;
  1306. margin: 0!important;
  1307. padding: 0!important;
  1308. top: 0!important;
  1309. bottom: 0!important;
  1310. left: 0!important;
  1311. right: 0!important;
  1312. background-color: hsl(0, 0%, 0%)!important;
  1313. border-radius: 0!important;
  1314. }
  1315.  
  1316. video.custom-native-player:not(.contains-source):not([src*="/"]) {
  1317. cursor: auto!important;
  1318. }
  1319.  
  1320. video.custom-native-player:not(.contains-source):not([src*="/"]) + controls {
  1321. display: none!important;
  1322. }
  1323.  
  1324. video.custom-native-player + controls > * {
  1325. background: none!important;
  1326. outline: none!important;
  1327. line-height: 32px!important;
  1328. font-family: monospace!important;
  1329. }
  1330.  
  1331. video.custom-native-player.compact + controls > * {
  1332. line-height: 24px!important;
  1333. }
  1334.  
  1335. video.custom-native-player + controls {
  1336. --controls-z-index: 1;
  1337. white-space: nowrap!important;
  1338. transition: opacity .5s ease 0s!important;
  1339. background-color: hsla(0, 0%, 0%, .85)!important;
  1340. height: 32px !important;
  1341. width: 100%!important;
  1342. cursor: default !important;
  1343. font-size: 18px !important;
  1344. user-select: none!important;
  1345. z-index: var(--controls-z-index)!important;
  1346. flex: none!important;
  1347. position: absolute!important;
  1348. display: flex!important;
  1349. flex-wrap: wrap!important;
  1350. opacity: 0!important;
  1351. margin: 0!important;
  1352. bottom: 0!important;
  1353. left: 0!important;
  1354. right: 0!important;
  1355. }
  1356.  
  1357. video.custom-native-player.custom-native-player-hidden,
  1358. video.custom-native-player.custom-native-player-hidden + controls {
  1359. opacity: 0!important;
  1360. pointer-events: none!important;
  1361. }
  1362.  
  1363. video.custom-native-player.paused + controls,
  1364. video.custom-native-player.active + controls,
  1365. video.custom-native-player + controls:hover {
  1366. opacity: 1!important;
  1367. }
  1368.  
  1369. video.custom-native-player + controls timeline {
  1370. flex-grow: 1!important;
  1371. position: relative!important;
  1372. align-items: center!important;
  1373. flex-direction: column!important;
  1374. height: 100%!important;
  1375. }
  1376.  
  1377. video.custom-native-player + controls timelinewrapper {
  1378. flex: 1 0 480px!important;
  1379. position: relative!important;
  1380. align-items: center!important;
  1381. }
  1382.  
  1383. video.custom-native-player.compact + controls timelinewrapper {
  1384. order: -1;
  1385. flex-basis: 100%!important;
  1386. height: 20px!important;
  1387. }
  1388.  
  1389. video.custom-native-player.compact + controls timeline timebar {
  1390. top: 5px!important;
  1391. }
  1392.  
  1393. video.custom-native-player.compact + controls currenttime,
  1394. video.custom-native-player.compact + controls totaltime {
  1395. line-height: 20px!important;
  1396. }
  1397.  
  1398. video.custom-native-player.compact + controls {
  1399. height: 44px!important;
  1400. }
  1401.  
  1402. video.custom-native-player.compact-2 + controls btn.begin,
  1403. video.custom-native-player.compact-2 + controls btn.skip-short,
  1404. video.custom-native-player.compact-3 + controls rate,
  1405. video.custom-native-player.compact-3 + controls btn.rate-increase,
  1406. video.custom-native-player.compact-3 + controls btn.rate-decrease,
  1407. video.custom-native-player.compact-4 + controls btn.skip-long {
  1408. display: none!important;
  1409. }
  1410.  
  1411. video.custom-native-player + controls > * {
  1412. display: inline-flex!important;
  1413. }
  1414.  
  1415. video.custom-native-player.compact-2 + controls btn.rate-increase,
  1416. video.custom-native-player.compact-4 + controls btn.toggle-play {
  1417. margin-right: auto!important;
  1418. }
  1419.  
  1420. video.custom-native-player + controls timeline > timebar > timebuffer,
  1421. video.custom-native-player + controls timeline > timebar > timeprogress,
  1422. video.custom-native-player + controls volume > volumebar > volumetrail {
  1423. position: absolute!important;
  1424. flex: none!important;
  1425. pointer-events: none!important;
  1426. height: 100%!important;
  1427. border-radius: 20px!important;
  1428. }
  1429.  
  1430. video.custom-native-player + controls timeline > timebar,
  1431. video.custom-native-player + controls volume > volumebar {
  1432. position: absolute!important;
  1433. height: 10px!important;
  1434. border-radius: 20px!important;
  1435. overflow: hidden!important;
  1436. background-color: hsla(0, 0%, 16%, .85)!important;
  1437. top: 11px!important;
  1438. left: 0!important;
  1439. right: 0!important;
  1440. pointer-events: none!important;
  1441. z-index: -1!important;
  1442. box-shadow: inset 0 0 0 1px hsla(0, 0%, 40%), inset 0 0 5px hsla(0, 0%, 40%, .85)!important;
  1443. }
  1444.  
  1445. video.custom-native-player + controls volume.disabled,
  1446. video.custom-native-player + controls btn.disabled {
  1447. -webkit-filter: brightness(.4);
  1448. filter: brightness(.4);
  1449. pointer-events: none!important;
  1450. }
  1451.  
  1452. video.custom-native-player.disabled,
  1453. video.custom-native-player.active.disabled {
  1454. cursor: default!important;
  1455. }
  1456.  
  1457. video.custom-native-player.disabled + controls {
  1458. opacity: 1!important;
  1459. -webkit-filter: brightness(.3)sepia(1)hue-rotate(320deg)saturate(5);
  1460. filter: brightness(.3)sepia(1)hue-rotate(320deg)saturate(5);
  1461. }
  1462.  
  1463. video.custom-native-player.disabled + controls > * {
  1464. pointer-events: none!important;
  1465. }
  1466.  
  1467. video.custom-native-player + controls volume {
  1468. max-width: 70px!important;
  1469. flex: 1 0 48px!important;
  1470. position: relative!important;
  1471. margin: 0 12px!important;
  1472. }
  1473.  
  1474. video.custom-native-player + controls timeline > timebar > timebuffer {
  1475. background-color: hsla(0, 0%, 100%, .2)!important;
  1476. border-top-right-radius: 20px!important;
  1477. border-bottom-right-radius: 20px!important;
  1478. left: 0!important;
  1479. }
  1480.  
  1481. video.custom-native-player + controls timeline > timebar > timeprogress,
  1482. video.custom-native-player + controls volume > volumebar > volumetrail {
  1483. background-color: hsla(0, 0%, 100%, .4)!important;
  1484. left: 0!important;
  1485. }
  1486.  
  1487. video.custom-native-player + controls volume.disabled volumetrail {
  1488. width: 0!important;
  1489. }
  1490.  
  1491. video.custom-native-player + controls timeline > input {
  1492. height: 100%!important;
  1493. width: 100%!important;
  1494. }
  1495.  
  1496. video.custom-native-player.active {
  1497. cursor: pointer!important;
  1498. }
  1499.  
  1500. video.custom-native-player + controls btn {
  1501. border: none !important;
  1502. cursor: pointer!important;
  1503. background-color: transparent!important;
  1504. font-family: "Segoe UI Symbol"!important;
  1505. font-size: 18px !important;
  1506. margin: 0px !important;
  1507. align-items: center!important;
  1508. justify-content: center!important;
  1509. height: 32px!important;
  1510. padding: 0!important;
  1511. flex: 1 1 32px!important;
  1512. max-width: 46px!important;
  1513. box-sizing: content-box!important;
  1514. position: relative!important;
  1515. opacity: .86!important;
  1516. transition: opacity .3s, text-shadow .3s!important;
  1517. -webkit-text-fill-color: hsl(0, 0%, 100%)!important;
  1518. }
  1519.  
  1520. video.custom-native-player + controls btn.toggle-play {
  1521. flex: 1 1 46px!important
  1522. }
  1523.  
  1524. video.custom-native-player + controls btn:hover {
  1525. opacity: 1!important;
  1526. text-shadow: 0 0 8px hsla(0, 0%, 100%)!important;
  1527. }
  1528.  
  1529. video.custom-native-player + controls btn.expand {
  1530. font-size: 20px!important;
  1531. font-weight: bold!important;
  1532. }
  1533.  
  1534. video.custom-native-player + controls btn.skip-long {
  1535. font-size: 18px!important;
  1536. }
  1537.  
  1538. video.custom-native-player + controls btn.skip-short {
  1539. font-size: 12px!important;
  1540. }
  1541.  
  1542. video.custom-native-player + controls btn.begin {
  1543. font-size: 18px!important;
  1544. }
  1545.  
  1546. video.custom-native-player + controls btn.mute {
  1547. font-size: 22px!important;
  1548. }
  1549.  
  1550. video.custom-native-player + controls btn.expand {
  1551. font-size: 20px!important;
  1552. font-weight: bold!important;
  1553. }
  1554.  
  1555. video.custom-native-player + controls btn.rate-decrease,
  1556. video.custom-native-player + controls btn.rate-increase {
  1557. font-size: 14px!important;
  1558. padding: 0!important;
  1559. flex: 1 0 14px!important;
  1560. max-width: 24px!important;
  1561. }
  1562.  
  1563. video.custom-native-player.playback-rate-increased + controls btn.rate-increase,
  1564. video.custom-native-player.playback-rate-decreased + controls btn.rate-decrease {
  1565. -webkit-text-fill-color: cyan!important;
  1566. }
  1567.  
  1568. video.custom-native-player + controls rate {
  1569. height: 32px!important;
  1570. width: 42px!important;
  1571. margin: 0!important;
  1572. display: unset!important;
  1573. text-align: center!important;
  1574. font-size: 14px!important;
  1575. flex-shrink: 0!important;
  1576. font-weight: bold!important;
  1577. letter-spacing: .5px!important;
  1578. -webkit-text-fill-color: hsl(0, 0%, 100%)!important;
  1579. user-select: none!important;
  1580. pointer-events: none!important;
  1581. opacity: .86!important;
  1582. }
  1583.  
  1584. video.custom-native-player + controls rate[data-current-rate] {
  1585. pointer-events: all!important;
  1586. cursor: pointer!important;
  1587. }
  1588.  
  1589. video.custom-native-player + controls rate[data-current-rate]:hover {
  1590. transition: opacity .3s, text-shadow .3s!important;
  1591. opacity: 1!important;
  1592. text-shadow: 0 0 8px hsla(0, 0%, 100%)!important;
  1593. }
  1594.  
  1595. video.custom-native-player + controls input[type=range] {
  1596. -webkit-appearance: none!important;
  1597. background-color: transparent !important;
  1598. outline: none!important;
  1599. border: 0!important;
  1600. border-radius: 6px !important;
  1601. margin: 0!important;
  1602. top: 0!important;
  1603. bottom: 0!important;
  1604. left: 0!important;
  1605. right: 0!important;
  1606. padding: 0!important;
  1607. width: 100%!important;
  1608. position: relative!important;
  1609. }
  1610.  
  1611. video.custom-native-player + controls input[type='range']::-webkit-slider-thumb {
  1612. -webkit-appearance: none!important;
  1613. background-color: hsl(0, 0%, 86%)!important;
  1614. border: 0!important;
  1615. height: 14px!important;
  1616. width: 14px!important;
  1617. border-radius: 50%!important;
  1618. pointer-events: none!important;
  1619. }
  1620.  
  1621. video.custom-native-player.muted + controls volume input[type='range']::-webkit-slider-thumb {
  1622. background-color: hsl(0, 0%, 50%)!important;
  1623. }
  1624.  
  1625. video.custom-native-player + controls input[type='range']::-moz-range-thumb {
  1626. -moz-appearance: none!important;
  1627. background-color: hsl(0, 0%, 86%)!important;
  1628. border: 0!important;
  1629. height: 14px!important;
  1630. width: 14px!important;
  1631. border-radius: 50%!important;
  1632. pointer-events: none!important;
  1633. }
  1634.  
  1635. video.custom-native-player.muted + controls volume input[type='range']::-moz-range-thumb {
  1636. background-color: hsl(0, 0%, 50%)!important;
  1637. }
  1638.  
  1639. video.custom-native-player + controls currenttime,
  1640. video.custom-native-player + controls totaltime {
  1641. font-family: monospace, arial!important;
  1642. font-weight: bold!important;
  1643. font-size: 14px!important;
  1644. letter-spacing: .5px!important;
  1645. height: 100%!important;
  1646. line-height: 32px!important;
  1647. min-width: 58px!important;
  1648. display: unset!important;
  1649. -webkit-text-fill-color: hsl(0, 0%, 86%)!important;
  1650. }
  1651.  
  1652. video.custom-native-player + controls btn.rate-decrease {
  1653. margin-left: auto!important;
  1654. }
  1655.  
  1656. video.custom-native-player + controls currenttime {
  1657. padding: 0 12px 0 0!important;
  1658. margin-right: 2px!important;
  1659. text-align: right!important;
  1660. }
  1661.  
  1662. video.custom-native-player + controls totaltime {
  1663. padding: 0 0 0 12px!important;
  1664. margin-left: 2px!important;
  1665. text-align: left!important;
  1666. }
  1667.  
  1668. .direct-video-top-level {
  1669. margin: 0!important;
  1670. padding: 0!important;
  1671. display: flex!important;
  1672. align-items: center!important;
  1673. justify-content: center!important;
  1674. }
  1675.  
  1676. .direct-video-top-level video {
  1677. height: calc(((100vw - 30px) * 9) / 16)!important;
  1678. min-height: calc(((100vw - 30px) * 9) / 16)!important;
  1679. max-height: calc(((100vw - 30px) * 9) / 16)!important;
  1680. width: calc(100vw - 30px)!important;
  1681. min-width: calc(100vw - 30px)!important;
  1682. max-width: calc(100vw - 30px)!important;
  1683. margin: auto!important;
  1684. }
  1685.  
  1686. .direct-video-top-level > video.custom-native-player + controls {
  1687. position: absolute!important;
  1688. left: 0!important;
  1689. right: 0!important;
  1690. margin: 0 auto !important;
  1691. width: calc(100vw - 30px)!important;
  1692. bottom: calc((100vh - (((100vw - 30px) * 9) / 16)) / 2)!important;
  1693. }
  1694.  
  1695. @media (min-width: 177.778vh) {
  1696. .direct-video-top-level video {
  1697. position: unset!important;
  1698. height: calc(100vh - 30px)!important;
  1699. min-height: calc(100vh - 30px)!important;
  1700. max-height: calc(100vh - 30px)!important;
  1701. width: calc(((100vh - 30px) * 16) / 9)!important;
  1702. min-width: calc(((100vh - 30px) * 16) / 9)!important;
  1703. max-width: calc(((100vh - 30px) * 16) / 9)!important;
  1704. margin: 0 auto!important;
  1705. padding: 0!important;
  1706. background-color: hsl(0, 0%, 0%)!important;
  1707. }
  1708.  
  1709. .direct-video-top-level > video.custom-native-player + controls {
  1710. width: calc(((100vh - 30px) * 16) / 9)!important;
  1711. min-width: calc(((100vh - 30px) * 16) / 9)!important;
  1712. max-width: calc(((100vh - 30px) * 16) / 9)!important;
  1713. bottom: 15px!important;
  1714. }
  1715. }
  1716.  
  1717. video::-webkit-media-controls,
  1718. .native-fullscreen > *:not(video):not(controls) {
  1719. display: none!important;
  1720. }
  1721.  
  1722. .native-fullscreen video.custom-native-player,
  1723. .direct-video-top-level .native-fullscreen video.custom-native-player {
  1724. height: 100vh!important;
  1725. width: 100vw!important;
  1726. max-height: 100vh!important;
  1727. max-width: 100vw!important;
  1728. min-height: 100vh!important;
  1729. min-width: 100vw!important;
  1730. margin: 0!important;
  1731. }
  1732.  
  1733. .native-fullscreen video.custom-native-player + controls {
  1734. position: fixed!important;
  1735. bottom: 0!important;
  1736. left: 0!important;
  1737. right: 0!important;
  1738. margin: 0!important;
  1739. width: 100vw!important;
  1740. max-width: 100vw!important;
  1741. }
  1742.  
  1743. video.custom-native-player + controls btn.skip-short,
  1744. video.custom-native-player + controls btn.skip-long,
  1745. video.custom-native-player + controls btn.begin,
  1746. video.custom-native-player + controls btn.toggle-play,
  1747. video.custom-native-player + controls btn.rate-decrease,
  1748. video.custom-native-player + controls btn.rate-increase,
  1749. video.custom-native-player + controls btn.mute,
  1750. video.custom-native-player + controls btn.expand {
  1751. font-size: 0!important;
  1752. }
  1753.  
  1754. video.custom-native-player + controls btn:before {
  1755. font-family: 'customNativePlayer'!important;
  1756. font-size: 20px!important;
  1757. }
  1758.  
  1759. video.custom-native-player + controls btn.skip-short.right:before {
  1760. content: '\\e90c'!important;
  1761. }
  1762.  
  1763. video.custom-native-player + controls btn.skip-short.left:before {
  1764. content: '\\e90b'!important;
  1765. }
  1766.  
  1767. video.custom-native-player + controls btn.skip-long.right:before {
  1768. content: '\\e901'!important;
  1769. }
  1770.  
  1771. video.custom-native-player + controls btn.skip-long.left:before {
  1772. content: '\\e902'!important;
  1773. }
  1774.  
  1775. video.custom-native-player + controls btn.begin:before {
  1776. content: '\\e908'!important;
  1777. }
  1778.  
  1779. video.custom-native-player + controls btn.toggle-play:before {
  1780. content: '\\e906'!important;
  1781. font-size: 24px!important;
  1782. }
  1783.  
  1784. video.custom-native-player.playing + controls btn.toggle-play:before {
  1785. content: '\\e905'!important;
  1786. font-size: 24px!important;
  1787. }
  1788.  
  1789. video.custom-native-player + controls btn.rate-decrease:before {
  1790. content: '\\ea0b'!important;
  1791. font-size: 10px!important;
  1792. }
  1793.  
  1794. video.custom-native-player + controls btn.rate-increase:before {
  1795. content: '\\ea0a'!important;
  1796. font-size: 10px!important;
  1797. }
  1798.  
  1799. video.custom-native-player + controls btn.mute:before {
  1800. content: '\\e90a'!important;
  1801. font-size: 22px!important;
  1802. }
  1803.  
  1804. video.custom-native-player.muted + controls btn.mute:before {
  1805. content: '\\e909'!important;
  1806. font-size: 22px!important;
  1807. }
  1808.  
  1809. video.custom-native-player + controls btn.mute.disabled:before {
  1810. content: '\\e909'!important;
  1811. }
  1812.  
  1813. video.custom-native-player + controls btn.expand:before {
  1814. content: '\\e904'!important;
  1815. font-size: 24px!important;
  1816. font-weight: normal!important;
  1817. }
  1818.  
  1819. .native-fullscreen video.custom-native-player + controls btn.expand:before {
  1820. content: '\\e903'!important;
  1821. font-size: 24px!important;
  1822. }
  1823.  
  1824. @font-face {
  1825. font-family: 'customNativePlayer';
  1826. src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAe8AAsAAAAAC2gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAEAAAABgDxIHPmNtYXAAAAFIAAAAUQAAAHTquqeaZ2FzcAAAAZwAAAAIAAAACAAAABBnbHlmAAABpAAABG0AAAcgC+w8l2hlYWQAAAYUAAAALAAAADYWP5TBaGhlYQAABkAAAAAcAAAAJAgCBBhobXR4AAAGXAAAAC8AAABcUkALAGxvY2EAAAaMAAAAMAAAADAN9g+EbWF4cAAABrwAAAAYAAAAIAAcAIxuYW1lAAAG1AAAANoAAAGGmUoJ+3Bvc3QAAAewAAAADAAAACAAAwAAeNpjYGZ+xTiBgZWBgWkm0xkGBoZ+CM34msGYkZMBFTAKoAkwODAwvNJiPvD/AIMD8wEQj4ERSVaBgQEAdCILXHjaY2BgYGaAYBkGRijNDGSBaBaGCCAtxCAAFGECiim85HnZ84r7ldorrf9///9nAAGFlwwvu19xwcUY/z8WZxFrE+MUfS/6BmoSGgAA0DQY1QAAAAABAAH//wAPeNqNVD1s20YUfo+UdJYd/dAiRdtKJVOMScWyKVs0SRuuGQ6xA8QI4CKQ4p+kMAJkSAx0SacOBdGtKNBNnTUFhTQUKNDOHDp5l5cu3r0nSyz1kZSNGHCCHqS7e3/f+967OwLC1eAAnI1I/P+6AXT4OncBUyQogiooliKYgsLXR9Aekb2NgJ3xZjSO7kPAd7gAeGCElEYBhTT28c3wN/TDOaAYGJLjEDBOy8EJxbQohoMkwIKACkUN4oCAI+RRyAoS13xSkIECzAIUTMm0VKmgRguaFi0FK5QGfvvM98+IWJvm9hlKoUAbf7jok5YkuIGZpCoFkKnSCIyPsMZ7KUyDdQpuExoXBvsEckKIBDYEgvfJENZCFXV4ILyo/gVTUMOWIfT72Op3uPZljwsTI7bGeakyqhZbeMZdXPawHvUdyYYhBvXdon6HUdhph7Y+eHyL70CDBIvJVlMuo1yURJZFllKruoG6ZqlipDWbjouOba1FWpWDwcBqGDsijR2jYcX71lzphes+euS6L0pz8Z676A0GPVHcbpCT0diWRFHabhjWzgP3eYnGc/fBTuRfinvoEyef92ACKtAEm5itaboku2iZYoqFa8xAl4oxW2SyKpiyIBNpiSjKDiapFi7YXHmNeHJnypNkubjnOF5D1zfy+ctf7NPT/uAvaaW0tFd9Zl/a+PjgAIONo5lvX7MMK6+XvNrBykPXfamq2f3M3dKuYZjo26cjambl7/zcxP5krfTM5k7rBwd/AnXWh8fE2Y7u0hLdpJAOU5NEXHCRvyIat5VJ9qeN1P3+YNDnvM2Vlc2TmGA+v6HrDc9x9opj4pxHqbnewCeOw99njvCPK1qmYeyW7mb2s6r60nUfjkmHd+JrCLh30TuAhTRy7+gJvIneC9kOyfbPtQ0Pr99SqBkFCeCDqBa6TTrTHZ1nsiLITgK6wXHQ7Qbd4XE34INwJvmS/kja8Yu/JR7jeAwif/48BkB/DIDn1wB4Ha9G34k1rY7VlCQo1dRXKBZNRRCLm9i0LUFp2lt0NfjzYbeQCTKFYTdTKGTwOBLwmATOi5bMbQ7j7xR6CeA8yNGZSSF6jKlSNihk+CAM+OhlCtx8tA2n6I6Gk8f/CHX4Br6Dn6mLVU3X1pybJxsqmvLNw8+iql/52mufd1q93asoRmZW1RqoVjVLWLM3kZJSuCSIoYn/IT3Nsllldq6aplGdm1Wy2WwtWytX7k/RuF8p19h0ujcpkNfqzOzszCrZ9WxlRp5PT0yk5+WZChPS/QilnM/l8uUofkkuFuUlNv1r6k7y/duwG2/fs0I6PTWV5lMaY+SiaNrT5WXDWF5+qmkKKShu2Xhl2+vrtv3KWK4xdsgmKFdzy/1py23SLpcrq/eeLC7W64uLT+6p5Ql2FEGVdW1P08sRxtLG+vfrG0uM/ZtMfKADpPP4kErwifzkx2Ayn8Dxd58GH9CZ5GCRzlVSdaZajm6ZsmNKDL/QsKB1cnL1G+7eVh62PnXxPkPjP6LOXdEAAAB42mNgZAADZqYpmfH8Nl8ZuFnA/JsFK5QQ9P8DLA7MB4BcDgYmkCgA/hcJqHjaY2BkYGA+8P8AAwOLAwMDmGRkQAXiAFdpAyR42mNhQAAmIGZhYLgKxKuBOBvKBmJGoDhjKJJcAwQz2gBxFAtEHwI7QGgAfJcHlwAAAAAAAAoAFAAeADgAUgBmAJAAuADMANoA6AEyAYwB1gHkAfICEgIyAmgChANOA5B42mNgZGBgEGfoYmBhAAEmBjQAABCkAKl42m3OwWrCQBSF4T8aLbXgri5czRMEhdJdt4IUNy5cN8YhBHQGxmQh9An6HF33GXuMd5mBDF/O3Ll3gDl/ZNxXxlO/39dI/jKP5XdzLnfmCS+8mqfKP80zlvzoVpY/K5nr5OGRXJvH8oc5l7/NExY481T53jzjjd+mipcYAw0VkYu+SDj4dG1icOtixQFP4qoCHajPmoLV4K3BcO/r7lwmDfV6aMeZkjRYuYmhdbUPPpWtP7njzW2ruFNZwaaf3Wp6rTahf1Gpf89J2ZGb9m3fa/foRfEP3IM9twAAeNpjYGbACwAAfQAE) format('woff'), url('customNativePlayer.ttf') format('truetype'), url('customNativePlayer.svg#customNativePlayer') format('svg');
  1827. font-weight: normal;
  1828. font-style: normal;
  1829. }`);