Skip to content

Commit

Permalink
Merge pull request #192 from Yukiniro/uu59tp8w
Browse files Browse the repository at this point in the history
chore: typo fix
  • Loading branch information
hughfenghen authored Jul 22, 2024
2 parents 4ab54f0 + 0096273 commit e2f6f20
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/av-cliper/demo/concat-media.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<span> | </span>
<button id="test-mem-cost">test mem cost</button>
<p />
<div id="player-continer">
<div id="player-container">
</div>
<hr>
<script type="module" src="concat-media.ts"></script>
Expand Down
20 changes: 10 additions & 10 deletions packages/av-cliper/demo/concat-media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import { createChromakey, fastConcatMP4 } from '../src';
}
})();

const playerContiner = document.querySelector('#player-continer')!;
const playerContainer = document.querySelector('#player-container')!;

document.querySelector('#mp4-img')?.addEventListener('click', () => {
(async () => {
const resList = ['./video/webav1.mp4', './img/bunny.png'];
const { loadStream } = playOutputStream(resList, playerContiner);
const { loadStream } = playOutputStream(resList, playerContainer);

const spr1 = new OffscreenSprite(
new MP4Clip((await fetch(resList[0])).body!),
Expand Down Expand Up @@ -84,7 +84,7 @@ document.querySelector('#mp4-img')?.addEventListener('click', () => {
document.querySelector('#mp4-mp3')?.addEventListener('click', () => {
(async () => {
const resList = ['./video/bunny_0.mp4', './audio/44.1kHz-2chan.mp3'];
const { loadStream } = playOutputStream(resList, playerContiner);
const { loadStream } = playOutputStream(resList, playerContainer);

const resp1 = await fetch(resList[0]);
const mp4Clip = new MP4Clip(resp1.body!);
Expand Down Expand Up @@ -115,7 +115,7 @@ document.querySelector('#mp4-mp3')?.addEventListener('click', () => {
document.querySelector('#mix-audio')?.addEventListener('click', () => {
(async () => {
const resList = ['./audio/44.1kHz-2chan.m4a', './audio/16kHz-1chan.mp3'];
const { loadStream } = playOutputStream(resList, playerContiner, 'audio');
const { loadStream } = playOutputStream(resList, playerContainer, 'audio');

const resp1 = await fetch(resList[0]);
const resp2 = await fetch(resList[1]);
Expand All @@ -137,7 +137,7 @@ document.querySelector('#mix-audio')?.addEventListener('click', () => {
document.querySelector('#concat-audio')?.addEventListener('click', () => {
(async () => {
const resList = ['./audio/16kHz-1chan.mp3', './audio/44.1kHz-2chan.m4a'];
const { loadStream } = playOutputStream(resList, playerContiner);
const { loadStream } = playOutputStream(resList, playerContainer);

const clip = await concatAudioClip(
await Promise.all(
Expand All @@ -157,7 +157,7 @@ document.querySelector('#concat-audio')?.addEventListener('click', () => {
document.querySelector('#gif-m4a')?.addEventListener('click', () => {
(async () => {
const resList = ['./img/animated.gif', './audio/44.1kHz-2chan.m4a'];
const { loadStream } = playOutputStream(resList, playerContiner);
const { loadStream } = playOutputStream(resList, playerContainer);

const resp1 = await fetch(resList[0]);
const spr1 = new OffscreenSprite(
Expand All @@ -178,7 +178,7 @@ document.querySelector('#gif-m4a')?.addEventListener('click', () => {
document.querySelector('#mp4-srt')?.addEventListener('click', () => {
(async () => {
const resList = ['./video/webav1.mp4', './subtitles/test-sample.srt'];
const { loadStream } = playOutputStream(resList, playerContiner);
const { loadStream } = playOutputStream(resList, playerContainer);

const resp1 = await fetch(resList[0]);
const spr1 = new OffscreenSprite(new MP4Clip(resp1.body!));
Expand Down Expand Up @@ -214,7 +214,7 @@ document.querySelector('#mp4-srt')?.addEventListener('click', () => {
document.querySelector('#mp4-chromakey')?.addEventListener('click', () => {
(async () => {
const resList = ['./video/chromakey-test.mp4', './img/bunny.png'];
const { loadStream } = playOutputStream(resList, playerContiner);
const { loadStream } = playOutputStream(resList, playerContainer);

const width = 1280;
const height = 720;
Expand Down Expand Up @@ -313,7 +313,7 @@ document.querySelector('#complex')?.addEventListener('click', () => {
return com.output();
});

const { loadStream } = playOutputStream(mp4List, playerContiner);
const { loadStream } = playOutputStream(mp4List, playerContainer);

// then concat multiple videos
await loadStream(await fastConcatMP4(await Promise.all(coms)));
Expand All @@ -324,7 +324,7 @@ document.querySelector('#test-mem-cost')?.addEventListener('click', () => {
(async () => {
{
const resURL = './video/pri-linglong.mp4';
const { loadStream } = playOutputStream([resURL], playerContiner);
const { loadStream } = playOutputStream([resURL], playerContainer);

const spr1 = new OffscreenSprite(
new MP4Clip((await fetch(resURL)).body!),
Expand Down
4 changes: 2 additions & 2 deletions packages/av-cliper/src/clips/mp4-clip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class MP4Clip implements IClip {
this.#videoSamples = videoSamples;
this.#audioSamples = audioSamples;
this.#decoderConf = decoderConf;
const { videoFrameFinder, audioFrameFinder } = genDeocder(
const { videoFrameFinder, audioFrameFinder } = genDecoder(
{
video:
decoderConf.video == null
Expand Down Expand Up @@ -488,7 +488,7 @@ function genMeta(
return meta;
}

function genDeocder(
function genDecoder(
decoderConf: MP4DecoderConf,
localFileReader: LocalFileReader,
videoSamples: ExtMP4Sample[],
Expand Down

0 comments on commit e2f6f20

Please sign in to comment.