@@ -11,7 +11,7 @@ import HeaderNavigationButton
11
11
from '../../../../mobile/navigation/components/HeaderNavigationButton' ;
12
12
import { goBack }
13
13
from '../../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef' ;
14
- import { setLiveStreamKey } from '../../../actions' ;
14
+ import { setLiveStreamBaseURL , setLiveStreamKey } from '../../../actions' ;
15
15
import AbstractStartLiveStreamDialog , { IProps , _mapStateToProps } from '../AbstractStartLiveStreamDialog' ;
16
16
17
17
import GoogleSigninForm from './GoogleSigninForm' ;
@@ -34,6 +34,7 @@ class StartLiveStreamDialog extends AbstractStartLiveStreamDialog<IProps> {
34
34
35
35
// Bind event handlers so they are only bound once per instance.
36
36
this . _onStartPress = this . _onStartPress . bind ( this ) ;
37
+ this . _onStreamBaseURLChange = this . _onStreamBaseURLChangeNative . bind ( this ) ;
37
38
this . _onStreamKeyChangeNative
38
39
= this . _onStreamKeyChangeNative . bind ( this ) ;
39
40
this . _onStreamKeyPick = this . _onStreamKeyPick . bind ( this ) ;
@@ -83,7 +84,7 @@ class StartLiveStreamDialog extends AbstractStartLiveStreamDialog<IProps> {
83
84
broadcasts = { this . state . broadcasts }
84
85
onChange = { this . _onStreamKeyPick } />
85
86
< StreamKeyForm
86
- onStreamBaseURLChange = { this . _onStreamBaseURLChange }
87
+ onStreamBaseURLChange = { this . _onStreamBaseURLChangeNative }
87
88
onStreamKeyChange = { this . _onStreamKeyChangeNative }
88
89
streamBaseURLValue = { this . state . streamBaseURL || this . props . _streamBaseURL || '' }
89
90
streamKeyValue = { this . state . streamKey || this . props . _streamKey || '' } />
@@ -108,6 +109,18 @@ class StartLiveStreamDialog extends AbstractStartLiveStreamDialog<IProps> {
108
109
this . _onStreamKeyChange ( streamKey ) ;
109
110
}
110
111
112
+ /**
113
+ * Callback to handle stream base URL changes.
114
+ *
115
+ * @private
116
+ * @param {string } streamBaseURL - The new key value.
117
+ * @returns {void }
118
+ */
119
+ _onStreamBaseURLChangeNative ( streamBaseURL : string ) {
120
+ this . props . dispatch ( setLiveStreamBaseURL ( streamBaseURL ) ) ;
121
+ this . _onStreamBaseURLChange ( streamBaseURL ) ;
122
+ }
123
+
111
124
/**
112
125
* Callback to be invoked when the user selects a stream from the picker.
113
126
*
@@ -145,12 +158,14 @@ class StartLiveStreamDialog extends AbstractStartLiveStreamDialog<IProps> {
145
158
. catch ( ( ) => {
146
159
this . setState ( {
147
160
broadcasts : undefined ,
161
+ streamBaseURL : undefined ,
148
162
streamKey : undefined
149
163
} ) ;
150
164
} ) ;
151
165
} else {
152
166
this . setState ( {
153
167
broadcasts : undefined ,
168
+ streamBaseURL : undefined ,
154
169
streamKey : undefined
155
170
} ) ;
156
171
}
0 commit comments