@@ -15,7 +15,7 @@ import { RTCDataChannel } from '../../../model/webrtc/rtc-data-channel';
1515import { RTCMediaTrack } from '../../../model/webrtc/rtc-media-track' ;
1616
1717import { SelfSizedEditor } from '../../editor/base-editor' ;
18- import { PaneOuterContainer , PaneScrollContainer } from '../view-details-pane' ;
18+ import { PaneScrollContainer } from '../view-details-pane' ;
1919
2020import { RTCConnectionCard } from './rtc-connection-card' ;
2121import { SDPCard } from './sdp-card' ;
@@ -102,71 +102,69 @@ export class RTCConnectionDetailsPane extends React.Component<{
102102 direction : locallyInitiated ? 'left' : 'right'
103103 } as const ;
104104
105- return < PaneOuterContainer >
106- < PaneScrollContainer >
107- < RTCConnectionCard
108- { ...uiStore ! . viewCardProps . rtcConnection }
109- connection = { connection }
110- />
111- < SDPCard
112- { ...offerCardProps }
113- connection = { connection }
114- type = { locallyInitiated ? 'local' : 'remote' }
115- sessionDescription = { offerDescription }
116- editorNode = { offerEditor }
117- />
118- < SDPCard
119- { ...answerCardProps }
120- connection = { connection }
121- type = { locallyInitiated ? 'remote' : 'local' }
122- sessionDescription = { answerDescription }
123- editorNode = { answerEditor }
124- />
125-
126- {
127- this . mediaTracks . map ( ( mediaTrack ) =>
128- < RTCMediaCard
129- // Link the key to the track, to ensure selected-message state gets
130- // reset when we switch between traffic:
131- key = { mediaTrack . id }
132-
133- mediaTrack = { mediaTrack }
134-
135- expanded = { false }
136- collapsed = { ! ! this . streamCardState [ mediaTrack . id ] ?. collapsed }
137- onCollapseToggled = { this . toggleCollapse . bind ( this , mediaTrack . id ) }
138- onExpandToggled = { this . expandStream . bind ( this , mediaTrack . id ) }
139- ariaLabel = 'RTC Media Stream Section'
140- />
141- )
142- }
143-
144- {
145- this . dataChannels . map ( ( dataChannel , i ) =>
146- < RTCDataChannelCard
147- key = { dataChannel . id }
148- dataChannel = { dataChannel }
149- isPaidUser = { accountStore ! . isPaidUser }
150- streamMessageEditor = { this . dataChannelEditors [ i ] }
151-
152- expanded = { false }
153- collapsed = { ! ! this . streamCardState [ dataChannel . id ] ?. collapsed }
154- onCollapseToggled = { this . toggleCollapse . bind ( this , dataChannel . id ) }
155- onExpandToggled = { this . expandStream . bind ( this , dataChannel . id ) }
156- ariaLabel = 'RTC Data Messages Section'
157- />
158- )
159- }
160-
161- { this . dataChannelEditors . map ( ( node , i ) =>
162- < portals . InPortal key = { i } node = { node } >
163- < SelfSizedEditor
164- contentId = { null }
165- />
166- </ portals . InPortal >
167- ) }
168- </ PaneScrollContainer >
169- </ PaneOuterContainer > ;
105+ return < PaneScrollContainer >
106+ < RTCConnectionCard
107+ { ...uiStore ! . viewCardProps . rtcConnection }
108+ connection = { connection }
109+ />
110+ < SDPCard
111+ { ...offerCardProps }
112+ connection = { connection }
113+ type = { locallyInitiated ? 'local' : 'remote' }
114+ sessionDescription = { offerDescription }
115+ editorNode = { offerEditor }
116+ />
117+ < SDPCard
118+ { ...answerCardProps }
119+ connection = { connection }
120+ type = { locallyInitiated ? 'remote' : 'local' }
121+ sessionDescription = { answerDescription }
122+ editorNode = { answerEditor }
123+ />
124+
125+ {
126+ this . mediaTracks . map ( ( mediaTrack ) =>
127+ < RTCMediaCard
128+ // Link the key to the track, to ensure selected-message state gets
129+ // reset when we switch between traffic:
130+ key = { mediaTrack . id }
131+
132+ mediaTrack = { mediaTrack }
133+
134+ expanded = { false }
135+ collapsed = { ! ! this . streamCardState [ mediaTrack . id ] ?. collapsed }
136+ onCollapseToggled = { this . toggleCollapse . bind ( this , mediaTrack . id ) }
137+ onExpandToggled = { this . expandStream . bind ( this , mediaTrack . id ) }
138+ ariaLabel = 'RTC Media Stream Section'
139+ />
140+ )
141+ }
142+
143+ {
144+ this . dataChannels . map ( ( dataChannel , i ) =>
145+ < RTCDataChannelCard
146+ key = { dataChannel . id }
147+ dataChannel = { dataChannel }
148+ isPaidUser = { accountStore ! . isPaidUser }
149+ streamMessageEditor = { this . dataChannelEditors [ i ] }
150+
151+ expanded = { false }
152+ collapsed = { ! ! this . streamCardState [ dataChannel . id ] ?. collapsed }
153+ onCollapseToggled = { this . toggleCollapse . bind ( this , dataChannel . id ) }
154+ onExpandToggled = { this . expandStream . bind ( this , dataChannel . id ) }
155+ ariaLabel = 'RTC Data Messages Section'
156+ />
157+ )
158+ }
159+
160+ { this . dataChannelEditors . map ( ( node , i ) =>
161+ < portals . InPortal key = { i } node = { node } >
162+ < SelfSizedEditor
163+ contentId = { null }
164+ />
165+ </ portals . InPortal >
166+ ) }
167+ </ PaneScrollContainer > ;
170168 }
171169
172170}
0 commit comments