Custom Native HTML5 Player with Shortcuts

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

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

  1. // ==UserScript==//
  2. // @name Custom Native HTML5 Player with Shortcuts
  3. // @namespace https://gist.github.com/narcolepticinsomniac
  4. // @version 0.1
  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) {
  520. imagusAudio.play();
  521. }
  522. v.classList.remove('paused');
  523. if (videoWrapper) videoWrapper.classList.remove('paused');
  524. v.classList.add('playing');
  525. };
  526.  
  527. v.onpause = () => {
  528. if (v === imagusVid && audioSync) {
  529. imagusAudio.pause();
  530. }
  531. if (!isSeeking) {
  532. v.classList.remove('playing');
  533. v.classList.add('paused');
  534. if (videoWrapper) videoWrapper.classList.add('paused');
  535. }
  536. };
  537.  
  538. v.onended = () => {
  539. if (localStorage.getItem(savedTimeKey)) localStorage.removeItem(savedTimeKey);
  540. savedTimeKey = false;
  541. };
  542.  
  543. v.onemptied = () => {
  544. if (v === imagusVid) {
  545. if (v.src !== '') {
  546. if (/v\.redd\.it/.test(v.src)) {
  547. const audioSrc = `${v.src.split('DASH')[0]}audio`;
  548. imagusAudio.src = audioSrc;
  549. if (!imagusAudio.muted) {
  550. muteTillSync = true;
  551. imagusAudio.muted = true;
  552. }
  553. if (imagusVid.hasAttribute('loop')) imagusAudio.setAttribute('loop', 'true');
  554. }
  555. v.parentElement.parentElement.classList.add('imagus-video-wrapper');
  556. window.addEventListener('click', imagusClick, true);
  557. document.addEventListener('keyup', imagusKeys, true);
  558. document.addEventListener('mousedown', imagusMouseDown, true);
  559. document.addEventListener('mouseup', imagusMouseUp, true);
  560. } else {
  561. audioSync = false;
  562. audioError = false;
  563. imagusAudio.pause();
  564. imagusAudio.removeAttribute('src');
  565. imagusAudio.load();
  566. imagusAudio.removeAttribute('loop');
  567. v.parentElement.parentElement.removeAttribute('class');
  568. timeTooltip.classList.add('hidden');
  569. window.removeEventListener('click', imagusClick, true);
  570. document.removeEventListener('keyup', imagusKeys, true);
  571. document.removeEventListener('mousedown', imagusMouseDown, true);
  572. document.removeEventListener('mouseup', imagusMouseUp, true);
  573. }
  574. }
  575. };
  576.  
  577. v.onerror = () => {
  578. error = true;
  579. elToFocus.blur();
  580. v.classList.add('disabled');
  581. };
  582.  
  583. v.onmousedown = e => {
  584. if (error && e.button !== 2) return;
  585. e.stopPropagation();
  586. e.stopImmediatePropagation();
  587. if (e.button === 0) {
  588. clickCount++;
  589. const checkState = v.paused;
  590. if (clickCount === 1) {
  591. setTimeout(() => {
  592. if (clickCount === 1) {
  593. // avoid conflicts with existing click listeners
  594. const recheckState = v.paused;
  595. if (checkState === recheckState) shortcutFuncs.togglePlay(v);
  596. } else {
  597. shortcutFuncs.toggleFS(v);
  598. }
  599. clickCount = 0;
  600. }, settings.clickDelay);
  601. }
  602. } else if (e.button === 2) {
  603. window.addEventListener('contextmenu', preventHijack, true);
  604. }
  605. };
  606.  
  607. v.onmouseup = e => {
  608. if (e.button === 2) {
  609. setTimeout(() => {
  610. window.removeEventListener('contextmenu', preventHijack, true);
  611. }, 100);
  612. }
  613. if (error) elToFocus.blur();
  614. };
  615.  
  616. v.onmousemove = () => {
  617. controlsTimeout ? clearTimeout(controlsTimeout) :
  618. v.classList.add('active');
  619. if (videoWrapper) videoWrapper.classList.add('active');
  620. controlsTimeout = setTimeout(() => {
  621. controlsTimeout = false;
  622. v.classList.remove('active');
  623. if (videoWrapper) videoWrapper.classList.remove('active');
  624. }, settings.hideControls);
  625. };
  626.  
  627. new ResizeObserver(() => {
  628. compactControls();
  629. }).observe(v);
  630.  
  631. controls.onmouseup = () => {
  632. if (error) return;
  633. elToFocus.focus({preventScroll: true});
  634. };
  635.  
  636. timeSlider.onmousemove = () => {
  637. sliderValues();
  638. };
  639.  
  640. timeSlider.oninput = () => {
  641. sliderValues();
  642. };
  643.  
  644. timeSlider.onmousedown = e => {
  645. if (e.button > 0) return;
  646. mouseDown = true;
  647. isSeeking = true;
  648. if (timeTooltip.classList.contains('hidden')) sliderValues();
  649. if (v.readyState > 0) {
  650. if (!v.paused) {
  651. isPlaying = true;
  652. v.pause();
  653. } else {
  654. isPlaying = false;
  655. }
  656. }
  657. };
  658.  
  659. timeSlider.onmouseup = e => {
  660. if (e.button > 0) return;
  661. mouseDown = false;
  662. isSeeking = false;
  663. if (v.readyState > 0) {
  664. sliderValues();
  665. if (isPlaying) {
  666. v.play();
  667. isPlaying = false;
  668. }
  669. }
  670. };
  671.  
  672. volumeSlider.onmousemove = () => {
  673. sliderValues();
  674. };
  675.  
  676. volumeSlider.oninput = () => {
  677. if (v.muted) shortcutFuncs.toggleMute(v);
  678. sliderValues();
  679. };
  680.  
  681. muteButton.onmouseup = e => {
  682. if (e.button > 0) return;
  683. const lastVolume = localStorage.getItem('videovolume');
  684. if (v.muted || v.volume) shortcutFuncs.toggleMute(v);
  685. v.volume = lastVolume;
  686. if (audioSync) imagusAudio.muted = v.muted;
  687. };
  688.  
  689. playButton.onmouseup = e => {
  690. if (e.button > 0) return;
  691. shortcutFuncs.togglePlay(v);
  692. };
  693.  
  694. skipShortLeft.onmouseup = e => {
  695. if (e.button > 0) return;
  696. shortcutFuncs.skipLeft(v);
  697. };
  698.  
  699. skipShortRight.onmouseup = e => {
  700. if (e.button > 0) return;
  701. shortcutFuncs.skipRight(v);
  702. };
  703.  
  704. skipLongLeft.onmouseup = e => {
  705. if (e.button > 0) return;
  706. v.currentTime -= settings.skipShift;
  707. };
  708.  
  709. skipLongRight.onmouseup = () => {
  710. v.currentTime += settings.skipShift;
  711. };
  712.  
  713. beginButton.onmouseup = e => {
  714. if (e.button > 0) return;
  715. v.currentTime = 0;
  716. timeSlider.value = 0;
  717. timeProgress.style.width = '0';
  718. currentTime.textContent = '0:00';
  719. };
  720.  
  721. rateDecrease.onmouseup = e => {
  722. if (e.button > 0) return;
  723. shortcutFuncs.slowOrPrevFrame(v);
  724. };
  725.  
  726. rateIncrease.onmouseup = e => {
  727. if (e.button > 0) return;
  728. shortcutFuncs.fastOrNextFrame(v);
  729. };
  730.  
  731. rate.onmouseup = e => {
  732. if (e.button > 0) return;
  733. shortcutFuncs.normalSpeed(v);
  734. };
  735.  
  736. rate.onmouseenter = () => {
  737. rate.textContent = '1x?';
  738. };
  739.  
  740. rate.onmouseleave = () => {
  741. const currentRate = rate.getAttribute('data-current-rate');
  742. if (currentRate) {
  743. rate.textContent = currentRate;
  744. }
  745. };
  746.  
  747. expandButton.onmouseup = e => {
  748. if (e.button > 0) return;
  749. shortcutFuncs.toggleFS(v);
  750. };
  751.  
  752. // exiting fullscreen by escape key or other browser provided method
  753. document.onfullscreenchange = () => {
  754. if (!document.fullscreenElement) {
  755. const nativeFS = $('.native-fullscreen');
  756. if (nativeFS) nativeFS.classList.remove('native-fullscreen');
  757. }
  758. };
  759.  
  760. if (imagusVid) {
  761. imagusAudio.onloadedmetadata = () => {
  762. audioSync = true;
  763. if (v.hasAttribute('autoplay')) imagusAudio.play();
  764. };
  765.  
  766. imagusAudio.onloadeddata = () => {
  767. if (v.volume && !v.muted) v.classList.remove('muted');
  768. volumeValues(v);
  769. if (volume.classList.contains('disabled')) {
  770. muteButton.classList.remove('disabled');
  771. volume.classList.remove('disabled');
  772. }
  773. };
  774.  
  775. imagusAudio.onended = () => {
  776. imagusAudio.currentTime = 0;
  777. if (imagusVid.hasAttribute('loop')) imagusAudio.play();
  778. };
  779.  
  780. imagusAudio.onerror = () => {
  781. audioError = true;
  782. v.classList.add('muted');
  783. volumeSlider.value = 0;
  784. muteButton.classList.add('disabled');
  785. volume.classList.add('disabled');
  786. };
  787. }
  788.  
  789. if (directVideo) {
  790. v.removeAttribute('tabindex');
  791. document.body.setAttribute('tabindex', '0');
  792. document.addEventListener('keydown', docHandleKeyDown, true);
  793. document.addEventListener('keypress', docHandleKeyOther, true);
  794. document.addEventListener('keyup', docHandleKeyOther, true);
  795. } else {
  796. v.addEventListener('keydown', handleKeyDown, false);
  797. v.addEventListener('keypress', handleKeyOther, false);
  798. v.addEventListener('keyup', handleKeyOther, false);
  799. }
  800.  
  801. function sliderValues() {
  802. let slider;
  803. let xPosition;
  804. const vid = audioSync ? imagusAudio && v : v;
  805. const eType = event && event.type;
  806. const eTime = eType === 'timeupdate';
  807. const eVolume = eType === 'volumechange';
  808. const eMeta = eType === 'loadedmetadata';
  809. const eData = eType === 'loadeddata';
  810. const eInput = eType === 'input';
  811. const eMouseUp = eType === 'mouseup';
  812. const eMouseMove = eType === 'mousemove';
  813. const eMouseDown = eType === 'mousedown';
  814. if (eMeta || eTime || eVolume || eData || !event) {
  815. slider = eMeta || eTime ? timeSlider : volumeSlider;
  816. } else {
  817. slider = event.target;
  818. }
  819. const tooltip = slider.nextSibling;
  820. const timeTarget = slider === timeSlider;
  821. const sliderWidth = slider.clientWidth;
  822. const halfSlider = sliderWidth / 2;
  823. const slider14ths = halfSlider / 7;
  824. const eX = event && event.offsetX;
  825. const start7 = eX <= 7;
  826. const end7 = eX >= sliderWidth - 7;
  827. if (eMouseMove || eMouseDown) {
  828. if (start7 || end7) {
  829. xPosition = start7 ? 0 : sliderWidth;
  830. } else {
  831. xPosition = eX < halfSlider ? (eX + (-7 + (eX / slider14ths))).toFixed(1) :
  832. (eX + ((eX - halfSlider) / slider14ths)).toFixed(1);
  833. }
  834. }
  835. if (eMeta || eTime || eVolume || eData || !event) {
  836. xPosition = eMeta || eTime ?
  837. ((((100 / v.duration) * v.currentTime) * sliderWidth) / 100).toFixed(1) :
  838. (v.volume * sliderWidth).toFixed(1);
  839. }
  840. if (eTime && event.target === imagusVid && audioSync) {
  841. if (imagusVid.currentTime - imagusAudio.currentTime >= 0.1 ||
  842. imagusVid.currentTime - imagusAudio.currentTime <= -0.1) {
  843. imagusAudio.currentTime = imagusVid.currentTime + 0.06;
  844. console.log('time sync corrected');
  845. if (muteTillSync && imagusAudio.readyState > 2) {
  846. imagusAudio.muted = false;
  847. muteTillSync = false;
  848. console.log('unmuted after time correct');
  849. }
  850. } else if (muteTillSync && imagusAudio.readyState > 2) {
  851. imagusAudio.muted = false;
  852. muteTillSync = false;
  853. console.log('unmuted');
  854. }
  855. }
  856. if (eInput || eMouseUp) xPosition = +tooltip.getAttribute('data-x-position');
  857. const xPosPercent = timeTarget ? (xPosition / sliderWidth) * 100 :
  858. Math.round((xPosition / sliderWidth) * 100);
  859. const time = (xPosPercent * v.duration) / 100;
  860. if (eInput || eMeta || eTime || eVolume || eData || !event) {
  861. const valueTrail = timeTarget ? timeProgress : volumeTrail;
  862. const offset = halfSlider < xPosition ? -7 + (xPosition / slider14ths) :
  863. (xPosition - halfSlider) / slider14ths;
  864. slider.value = timeTarget ? xPosPercent : xPosPercent / 100;
  865. valueTrail.style.width = `calc(${xPosPercent}% - ${offset}px)`;
  866. if (eInput && !timeTarget) {
  867. if (start7 || end7) {
  868. vid.volume = start7 ? 0 : 1;
  869. } else {
  870. vid.volume = xPosPercent / 100;
  871. }
  872. }
  873. if (eInput && timeTarget && v.readyState > 0) currentTime.textContent = formatTime(time);
  874. if (eTime) currentTime.textContent = formatTime(v.currentTime);
  875. if (eInput && timeTarget && v.readyState < 1) earlyXposPercent = xPosPercent;
  876. } else if (eMouseUp) {
  877. if (audioSync) {
  878. if (start7 || end7) {
  879. imagusAudio.currentTime = start7 ? 0 : v.duration;
  880. } else {
  881. imagusAudio.currentTime = time;
  882. }
  883. }
  884. if (start7 || end7) {
  885. v.currentTime = start7 ? 0 : v.duration;
  886. } else {
  887. v.currentTime = time;
  888. }
  889. preventMouseMove = true;
  890. setTimeout(() => {
  891. preventMouseMove = false;
  892. }, 10);
  893. } else if (eMouseMove || eMouseDown) {
  894. if (!preventMouseMove || eMouseDown) {
  895. tooltip.dataset.xPosition = xPosition;
  896. tooltip.style.left = `${eX}px`;
  897. if (v.readyState > 0 && timeTarget) tooltip.textContent = formatTime(time);
  898. if (!timeTarget) tooltip.textContent = `${xPosPercent}%`;
  899. }
  900. tooltip.classList.remove('hidden');
  901. preventMouseMove = false;
  902. } else if (eMeta) {
  903. tooltip.textContent = formatTime(time);
  904. }
  905. }
  906.  
  907. function formatTime(t) {
  908. let seconds = Math.round(t);
  909. const minutes = Math.floor(seconds / 60);
  910. if (minutes > 0) seconds -= minutes * 60;
  911. if (seconds.toString().length === 1) seconds = `0${seconds}`;
  912. return `${minutes}:${seconds}`;
  913. }
  914.  
  915. function volumeValues() {
  916. const videovolume = localStorage.getItem('videovolume');
  917. const videomuted = localStorage.getItem('videomuted');
  918. if ((!videovolume && !videomuted) ||
  919. (videovolume && videovolume === '1' &&
  920. videomuted && videomuted !== 'true')) {
  921. v.volume = 1;
  922. volumeSlider.value = 1;
  923. volumeTrail.style.width = '100%';
  924. localStorage.setItem('videovolume', v.volume);
  925. localStorage.setItem('videomuted', 'false');
  926. } else if (videomuted && videomuted === 'true') {
  927. v.classList.add('muted');
  928. volumeSlider.value = 0;
  929. volumeTrail.style.width = '0';
  930. v.muted = true;
  931. } else {
  932. v.volume = videovolume;
  933. if (audioSync) imagusAudio.volume = v.volume;
  934. sliderValues();
  935. if (!volumeSlider.clientWidth) {
  936. new MutationObserver((_, observer) => {
  937. const volumeWidthSet = v.parentElement.querySelector('volume input').clientWidth;
  938. if (volumeWidthSet) {
  939. sliderValues();
  940. observer.disconnect();
  941. }
  942. }).observe(v.parentElement, {childList: true, subtree: true, attributes: true});
  943. }
  944. }
  945. }
  946.  
  947. function hasAudio() {
  948. return v.mozHasAudio ||
  949. Boolean(v.webkitAudioDecodedByteCount) ||
  950. Boolean(v.audioTracks && v.audioTracks.length);
  951. }
  952.  
  953. function compactControls() {
  954. const width = v.clientWidth;
  955. width < 892 ? v.classList.add('compact') : v.classList.remove('compact');
  956. width < 412 ? v.classList.add('compact-2') : v.classList.remove('compact-2');
  957. width < 316 ? v.classList.add('compact-3') : v.classList.remove('compact-3');
  958. width < 246 ? v.classList.add('compact-4') : v.classList.remove('compact-4');
  959. }
  960.  
  961. function imagusMouseDown(e) {
  962. const vid = $('.imagus-video-wrapper');
  963. if (vid && e.button === 2) {
  964. e.stopImmediatePropagation();
  965. imagusMouseTimeout = setTimeout(() => {
  966. imagusMouseTimeout = 'sticky';
  967. }, settings.imagusStickyDelay);
  968. }
  969. }
  970.  
  971. function imagusMouseUp(e) {
  972. const vid = $('.imagus-video-wrapper');
  973. if (vid && e.button === 2) {
  974. if (imagusMouseTimeout === 'sticky') {
  975. vid.classList.add('stickied');
  976. if (volume.classList.contains('disabled')) volumeSlider.value = 0;
  977. document.removeEventListener('mousedown', imagusMouseDown, true);
  978. document.removeEventListener('mouseup', imagusMouseUp, true);
  979. } else {
  980. clearInterval(imagusMouseTimeout);
  981. imagusMouseTimeout = false;
  982. }
  983. }
  984. }
  985.  
  986. function imagusClick(e) {
  987. const imagusStickied = $('.imagus-video-wrapper.stickied');
  988. if (imagusStickied) {
  989. if (e.target.closest('.imagus-video-wrapper.stickied')) {
  990. e.stopImmediatePropagation();
  991. } else {
  992. imagusStickied.removeAttribute('class');
  993. e.preventDefault();
  994. }
  995. }
  996. }
  997.  
  998. function imagusKeys(e) {
  999. const vid = $('.imagus-video-wrapper');
  1000. if (vid) {
  1001. if (e.keyCode === 90) {
  1002. vid.classList.add('stickied');
  1003. if (volume.classList.contains('disabled')) volumeSlider.value = 0;
  1004. document.removeEventListener('mousedown', imagusMouseDown, true);
  1005. document.removeEventListener('mouseup', imagusMouseUp, true);
  1006. }
  1007. }
  1008. }
  1009.  
  1010. function handleKeyDown(e) {
  1011. if (e.altKey || e.metaKey) {
  1012. return true; // Do not activate
  1013. }
  1014. const func = keyFuncs[e.keyCode];
  1015. if (func) {
  1016. if ((func.length < 3 && e.shiftKey) ||
  1017. (func.length < 4 && e.ctrlKey)) {
  1018. return true; // Do not activate
  1019. }
  1020. func(e.target, e.keyCode, e.shiftKey, e.ctrlKey);
  1021. e.preventDefault();
  1022. e.stopPropagation();
  1023. return false;
  1024. }
  1025. }
  1026.  
  1027. function handleKeyOther(e) {
  1028. if (e.altKey || e.metaKey) {
  1029. return true; // Do not prevent default
  1030. }
  1031. const func = keyFuncs[e.keyCode];
  1032. if (func) {
  1033. if ((func.length < 3 && e.shiftKey) ||
  1034. (func.length < 4 && e.ctrlKey)) {
  1035. return true; // Do not prevent default
  1036. }
  1037. e.preventDefault();
  1038. e.stopPropagation();
  1039. return false;
  1040. }
  1041. }
  1042.  
  1043. function docHandleKeyDown(e) {
  1044. if (document.body !== document.activeElement || e.altKey || e.metaKey) {
  1045. return true; // Do not activate
  1046. }
  1047. const func = keyFuncs[e.keyCode];
  1048. if (func) {
  1049. if ((func.length < 3 && e.shiftKey) ||
  1050. (func.length < 4 && e.ctrlKey)) {
  1051. return true; // Do not activate
  1052. }
  1053. func(v, e.keyCode, e.shiftKey, e.ctrlKey);
  1054. e.preventDefault();
  1055. e.stopPropagation();
  1056. return false;
  1057. }
  1058. }
  1059.  
  1060. function docHandleKeyOther(e) {
  1061. if (document.body !== document.activeElement || e.altKey || e.metaKey) {
  1062. return true; // Do not prevent default
  1063. }
  1064. const func = keyFuncs[e.keyCode];
  1065. if (func) {
  1066. if ((func.length < 3 && e.shiftKey) ||
  1067. (func.length < 4 && e.ctrlKey)) {
  1068. return true; // Do not prevent default
  1069. }
  1070. e.preventDefault();
  1071. e.stopPropagation();
  1072. return false;
  1073. }
  1074. }
  1075.  
  1076. // circumvent any scripts attempting to hijack video context menus
  1077. function preventHijack(e) {
  1078. e.stopPropagation();
  1079. e.stopImmediatePropagation();
  1080. const redirectEvent = e.target.ownerDocument.createEvent('MouseEvents');
  1081. redirectEvent.initMouseEvent(e, e.bubbles, e.cancelable);
  1082. return e;
  1083. }
  1084.  
  1085. function enforcePosition() {
  1086. setTimeout(() => {
  1087. let controlsDisplaced = controls !== v.nextSibling;
  1088. const vidDisplaced = videoWrapper !== v.parentNode;
  1089. if (vidDisplaced || controlsDisplaced) {
  1090. if (vidDisplaced) videoWrapper.appendChild(v);
  1091. controlsDisplaced = v !== controls.previousSibling;
  1092. if (controlsDisplaced) videoWrapper.insertBefore(controls, v.nextSibling);
  1093. const bs =
  1094. videoWrapper.querySelectorAll('videowrapper > *:not(video):not(controls)');
  1095. for (let i = 0; i < bs.length; ++i) {
  1096. bs[i].remove();
  1097. }
  1098. }
  1099. repeat++;
  1100. if (repeat < 10) enforcePosition.call(this);
  1101. }, 100);
  1102. }
  1103. }
  1104.  
  1105. function ytSaveCurrentTime(v) {
  1106. v.addEventListener('loadstart', ytCheckSavedTime);
  1107. v.addEventListener('loadeddata', ytCheckSavedTime);
  1108.  
  1109. v.ontimeupdate = () => {
  1110. if (v.currentTime > 0 && ytTimeChecked) localStorage.setItem(ytID, v.currentTime);
  1111. };
  1112.  
  1113. v.onended = () => {
  1114. if (localStorage.getItem(ytID)) localStorage.removeItem(ytID);
  1115. };
  1116. }
  1117.  
  1118. function ytCheckSavedTime(e) {
  1119. ytID = location.href.replace(/.*?\/(watch\?v=|embed\/)(.*?)(\?|&|$).*/, '$2');
  1120. const savedTime = localStorage.getItem(ytID);
  1121. const embed = /\/embed\//.test(location.href);
  1122. const timeURL = /(\?|&)(t(ime_continue)?|start)=[1-9]/.test(location.href);
  1123. const ytStart = $('.ytp-clip-start:not([style*="left: 0%;"])');
  1124. if (e.type === 'loadstart') {
  1125. ytTimeChecked = false;
  1126. if ((!ytStart || !savedTime) && !timeURL) ytTimeChecked = true;
  1127. if (ytStart) ytStart.click();
  1128. if (ytTimeChecked && savedTime) e.target.currentTime = savedTime;
  1129. e.target.focus({preventScroll: true});
  1130. if (!embed) window.scroll({top: 0, behavior: 'smooth'});
  1131. } else if (e.type === 'loadeddata' && !ytTimeChecked) {
  1132. if (savedTime) e.target.currentTime = savedTime;
  1133. ytTimeChecked = true;
  1134. }
  1135. }
  1136.  
  1137. window.addEventListener('DOMContentLoaded', () => {
  1138. const targets = 'video[controls], video[style*="visibility: inherit !important"]';
  1139.  
  1140. document.arrive(targets, {fireOnAttributesModification: true, existing: true}, v => {
  1141. if (!v.parentNode.parentNode) return;
  1142. const imagus = !v.hasAttribute('controls') &&
  1143. $('html > div[style*="z-index: 2147483647"]') === v.parentNode;
  1144. const vidOrParentsIdOrClass = v.id + v.classList + v.parentNode.id +
  1145. v.parentNode.classList + v.parentNode.parentNode.id + v.parentNode.parentNode.classList;
  1146. const exclude = v.classList.contains('custom-native-player') ||
  1147. v.classList.contains('imagus') ||
  1148. /(v(ideo)?|me)(-|_)?js|jw|jplay|plyr|kalt|flowp|wisti/i.test(vidOrParentsIdOrClass);
  1149. if (imagus || (v.hasAttribute('controls') && !exclude)) {
  1150. if (imagus) v.classList.add('imagus');
  1151. v.classList.add('custom-native-player');
  1152. v.classList.add('custom-native-player-hidden');
  1153. v.setAttribute('tabindex', '0');
  1154. v.setAttribute('preload', 'auto');
  1155. v.removeAttribute('controls');
  1156. customPlayer(v);
  1157. }
  1158. });
  1159. });
  1160.  
  1161. if (/^https?:\/\/www\.youtube\.com/.test(location.href)) {
  1162. document.arrive('video[src*="youtube.com"]', {fireOnAttributesModification: true, existing: true}, v => {
  1163. ytSaveCurrentTime(v);
  1164. });
  1165. }
  1166.  
  1167. GM_addStyle(`/* imagus */
  1168. .imagus-video-wrapper {
  1169. height: min-content!important;
  1170. position: fixed!important;
  1171. left: 0!important;
  1172. right: 0!important;
  1173. top: 0!important;
  1174. bottom: 0!important;
  1175. margin: auto!important;
  1176. box-shadow: none!important;
  1177. background-color: hsl(0, 0%, 0%)!important;
  1178. width: calc(100% - 100px)!important;
  1179. }
  1180.  
  1181. .imagus-video-wrapper.stickied {
  1182. box-shadow: 0 0 0 100000px hsla(0, 0%, 0%, .7)!important;
  1183. }
  1184.  
  1185. .imagus-video-wrapper videowrapper {
  1186. height: 0!important;
  1187. padding-top: 56.25%!important;
  1188. }
  1189.  
  1190. .imagus-video-wrapper videowrapper video.custom-native-player {
  1191. position: absolute!important;
  1192. }
  1193.  
  1194. @media (min-width: 177.778vh) {
  1195. .imagus-video-wrapper {
  1196. margin: 18px auto!important;
  1197. height: calc(100vh - 18px)!important;
  1198. width: calc(((100vh - 18px) * 16) / 9)!important;
  1199. }
  1200.  
  1201. .imagus-video-wrapper videowrapper {
  1202. height: 100%!important;
  1203. padding-top: 0!important;
  1204. }
  1205.  
  1206. .imagus-video-wrapper videowrapper video.custom-native-player {
  1207. position: relative!important;
  1208. }
  1209. }
  1210.  
  1211. html > div[style*="2147483647"] > img[style*="display: block"] ~ videowrapper {
  1212. display: none!important;
  1213. }
  1214.  
  1215. html > div[style*="2147483647"] {
  1216. background: none!important;
  1217. box-shadow: none!important;
  1218. border: 0!important;
  1219. }
  1220.  
  1221. html > div[style*="2147483647"] videowrapper + div {
  1222. -webkit-text-fill-color: hsl(0, 0%, 90%)!important;
  1223. box-shadow: none!important;
  1224. width: 100%!important;
  1225. max-width: 100%!important;
  1226. box-sizing: border-box!important;
  1227. overflow: hidden!important;
  1228. text-overflow: ellipsis!important;
  1229. }
  1230.  
  1231. html > div:not(.stickied) video.custom-native-player + controls,
  1232. video[controls]:not(.custom-native-player) {
  1233. opacity: 0!important;
  1234. pointer-events: none!important;
  1235. }
  1236.  
  1237. videowrapper {
  1238. --wrapper-position: relative;
  1239. position: var(--wrapper-position)!important;
  1240. height: 100%!important;
  1241. display: block!important;
  1242. font-size: 0px!important;
  1243. top: 0!important;
  1244. bottom: 0!important;
  1245. left: 0!important;
  1246. right: 0!important;
  1247. background-color: hsl(0, 0%, 0%)!important;
  1248. overflow: hidden!important;
  1249. }
  1250.  
  1251. video.custom-native-player + controls timetooltip,
  1252. video.custom-native-player + controls volumetooltip {
  1253. position: absolute!important;
  1254. display: none!important;
  1255. top: -25px!important;
  1256. height: 22px!important;
  1257. line-height: 22px!important;
  1258. text-align: center!important;
  1259. border-radius: 4px!important;
  1260. font-size: 12px!important;
  1261. background: hsla(0, 0%, 0%, .7)!important;
  1262. box-shadow: 0 0 4px hsla(0, 0%, 100%, .5)!important;
  1263. color: hsl(0, 0%, 100%)!important;
  1264. pointer-events: none!important;
  1265. }
  1266.  
  1267. video.custom-native-player + controls timetooltip {
  1268. margin-left: -25px!important;
  1269. width: 50px!important;
  1270. }
  1271.  
  1272. video.custom-native-player + controls volumetooltip {
  1273. margin-left: -20px!important;
  1274. width: 40px!important;
  1275. }
  1276.  
  1277. video.custom-native-player.compact + controls timeline timetooltip {
  1278. top: -25px!important;
  1279. }
  1280.  
  1281. video.custom-native-player.compact + controls btn,
  1282. video.custom-native-player.compact + controls rate,
  1283. video.custom-native-player.compact + controls volume {
  1284. height: 24px!important;
  1285. line-height: 22px!important;
  1286. }
  1287.  
  1288. video.custom-native-player.compact + controls volume input {
  1289. padding-bottom: 2px!important;
  1290. }
  1291.  
  1292. video.custom-native-player.compact + controls btn:before {
  1293. margin-top: -2px!important;
  1294. }
  1295.  
  1296. video.custom-native-player.compact + controls volume > volumebar {
  1297. top: 6px!important;
  1298. }
  1299.  
  1300. video.custom-native-player + controls timelinewrapper {
  1301. line-height: 20px!important;
  1302. }
  1303.  
  1304. video.custom-native-player + controls timeline:hover timetooltip:not(.hidden),
  1305. video.custom-native-player + controls volume:hover volumetooltip:not(.hidden) {
  1306. display: inline!important;
  1307. }
  1308.  
  1309. video.custom-native-player {
  1310. cursor: none!important;
  1311. max-height: 100%!important;
  1312. height: 100%!important;
  1313. width: 100%!important;
  1314. margin: 0!important;
  1315. padding: 0!important;
  1316. top: 0!important;
  1317. bottom: 0!important;
  1318. left: 0!important;
  1319. right: 0!important;
  1320. background-color: hsl(0, 0%, 0%)!important;
  1321. border-radius: 0!important;
  1322. }
  1323.  
  1324. video.custom-native-player:not(.contains-source):not([src*="/"]) {
  1325. cursor: auto!important;
  1326. }
  1327.  
  1328. video.custom-native-player:not(.contains-source):not([src*="/"]) + controls {
  1329. display: none!important;
  1330. }
  1331.  
  1332. video.custom-native-player + controls > * {
  1333. background: none!important;
  1334. outline: none!important;
  1335. line-height: 32px!important;
  1336. font-family: monospace!important;
  1337. }
  1338.  
  1339. video.custom-native-player.compact + controls > * {
  1340. line-height: 24px!important;
  1341. }
  1342.  
  1343. video.custom-native-player + controls {
  1344. --controls-z-index: 1;
  1345. white-space: nowrap!important;
  1346. transition: opacity .5s ease 0s!important;
  1347. background-color: hsla(0, 0%, 0%, .85)!important;
  1348. height: 32px !important;
  1349. width: 100%!important;
  1350. cursor: default !important;
  1351. font-size: 18px !important;
  1352. user-select: none!important;
  1353. z-index: var(--controls-z-index)!important;
  1354. flex: none!important;
  1355. position: absolute!important;
  1356. display: flex!important;
  1357. flex-wrap: wrap!important;
  1358. opacity: 0!important;
  1359. margin: 0!important;
  1360. bottom: 0!important;
  1361. left: 0!important;
  1362. right: 0!important;
  1363. }
  1364.  
  1365. video.custom-native-player.custom-native-player-hidden,
  1366. video.custom-native-player.custom-native-player-hidden + controls {
  1367. opacity: 0!important;
  1368. pointer-events: none!important;
  1369. }
  1370.  
  1371. video.custom-native-player.paused + controls,
  1372. video.custom-native-player.active + controls,
  1373. video.custom-native-player + controls:hover {
  1374. opacity: 1!important;
  1375. }
  1376.  
  1377. video.custom-native-player + controls timeline {
  1378. flex-grow: 1!important;
  1379. position: relative!important;
  1380. align-items: center!important;
  1381. flex-direction: column!important;
  1382. height: 100%!important;
  1383. }
  1384.  
  1385. video.custom-native-player + controls timelinewrapper {
  1386. flex: 1 0 480px!important;
  1387. position: relative!important;
  1388. align-items: center!important;
  1389. }
  1390.  
  1391. video.custom-native-player.compact + controls timelinewrapper {
  1392. order: -1;
  1393. flex-basis: 100%!important;
  1394. height: 20px!important;
  1395. }
  1396.  
  1397. video.custom-native-player.compact + controls timeline timebar {
  1398. top: 5px!important;
  1399. }
  1400.  
  1401. video.custom-native-player.compact + controls currenttime,
  1402. video.custom-native-player.compact + controls totaltime {
  1403. line-height: 20px!important;
  1404. }
  1405.  
  1406. video.custom-native-player.compact + controls {
  1407. height: 44px!important;
  1408. }
  1409.  
  1410. video.custom-native-player.compact-2 + controls btn.begin,
  1411. video.custom-native-player.compact-2 + controls btn.skip-short,
  1412. video.custom-native-player.compact-3 + controls rate,
  1413. video.custom-native-player.compact-3 + controls btn.rate-increase,
  1414. video.custom-native-player.compact-3 + controls btn.rate-decrease,
  1415. video.custom-native-player.compact-4 + controls btn.skip-long {
  1416. display: none!important;
  1417. }
  1418.  
  1419. video.custom-native-player + controls > * {
  1420. display: inline-flex!important;
  1421. }
  1422.  
  1423. video.custom-native-player.compact-2 + controls btn.rate-increase,
  1424. video.custom-native-player.compact-4 + controls btn.toggle-play {
  1425. margin-right: auto!important;
  1426. }
  1427.  
  1428. video.custom-native-player + controls timeline > timebar > timebuffer,
  1429. video.custom-native-player + controls timeline > timebar > timeprogress,
  1430. video.custom-native-player + controls volume > volumebar > volumetrail {
  1431. position: absolute!important;
  1432. flex: none!important;
  1433. pointer-events: none!important;
  1434. height: 100%!important;
  1435. border-radius: 20px!important;
  1436. }
  1437.  
  1438. video.custom-native-player + controls timeline > timebar,
  1439. video.custom-native-player + controls volume > volumebar {
  1440. position: absolute!important;
  1441. height: 10px!important;
  1442. border-radius: 20px!important;
  1443. overflow: hidden!important;
  1444. background-color: hsla(0, 0%, 16%, .85)!important;
  1445. top: 11px!important;
  1446. left: 0!important;
  1447. right: 0!important;
  1448. pointer-events: none!important;
  1449. z-index: -1!important;
  1450. box-shadow: inset 0 0 0 1px hsla(0, 0%, 40%), inset 0 0 5px hsla(0, 0%, 40%, .85)!important;
  1451. }
  1452.  
  1453. video.custom-native-player + controls volume.disabled,
  1454. video.custom-native-player + controls btn.disabled {
  1455. -webkit-filter: brightness(.4);
  1456. filter: brightness(.4);
  1457. pointer-events: none!important;
  1458. }
  1459.  
  1460. video.custom-native-player.disabled,
  1461. video.custom-native-player.active.disabled {
  1462. cursor: default!important;
  1463. }
  1464.  
  1465. video.custom-native-player.disabled + controls {
  1466. opacity: 1!important;
  1467. -webkit-filter: brightness(.3)sepia(1)hue-rotate(320deg)saturate(5);
  1468. filter: brightness(.3)sepia(1)hue-rotate(320deg)saturate(5);
  1469. }
  1470.  
  1471. video.custom-native-player.disabled + controls > * {
  1472. pointer-events: none!important;
  1473. }
  1474.  
  1475. video.custom-native-player + controls volume {
  1476. max-width: 70px!important;
  1477. flex: 1 0 48px!important;
  1478. position: relative!important;
  1479. margin: 0 12px!important;
  1480. }
  1481.  
  1482. video.custom-native-player + controls timeline > timebar > timebuffer {
  1483. background-color: hsla(0, 0%, 100%, .2)!important;
  1484. border-top-right-radius: 20px!important;
  1485. border-bottom-right-radius: 20px!important;
  1486. left: 0!important;
  1487. }
  1488.  
  1489. video.custom-native-player + controls timeline > timebar > timeprogress,
  1490. video.custom-native-player + controls volume > volumebar > volumetrail {
  1491. background-color: hsla(0, 0%, 100%, .4)!important;
  1492. left: 0!important;
  1493. }
  1494.  
  1495. video.custom-native-player + controls volume.disabled volumetrail {
  1496. width: 0!important;
  1497. }
  1498.  
  1499. video.custom-native-player + controls timeline > input {
  1500. height: 100%!important;
  1501. width: 100%!important;
  1502. }
  1503.  
  1504. video.custom-native-player.active {
  1505. cursor: pointer!important;
  1506. }
  1507.  
  1508. video.custom-native-player + controls btn {
  1509. border: none !important;
  1510. cursor: pointer!important;
  1511. background-color: transparent!important;
  1512. font-family: "Segoe UI Symbol"!important;
  1513. font-size: 18px !important;
  1514. margin: 0px !important;
  1515. align-items: center!important;
  1516. justify-content: center!important;
  1517. height: 32px!important;
  1518. padding: 0!important;
  1519. flex: 1 1 32px!important;
  1520. max-width: 46px!important;
  1521. box-sizing: content-box!important;
  1522. position: relative!important;
  1523. opacity: .86!important;
  1524. transition: opacity .3s, text-shadow .3s!important;
  1525. -webkit-text-fill-color: hsl(0, 0%, 100%)!important;
  1526. }
  1527.  
  1528. video.custom-native-player + controls btn.toggle-play {
  1529. flex: 1 1 46px!important
  1530. }
  1531.  
  1532. video.custom-native-player + controls btn:hover {
  1533. opacity: 1!important;
  1534. text-shadow: 0 0 8px hsla(0, 0%, 100%)!important;
  1535. }
  1536.  
  1537. video.custom-native-player + controls btn.expand {
  1538. font-size: 20px!important;
  1539. font-weight: bold!important;
  1540. }
  1541.  
  1542. video.custom-native-player + controls btn.skip-long {
  1543. font-size: 18px!important;
  1544. }
  1545.  
  1546. video.custom-native-player + controls btn.skip-short {
  1547. font-size: 12px!important;
  1548. }
  1549.  
  1550. video.custom-native-player + controls btn.begin {
  1551. font-size: 18px!important;
  1552. }
  1553.  
  1554. video.custom-native-player + controls btn.mute {
  1555. font-size: 22px!important;
  1556. }
  1557.  
  1558. video.custom-native-player + controls btn.expand {
  1559. font-size: 20px!important;
  1560. font-weight: bold!important;
  1561. }
  1562.  
  1563. video.custom-native-player + controls btn.rate-decrease,
  1564. video.custom-native-player + controls btn.rate-increase {
  1565. font-size: 14px!important;
  1566. padding: 0!important;
  1567. flex: 1 0 14px!important;
  1568. max-width: 24px!important;
  1569. }
  1570.  
  1571. video.custom-native-player.playback-rate-increased + controls btn.rate-increase,
  1572. video.custom-native-player.playback-rate-decreased + controls btn.rate-decrease {
  1573. -webkit-text-fill-color: cyan!important;
  1574. }
  1575.  
  1576. video.custom-native-player + controls rate {
  1577. height: 32px!important;
  1578. width: 42px!important;
  1579. margin: 0!important;
  1580. display: unset!important;
  1581. text-align: center!important;
  1582. font-size: 14px!important;
  1583. flex-shrink: 0!important;
  1584. font-weight: bold!important;
  1585. letter-spacing: .5px!important;
  1586. -webkit-text-fill-color: hsl(0, 0%, 100%)!important;
  1587. user-select: none!important;
  1588. pointer-events: none!important;
  1589. opacity: .86!important;
  1590. }
  1591.  
  1592. video.custom-native-player + controls rate[data-current-rate] {
  1593. pointer-events: all!important;
  1594. cursor: pointer!important;
  1595. }
  1596.  
  1597. video.custom-native-player + controls rate[data-current-rate]:hover {
  1598. transition: opacity .3s, text-shadow .3s!important;
  1599. opacity: 1!important;
  1600. text-shadow: 0 0 8px hsla(0, 0%, 100%)!important;
  1601. }
  1602.  
  1603. video.custom-native-player + controls input[type=range] {
  1604. -webkit-appearance: none!important;
  1605. background-color: transparent !important;
  1606. outline: none!important;
  1607. border: 0!important;
  1608. border-radius: 6px !important;
  1609. margin: 0!important;
  1610. top: 0!important;
  1611. bottom: 0!important;
  1612. left: 0!important;
  1613. right: 0!important;
  1614. padding: 0!important;
  1615. width: 100%!important;
  1616. position: relative!important;
  1617. }
  1618.  
  1619. video.custom-native-player + controls input[type='range']::-webkit-slider-thumb {
  1620. -webkit-appearance: none!important;
  1621. background-color: hsl(0, 0%, 86%)!important;
  1622. border: 0!important;
  1623. height: 14px!important;
  1624. width: 14px!important;
  1625. border-radius: 50%!important;
  1626. pointer-events: none!important;
  1627. }
  1628.  
  1629. video.custom-native-player.muted + controls volume input[type='range']::-webkit-slider-thumb {
  1630. background-color: hsl(0, 0%, 50%)!important;
  1631. }
  1632.  
  1633. video.custom-native-player + controls input[type='range']::-moz-range-thumb {
  1634. -webkit-appearance: none!important;
  1635. background-color: hsl(0, 0%, 86%)!important;
  1636. border: 0!important;
  1637. height: 14px!important;
  1638. width: 14px!important;
  1639. border-radius: 50%!important;
  1640. pointer-events: none!important;
  1641. }
  1642.  
  1643. video.custom-native-player.muted + controls volume input[type='range']::-moz-range-thumb {
  1644. background-color: hsl(0, 0%, 50%)!important;
  1645. }
  1646.  
  1647. video.custom-native-player + controls currenttime,
  1648. video.custom-native-player + controls totaltime {
  1649. font-family: monospace, arial!important;
  1650. font-weight: bold!important;
  1651. font-size: 14px!important;
  1652. letter-spacing: .5px!important;
  1653. height: 100%!important;
  1654. line-height: 32px!important;
  1655. min-width: 58px!important;
  1656. display: unset!important;
  1657. -webkit-text-fill-color: hsl(0, 0%, 86%)!important;
  1658. }
  1659.  
  1660. video.custom-native-player + controls btn.rate-decrease {
  1661. margin-left: auto!important;
  1662. }
  1663.  
  1664. video.custom-native-player + controls currenttime {
  1665. padding: 0 12px 0 0!important;
  1666. margin-right: 2px!important;
  1667. text-align: right!important;
  1668. }
  1669.  
  1670. video.custom-native-player + controls totaltime {
  1671. padding: 0 0 0 12px!important;
  1672. margin-left: 2px!important;
  1673. text-align: left!important;
  1674. }
  1675.  
  1676. .direct-video-top-level {
  1677. margin: 0!important;
  1678. padding: 0!important;
  1679. display: flex!important;
  1680. align-items: center!important;
  1681. justify-content: center!important;
  1682. }
  1683.  
  1684. .direct-video-top-level video {
  1685. height: calc(((100vw - 30px) * 9) / 16)!important;
  1686. min-height: calc(((100vw - 30px) * 9) / 16)!important;
  1687. max-height: calc(((100vw - 30px) * 9) / 16)!important;
  1688. width: calc(100vw - 30px)!important;
  1689. min-width: calc(100vw - 30px)!important;
  1690. max-width: calc(100vw - 30px)!important;
  1691. margin: auto!important;
  1692. }
  1693.  
  1694. .direct-video-top-level > video.custom-native-player + controls {
  1695. position: absolute!important;
  1696. left: 0!important;
  1697. right: 0!important;
  1698. margin: 0 auto !important;
  1699. width: calc(100vw - 30px)!important;
  1700. bottom: calc((100vh - (((100vw - 30px) * 9) / 16)) / 2)!important;
  1701. }
  1702.  
  1703. @media (min-width: 177.778vh) {
  1704. .direct-video-top-level video {
  1705. position: unset!important;
  1706. height: calc(100vh - 30px)!important;
  1707. min-height: calc(100vh - 30px)!important;
  1708. max-height: calc(100vh - 30px)!important;
  1709. width: calc(((100vh - 30px) * 16) / 9)!important;
  1710. min-width: calc(((100vh - 30px) * 16) / 9)!important;
  1711. max-width: calc(((100vh - 30px) * 16) / 9)!important;
  1712. margin: 0 auto!important;
  1713. padding: 0!important;
  1714. background-color: hsl(0, 0%, 0%)!important;
  1715. }
  1716.  
  1717. .direct-video-top-level > video.custom-native-player + controls {
  1718. width: calc(((100vh - 30px) * 16) / 9)!important;
  1719. min-width: calc(((100vh - 30px) * 16) / 9)!important;
  1720. max-width: calc(((100vh - 30px) * 16) / 9)!important;
  1721. bottom: 15px!important;
  1722. }
  1723. }
  1724.  
  1725. video::-webkit-media-controls,
  1726. .native-fullscreen > *:not(video):not(controls) {
  1727. display: none!important;
  1728. }
  1729.  
  1730. .native-fullscreen video.custom-native-player,
  1731. .direct-video-top-level .native-fullscreen video.custom-native-player {
  1732. height: 100vh!important;
  1733. width: 100vw!important;
  1734. max-height: 100vh!important;
  1735. max-width: 100vw!important;
  1736. min-height: 100vh!important;
  1737. min-width: 100vw!important;
  1738. margin: 0!important;
  1739. }
  1740.  
  1741. .native-fullscreen video.custom-native-player + controls {
  1742. position: fixed!important;
  1743. bottom: 0!important;
  1744. left: 0!important;
  1745. right: 0!important;
  1746. margin: 0!important;
  1747. width: 100vw!important;
  1748. max-width: 100vw!important;
  1749. }
  1750.  
  1751. video.custom-native-player + controls btn.skip-short,
  1752. video.custom-native-player + controls btn.skip-long,
  1753. video.custom-native-player + controls btn.begin,
  1754. video.custom-native-player + controls btn.toggle-play,
  1755. video.custom-native-player + controls btn.rate-decrease,
  1756. video.custom-native-player + controls btn.rate-increase,
  1757. video.custom-native-player + controls btn.mute,
  1758. video.custom-native-player + controls btn.expand {
  1759. font-size: 0!important;
  1760. }
  1761.  
  1762. video.custom-native-player + controls btn:before {
  1763. font-family: 'customNativePlayer'!important;
  1764. font-size: 20px!important;
  1765. }
  1766.  
  1767. video.custom-native-player + controls btn.skip-short.right:before {
  1768. content: '\\e90c'!important;
  1769. }
  1770.  
  1771. video.custom-native-player + controls btn.skip-short.left:before {
  1772. content: '\\e90b'!important;
  1773. }
  1774.  
  1775. video.custom-native-player + controls btn.skip-long.right:before {
  1776. content: '\\e901'!important;
  1777. }
  1778.  
  1779. video.custom-native-player + controls btn.skip-long.left:before {
  1780. content: '\\e902'!important;
  1781. }
  1782.  
  1783. video.custom-native-player + controls btn.begin:before {
  1784. content: '\\e908'!important;
  1785. }
  1786.  
  1787. video.custom-native-player + controls btn.toggle-play:before {
  1788. content: '\\e906'!important;
  1789. font-size: 24px!important;
  1790. }
  1791.  
  1792. video.custom-native-player.playing + controls btn.toggle-play:before {
  1793. content: '\\e905'!important;
  1794. font-size: 24px!important;
  1795. }
  1796.  
  1797. video.custom-native-player + controls btn.rate-decrease:before {
  1798. content: '\\ea0b'!important;
  1799. font-size: 10px!important;
  1800. }
  1801.  
  1802. video.custom-native-player + controls btn.rate-increase:before {
  1803. content: '\\ea0a'!important;
  1804. font-size: 10px!important;
  1805. }
  1806.  
  1807. video.custom-native-player + controls btn.mute:before {
  1808. content: '\\e90a'!important;
  1809. font-size: 22px!important;
  1810. }
  1811.  
  1812. video.custom-native-player.muted + controls btn.mute:before {
  1813. content: '\\e909'!important;
  1814. font-size: 22px!important;
  1815. }
  1816.  
  1817. video.custom-native-player + controls btn.mute.disabled:before {
  1818. content: '\\e909'!important;
  1819. }
  1820.  
  1821. video.custom-native-player + controls btn.expand:before {
  1822. content: '\\e904'!important;
  1823. font-size: 24px!important;
  1824. font-weight: normal!important;
  1825. }
  1826.  
  1827. .native-fullscreen video.custom-native-player + controls btn.expand:before {
  1828. content: '\\e903'!important;
  1829. font-size: 24px!important;
  1830. }
  1831.  
  1832. @font-face {
  1833. font-family: 'customNativePlayer';
  1834. 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');
  1835. font-weight: normal;
  1836. font-style: normal;
  1837. }`);