Skip to content

Commit

Permalink
Merge pull request #488 from shiguredo/feature/type-offer-session-id
Browse files Browse the repository at this point in the history
type: offer で取得したセッション ID を表示できるようにする
  • Loading branch information
tnamao authored Dec 7, 2023
2 parents 4953527 + e513ae1 commit a6f7e43
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
4 changes: 3 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,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 @@ -59,7 +61,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

0 comments on commit a6f7e43

Please sign in to comment.