UNPKG

@vuux/video

Version:

Vue Nuxt 视频播放器

15 lines (14 loc) 596 B
const u = (t) => { let e = ~~(t / 3600), n = ~~(t % 3600 / 60), c = ~~(t % 60); return e = e < 10 ? "0" + e : e, n = n < 10 ? "0" + n : n, c = c < 10 ? "0" + c : c, `${e}:${n}:${c}`; }, l = (t) => { const e = document, n = e.fullscreenElement || e.webkitFullscreenElement || e.mozFullScreenElement; return n ? document.exitFullscreen.call(e) : t.requestFullscreen.call(t), !n; }, r = async (t) => { document.pictureInPictureElement ? await document.exitPictureInPicture() : await t.requestPictureInPicture(); }; export { l as fullScreen, r as pictureInPicture, u as timeFormat };