Skip to content

Commit

Permalink
fix(core): 修复超星音频任务不能播放的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
enncy committed Jun 2, 2022
1 parent 8b8a0c4 commit 2777c69
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/core/src/script/cx/study.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,9 @@ function searchTask(setting: ScriptSettings['cx']['study']): (() => Promise<void
*/
export function fixedVideoProgress(fixed: boolean) {
const videojs = useContext().cx.videojs;

if (videojs) {
const { bar } = domSearch({ bar: '.vjs-control-bar' }, videojs);
if (bar) {
console.log('fixedVideoProgress', { bar, fixed });
bar.style.opacity = fixed ? '1' : '0';
}
}
Expand Down Expand Up @@ -192,7 +190,7 @@ function mediaTask(setting: ScriptSettings['cx']['study'], media: HTMLMediaEleme
const { playbackRate = 1, volume = 0 } = setting;

// @ts-ignore
const { videojs } = domSearch({ videojs: '#video' }, frame.contentDocument || document);
const { videojs } = domSearch({ videojs: '#video,#audio' }, frame.contentDocument || document);

if (!videojs) {
message('error', '视频检测不到,请尝试刷新或者手动切换下一章。');
Expand Down

0 comments on commit 2777c69

Please sign in to comment.