Fix: dynamic expire id
This commit is contained in:
parent
ef9c380edb
commit
54d2e7a9c8
|
@ -78,7 +78,7 @@ const newSyncControl = (art: Artplayer, publishStatus: (msg: ElementMessage) =>
|
|||
export const newSyncPlugin = (
|
||||
publishStatus: (msg: ElementMessage) => boolean,
|
||||
dynamicStatus: MovieStatus,
|
||||
expireId: number
|
||||
dynamicExpireId: () => number
|
||||
) => {
|
||||
return (art: Artplayer): syncPlugin => {
|
||||
const playingStatusDebounce = debounces(debounceTime);
|
||||
|
@ -196,7 +196,7 @@ export const newSyncPlugin = (
|
|||
seek: art.currentTime,
|
||||
rate: art.playbackRate
|
||||
},
|
||||
expireId
|
||||
expireId: dynamicExpireId()
|
||||
}
|
||||
})
|
||||
);
|
||||
|
|
|
@ -195,7 +195,9 @@ const newLazyInitSyncPlugin = () => {
|
|||
return async (art: Artplayer) => {
|
||||
console.log("加载进度同步插件中...");
|
||||
const sync = await syncP;
|
||||
art.plugins.add(sync.newSyncPlugin(sendElement, room.currentStatus, room.currentExpireId));
|
||||
art.plugins.add(
|
||||
sync.newSyncPlugin(sendElement, room.currentStatus, () => room.currentExpireId)
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue