Custom Native HTML5 Player with Shortcuts

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

目前为 2020-06-15 提交的版本。查看 最新版本

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