From 8c78a5f76daca0619c9faa3e4da485cf025fcf8b Mon Sep 17 00:00:00 2001 From: Takeru Ohta Date: Mon, 28 Oct 2024 11:26:54 +0900 Subject: [PATCH 1/7] Update mp4-media-stream version to 2024.1.1 --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 281c26ee..a8fbcce5 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "dependencies": { "@reduxjs/toolkit": "2.3.0", "@shiguredo/light-adjustment": "2024.1.0", - "@shiguredo/mp4-media-stream": "2024.1.0", + "@shiguredo/mp4-media-stream": "2024.1.1", "@shiguredo/noise-suppression": "2022.4.2", "@shiguredo/virtual-background": "2023.2.0", "bootstrap": "5.3.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f0593609..af53b165 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,8 +15,8 @@ importers: specifier: 2024.1.0 version: 2024.1.0 '@shiguredo/mp4-media-stream': - specifier: 2024.1.0 - version: 2024.1.0 + specifier: 2024.1.1 + version: 2024.1.1 '@shiguredo/noise-suppression': specifier: 2022.4.2 version: 2022.4.2 @@ -678,8 +678,8 @@ packages: '@shiguredo/light-adjustment@2024.1.0': resolution: {integrity: sha512-s1kRIoC9RxLrymkz8YQiHo1ngUmzcMff8hVXgYGXeo5U4HUgToBJWbpT5JrITXZGSmAihRpMGk74YrlIcgHrow==} - '@shiguredo/mp4-media-stream@2024.1.0': - resolution: {integrity: sha512-A0nZwzpvzP+yv8TdQDOWf4JTizRMrAQ7WV98Rp/VTEYrhvNtFmh3iHrBVI3hS7FsQguJIp6nXzN8vh1SMoBEGA==} + '@shiguredo/mp4-media-stream@2024.1.1': + resolution: {integrity: sha512-kLdU0E39C9gF1p7S8xKOb2pqJIP3TaSRNyMKjw+X/+xNZsGL6CJ7DydRq/vGmwldRr/sG3s/c4NSzp3u/u8TcA==} '@shiguredo/noise-suppression@2022.4.2': resolution: {integrity: sha512-cgNgDcqiamc2VDpWYVjZXEIGwEio51QvKcdipf452gTESie1PR6rqZaKVwHxuABgsudKGq/1FrBlui9KCdFAtg==} @@ -1907,7 +1907,7 @@ snapshots: '@shiguredo/light-adjustment@2024.1.0': {} - '@shiguredo/mp4-media-stream@2024.1.0': {} + '@shiguredo/mp4-media-stream@2024.1.1': {} '@shiguredo/noise-suppression@2022.4.2': dependencies: From 360c3fff723165a89d2e3928b1962c02bf8c138b Mon Sep 17 00:00:00 2001 From: Takeru Ohta Date: Mon, 28 Oct 2024 12:00:20 +0900 Subject: [PATCH 2/7] Update mp4-media-stream version to 2024.1.2 --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index a8fbcce5..5100cbd2 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "dependencies": { "@reduxjs/toolkit": "2.3.0", "@shiguredo/light-adjustment": "2024.1.0", - "@shiguredo/mp4-media-stream": "2024.1.1", + "@shiguredo/mp4-media-stream": "2024.1.2", "@shiguredo/noise-suppression": "2022.4.2", "@shiguredo/virtual-background": "2023.2.0", "bootstrap": "5.3.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index af53b165..28d395e5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,8 +15,8 @@ importers: specifier: 2024.1.0 version: 2024.1.0 '@shiguredo/mp4-media-stream': - specifier: 2024.1.1 - version: 2024.1.1 + specifier: 2024.1.2 + version: 2024.1.2 '@shiguredo/noise-suppression': specifier: 2022.4.2 version: 2022.4.2 @@ -678,8 +678,8 @@ packages: '@shiguredo/light-adjustment@2024.1.0': resolution: {integrity: sha512-s1kRIoC9RxLrymkz8YQiHo1ngUmzcMff8hVXgYGXeo5U4HUgToBJWbpT5JrITXZGSmAihRpMGk74YrlIcgHrow==} - '@shiguredo/mp4-media-stream@2024.1.1': - resolution: {integrity: sha512-kLdU0E39C9gF1p7S8xKOb2pqJIP3TaSRNyMKjw+X/+xNZsGL6CJ7DydRq/vGmwldRr/sG3s/c4NSzp3u/u8TcA==} + '@shiguredo/mp4-media-stream@2024.1.2': + resolution: {integrity: sha512-xL4MB3lpsnC5Yv/3e58dzJ0PHOdasWUONg2B33988UCCoNUnKA9Ph28Sm4day53WkdDy8xadfyxPwqTyyQAUZg==} '@shiguredo/noise-suppression@2022.4.2': resolution: {integrity: sha512-cgNgDcqiamc2VDpWYVjZXEIGwEio51QvKcdipf452gTESie1PR6rqZaKVwHxuABgsudKGq/1FrBlui9KCdFAtg==} @@ -1907,7 +1907,7 @@ snapshots: '@shiguredo/light-adjustment@2024.1.0': {} - '@shiguredo/mp4-media-stream@2024.1.1': {} + '@shiguredo/mp4-media-stream@2024.1.2': {} '@shiguredo/noise-suppression@2022.4.2': dependencies: From fb94c5eb0a7379d2eb08f8357dc1030c7e0827cc Mon Sep 17 00:00:00 2001 From: Takeru Ohta Date: Mon, 28 Oct 2024 12:51:17 +0900 Subject: [PATCH 3/7] =?UTF-8?q?mp4Media=20=E4=BD=BF=E7=94=A8=E6=99=82?= =?UTF-8?q?=E3=81=AB=E3=80=81MP4=20=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=81=8C=E6=9C=AA=E9=81=B8=E6=8A=9E=E3=81=AA=E3=82=89=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/actions.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/actions.ts b/src/app/actions.ts index 46e6c898..638b2862 100644 --- a/src/app/actions.ts +++ b/src/app/actions.ts @@ -671,7 +671,11 @@ async function createMediaStream( ) return [mediaStream, gainNode] } - if (state.mediaType === 'mp4Media' && state.mp4MediaStream !== null) { + if (state.mediaType === 'mp4Media') { + if (state.mp4MediaStream === null) { + throw new Error('No MP4 file has been selected') + } + // 指定の MP4 を再生するための MediaStream を返す // DevTools ではいったん常に繰り返し再生にしておく return [state.mp4MediaStream.play({ repeat: true }), null] From ebc1e90319f50e73ab3558a7d777c4bc4684b0d1 Mon Sep 17 00:00:00 2001 From: Takeru Ohta Date: Mon, 28 Oct 2024 14:04:22 +0900 Subject: [PATCH 4/7] Update CHANGES.md --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 15e550f4..0c9605e0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -18,6 +18,8 @@ - Chrome / Edge のみで利用可能 - B フレームを含んだ H.264 は正常に再生できない - @sile +- [ADD] @shiguredo/mp4-media-stream (2024.1.2) を依存パッケージに追加する + - @sile - [CHANGE] audioBitRate と videoBitRate を自由に設定できるようにする - 自由入力にし、選択肢以外のビットレートでも Sora の接続パラメータとして使用できるようにする - @tnamao From 09ca73f5f976762bc0b48d14abce3151d807c316 Mon Sep 17 00:00:00 2001 From: Takeru Ohta Date: Mon, 28 Oct 2024 14:19:23 +0900 Subject: [PATCH 5/7] =?UTF-8?q?MP4=20=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=81=AE=E3=83=AD=E3=83=BC=E3=83=89=E3=81=AB=E5=A4=B1=E6=95=97?= =?UTF-8?q?=E3=81=97=E3=81=9F=E5=A0=B4=E5=90=88=E3=81=AE=E3=83=8F=E3=83=B3?= =?UTF-8?q?=E3=83=89=E3=83=AA=E3=83=B3=E3=82=B0=E3=82=92=E3=81=A1=E3=82=83?= =?UTF-8?q?=E3=82=93=E3=81=A8=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/slice.ts | 2 +- src/components/DevtoolsPane/Mp4FileForm.tsx | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/app/slice.ts b/src/app/slice.ts index df72b966..520dc028 100644 --- a/src/app/slice.ts +++ b/src/app/slice.ts @@ -289,7 +289,7 @@ export const slice = createSlice({ setMediaStats: (state, action: PayloadAction) => { state.mediaStats = action.payload }, - setMp4MediaStream: (state, action: PayloadAction) => { + setMp4MediaStream: (state, action: PayloadAction) => { state.mp4MediaStream = action.payload }, setNoiseSuppression: (state, action: PayloadAction) => { diff --git a/src/components/DevtoolsPane/Mp4FileForm.tsx b/src/components/DevtoolsPane/Mp4FileForm.tsx index aa53b7eb..e51ef435 100644 --- a/src/components/DevtoolsPane/Mp4FileForm.tsx +++ b/src/components/DevtoolsPane/Mp4FileForm.tsx @@ -20,8 +20,19 @@ export const Mp4FileForm: React.FC = () => { if (files === null || files.length === 0) { return } - const mp4MediaStream = await Mp4MediaStream.load(files[0]) - dispatch(setMp4MediaStream(mp4MediaStream)) + + // 以前の内容が残っていた場合に備えて事前に null を入れておく + dispatch(setMp4MediaStream(null)) + + // MP4 ファイルをロードする + try { + const mp4MediaStream = await Mp4MediaStream.load(files[0]) + dispatch(setMp4MediaStream(mp4MediaStream)) + } catch (e) { + // ロードに失敗したらファイル選択をクリアする + event.target.value = "" + throw e + } } if (mediaType !== 'mp4Media') { return null From 7578a03bb91d55b9a9730d4004fbf2c73c648c08 Mon Sep 17 00:00:00 2001 From: Takeru Ohta Date: Mon, 28 Oct 2024 14:53:29 +0900 Subject: [PATCH 6/7] =?UTF-8?q?state.mp4MediaStream=20=E3=81=AB=20null=20?= =?UTF-8?q?=E3=82=92=E8=A8=AD=E5=AE=9A=E3=81=99=E3=82=8B=E3=82=BF=E3=82=A4?= =?UTF-8?q?=E3=83=9F=E3=83=B3=E3=82=B0=E3=81=AE=E8=A6=8B=E7=9B=B4=E3=81=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DevtoolsPane/Mp4FileForm.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/DevtoolsPane/Mp4FileForm.tsx b/src/components/DevtoolsPane/Mp4FileForm.tsx index e51ef435..fc21c4ed 100644 --- a/src/components/DevtoolsPane/Mp4FileForm.tsx +++ b/src/components/DevtoolsPane/Mp4FileForm.tsx @@ -21,16 +21,17 @@ export const Mp4FileForm: React.FC = () => { return } - // 以前の内容が残っていた場合に備えて事前に null を入れておく - dispatch(setMp4MediaStream(null)) - // MP4 ファイルをロードする try { const mp4MediaStream = await Mp4MediaStream.load(files[0]) dispatch(setMp4MediaStream(mp4MediaStream)) } catch (e) { // ロードに失敗したらファイル選択をクリアする - event.target.value = "" + event.target.value = '' + + // 以前の内容が残っていた場合に備えて null を入れておく + dispatch(setMp4MediaStream(null)) + throw e } } From 43f26658e8570f920b540cc0e014c8e8963d9e19 Mon Sep 17 00:00:00 2001 From: Takeru Ohta Date: Mon, 28 Oct 2024 15:54:28 +0900 Subject: [PATCH 7/7] =?UTF-8?q?MP4=20=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E9=81=B8=E6=8A=9E=E3=83=95=E3=82=A9=E3=83=BC=E3=83=A0=E3=81=AB?= =?UTF-8?q?=20accept=3D"video/mp4"=20=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DevtoolsPane/Mp4FileForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/DevtoolsPane/Mp4FileForm.tsx b/src/components/DevtoolsPane/Mp4FileForm.tsx index fc21c4ed..0ca86de5 100644 --- a/src/components/DevtoolsPane/Mp4FileForm.tsx +++ b/src/components/DevtoolsPane/Mp4FileForm.tsx @@ -41,7 +41,7 @@ export const Mp4FileForm: React.FC = () => { return ( mp4File: - + ) }