���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/video/layout/js/node_modules/artplayer/src/player/ |
import { def } from '../utils'; function nativePip(art) { const { template: { $video }, proxy, notice, } = art; $video.disablePictureInPicture = false; def(art, 'pip', { get() { return document.pictureInPictureElement; }, set(value) { if (value) { art.state = 'pip'; $video.requestPictureInPicture().catch((err) => { notice.show = err; throw err; }); } else { document.exitPictureInPicture().catch((err) => { notice.show = err; throw err; }); } }, }); proxy($video, 'enterpictureinpicture', () => { art.emit('pip', true); }); proxy($video, 'leavepictureinpicture', () => { art.emit('pip', false); }); } function webkitPip(art) { const { $video } = art.template; $video.webkitSetPresentationMode('inline'); def(art, 'pip', { get() { return $video.webkitPresentationMode === 'picture-in-picture'; }, set(value) { if (value) { art.state = 'pip'; $video.webkitSetPresentationMode('picture-in-picture'); art.emit('pip', true); } else { $video.webkitSetPresentationMode('inline'); art.emit('pip', false); } }, }); } export default function pipMix(art) { const { i18n, notice, template: { $video }, } = art; if (document.pictureInPictureEnabled) { nativePip(art); } else if ($video.webkitSupportsPresentationMode) { webkitPip(art); } else { def(art, 'pip', { get() { return false; }, set() { notice.show = i18n.get('PIP Not Supported'); }, }); } }