fix: 本地字幕合成视频只有 10 秒
This commit is contained in:
@@ -39,10 +39,9 @@ export const useVideoSubtitleEmbedding = async (
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const videoSprite = new OffscreenSprite(
|
const videoClip = new MP4Clip((await fetch(videoUrl)).body!)
|
||||||
new MP4Clip((await fetch(videoUrl)).body!)
|
const videoSprite = new OffscreenSprite(videoClip)
|
||||||
);
|
videoSprite.time = { duration: videoClip.meta.duration, offset: 0 }
|
||||||
videoSprite.time = { duration: 10e6, offset: 0 };
|
|
||||||
await videoSprite.ready;
|
await videoSprite.ready;
|
||||||
|
|
||||||
const srtSprite = new OffscreenSprite(
|
const srtSprite = new OffscreenSprite(
|
||||||
@@ -62,7 +61,7 @@ export const useVideoSubtitleEmbedding = async (
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
await srtSprite.ready;
|
await srtSprite.ready;
|
||||||
srtSprite.time = { duration: 10e6, offset: 0 };
|
srtSprite.time = { duration: videoClip.meta.duration, offset: 0 }
|
||||||
|
|
||||||
const combinator = new Combinator({
|
const combinator = new Combinator({
|
||||||
width: 1920,
|
width: 1920,
|
||||||
|
|||||||
Reference in New Issue
Block a user