|
@@ -435,16 +435,20 @@ export function _mapDispatchToProps(dispatch: Dispatch<any>) {
|
435
|
435
|
*/
|
436
|
436
|
export function _mapStateToProps(state: Object, ownProps: Props) {
|
437
|
437
|
|
438
|
|
- const firstVideoTrack = getTrackByMediaTypeAndParticipant(
|
439
|
|
- state['features/base/tracks'], MEDIA_TYPE.VIDEO, ownProps.participantId);
|
440
|
|
- const firstAudioTrack = getTrackByMediaTypeAndParticipant(
|
441
|
|
- state['features/base/tracks'], MEDIA_TYPE.AUDIO, ownProps.participantId);
|
|
438
|
+ const conference = state['features/base/conference'].conference;
|
442
|
439
|
|
443
|
|
- return {
|
444
|
|
- audioSsrc: firstAudioTrack
|
445
|
|
- ? state['features/base/conference'].conference.getSsrcByTrack(firstAudioTrack.jitsiTrack) : undefined,
|
446
|
|
- videoSsrc: firstVideoTrack
|
447
|
|
- ? state['features/base/conference'].conference.getSsrcByTrack(firstVideoTrack.jitsiTrack) : undefined
|
448
|
|
- };
|
|
440
|
+ if (conference) {
|
|
441
|
+ const firstVideoTrack = getTrackByMediaTypeAndParticipant(
|
|
442
|
+ state['features/base/tracks'], MEDIA_TYPE.VIDEO, ownProps.participantId);
|
|
443
|
+ const firstAudioTrack = getTrackByMediaTypeAndParticipant(
|
|
444
|
+ state['features/base/tracks'], MEDIA_TYPE.AUDIO, ownProps.participantId);
|
|
445
|
+
|
|
446
|
+ return {
|
|
447
|
+ audioSsrc: firstAudioTrack ? conference.getSsrcByTrack(firstAudioTrack.jitsiTrack) : undefined,
|
|
448
|
+ videoSsrc: firstVideoTrack ? conference.getSsrcByTrack(firstVideoTrack.jitsiTrack) : undefined
|
|
449
|
+ };
|
|
450
|
+ }
|
|
451
|
+
|
|
452
|
+ return {};
|
449
|
453
|
}
|
450
|
454
|
export default translate(connect(_mapStateToProps, _mapDispatchToProps)(ConnectionIndicator));
|