mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
分离控制器功能
This commit is contained in:
1 parent
851303e530
commit
ca7e24a525
21 files changed
+539
-487
No files matched your search
@@ -1,9 +1,10 @@
|
||||
import { secondToTime } from '../utils';
|
||||
|
||||
export default function seekMix(art, player) {
|
||||
const { refs: { $video }, notice } = art;
|
||||
|
||||
Object.defineProperty(player, 'seek', {
|
||||
value: time => {
|
||||
const { refs: { $video }, notice } = art;
|
||||
let newTime = Math.max(time, 0);
|
||||
if ($video.duration) {
|
||||
newTime = Math.min(newTime, $video.duration);
|
||||
|
||||
Reference in new issue
Block a user