分离控制器功能

This commit is contained in:
Harvey Zack committed 2018-11-06 09:57:30 +08:00
1 parent 851303e530
commit ca7e24a525
21 files changed
+539 -487

No files matched your search

+2 -1
View File
@@ -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);