Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type: offer で取得したセッション ID を表示できるようにする #488

Merged
merged 3 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
- [ADD] コネクション ID とクライアント ID の表示にラベルを追加する
- @tnamao
- [ADD] Sora 接続後にセッション ID の表示を追加する
- Sora 2023.2.0 以降は sora-js-sdk が `type: offer` から取得したセッション ID を表示に使用する
- それ以外の場合は notify の `connection.created` イベントで取得したセッション ID を表示に使用する
- @tnamao
- [FIX] `audio` `video` がともに無効な状態で Sora への接続時に getUserMedia を呼び出してしまう問題を修正する
- @tnamao
Expand Down Expand Up @@ -57,7 +59,7 @@
- @voluntas
- [CHANGE] 一時的に ; ありにする
- @voluntas
- [UPDATE] sora-js-sdk のバージョンを 2023.2.0-canary.14 に上げる
- [UPDATE] sora-js-sdk のバージョンを 2023.2.0-canary.15 に上げる
- @voluntas
- [UPDATE] @shiguredo/virtual-background のバージョンを 2023.2.0 に上げる
- @sile
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"redux": "4.2.1",
"redux-logger": "3.0.6",
"redux-thunk": "2.4.2",
"sora-js-sdk": "2023.2.0-canary.14"
"sora-js-sdk": "2023.2.0-canary.15"
},
"devDependencies": {
"@biomejs/biome": "1.4.1",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/app/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,6 @@ function setSoraCallbacks(
fakeContents.worker.postMessage({ type: 'stop' })
}
dispatch(slice.actions.setSora(null))
dispatch(slice.actions.setSoraSessionId(null))
dispatch(slice.actions.setSoraConnectionStatus('disconnected'))
dispatch(slice.actions.setLocalMediaStream(null))
dispatch(slice.actions.removeAllRemoteMediaStreams())
Expand Down
10 changes: 8 additions & 2 deletions src/app/slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,14 +371,20 @@ export const slice = createSlice({
if (state.soraContents.sora) {
state.soraContents.connectionId = state.soraContents.sora.connectionId
state.soraContents.clientId = state.soraContents.sora.clientId
if (state.soraContents.sessionId === null) {
state.soraContents.sessionId = state.soraContents.sora.sessionId
}
} else {
state.soraContents.connectionId = null
state.soraContents.clientId = null
state.soraContents.sessionId = null
state.soraContents.datachannels = []
}
},
setSoraSessionId: (state, action: PayloadAction<string | null>) => {
state.soraContents.sessionId = action.payload
setSoraSessionId: (state, action: PayloadAction<string>) => {
if (state.soraContents.sessionId === null) {
state.soraContents.sessionId = action.payload
}
},
setSoraConnectionStatus: (
state,
Expand Down