mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 16:11:20 -08:00
4.3.11
This commit is contained in:
1 parent
07a58c0a38
commit
ec6b439d39
7 files changed
+24
-18
No files matched your search
@@ -218,6 +218,8 @@ Artplayer.MOBILE_AUTO_PLAYBACKRATE = 3;
|
||||
Artplayer.MOBILE_AUTO_PLAYBACKRATE_TIME = 1000;
|
||||
Artplayer.MOBILE_AUTO_ORIENTATION_TIME = 100;
|
||||
Artplayer.INFO_LOOP_TIME = 1000;
|
||||
Artplayer.FAST_FORWARD_VALUE = 3;
|
||||
Artplayer.FAST_FORWARD_TIME = 1000;
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
|
||||
@@ -2,20 +2,21 @@ import { hasClass, addClass, removeClass } from '../utils';
|
||||
|
||||
export default function fastForward(art) {
|
||||
const {
|
||||
constructor,
|
||||
events: { proxy },
|
||||
template: { $player, $video },
|
||||
} = art;
|
||||
|
||||
let isPress = false;
|
||||
let timer = null;
|
||||
let isPress = false;
|
||||
|
||||
const onStart = () => {
|
||||
if (art.playing) {
|
||||
const onStart = (event) => {
|
||||
if (event.touches.length === 1 && art.playing) {
|
||||
timer = setTimeout(() => {
|
||||
isPress = true;
|
||||
art.playbackRate = 3;
|
||||
art.playbackRate = constructor.FAST_FORWARD_VALUE;
|
||||
addClass($player, 'art-fast-forward');
|
||||
}, 1000);
|
||||
}, constructor.FAST_FORWARD_TIME);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user