mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-20 12:11:20 -08:00
build all packages
This commit is contained in:
1 parent
8f68191efc
commit
d73666475c
13 files changed
+31
-25
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { debounce, isInViewport } from '../utils';
|
||||
import { throttle, isInViewport } from '../utils';
|
||||
|
||||
export default function viewInit(art, events) {
|
||||
const {
|
||||
@@ -7,7 +7,7 @@ export default function viewInit(art, events) {
|
||||
template: { $container },
|
||||
} = art;
|
||||
|
||||
const scrollFn = debounce(() => {
|
||||
const scrollFn = throttle(() => {
|
||||
art.emit('view', isInViewport($container));
|
||||
}, 200);
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ import { addClass, removeClass, def } from '../utils';
|
||||
const nativeScreenfull = (art, player) => {
|
||||
const { $player } = art.template;
|
||||
|
||||
screenfull.on('change', () => art.emit('fullscreen', screenfull.isFullscreen));
|
||||
|
||||
def(player, 'fullscreen', {
|
||||
get() {
|
||||
return screenfull.isFullscreen;
|
||||
|
||||
Reference in new issue
Block a user