|
|
@@ -11,6 +11,7 @@ import { StyleType } from '../../../../base/styles';
|
|
11
|
11
|
import AbstractStreamKeyForm, {
|
|
12
|
12
|
type Props as AbstractProps
|
|
13
|
13
|
} from '../AbstractStreamKeyForm';
|
|
|
14
|
+import { GOOGLE_PRIVACY_POLICY, YOUTUBE_TERMS_URL } from '../constants';
|
|
14
|
15
|
|
|
15
|
16
|
type Props = AbstractProps & {
|
|
16
|
17
|
|
|
|
@@ -38,7 +39,10 @@ class StreamKeyForm extends AbstractStreamKeyForm<Props> {
|
|
38
|
39
|
super(props);
|
|
39
|
40
|
|
|
40
|
41
|
// Bind event handlers so they are only bound once per instance.
|
|
|
42
|
+ this._onOpenGooglePrivacyPolicy = this._onOpenGooglePrivacyPolicy.bind(this);
|
|
41
|
43
|
this._onOpenHelp = this._onOpenHelp.bind(this);
|
|
|
44
|
+ this._onOpenYoutubeTerms = this._onOpenYoutubeTerms.bind(this);
|
|
|
45
|
+
|
|
42
|
46
|
}
|
|
43
|
47
|
|
|
44
|
48
|
/**
|
|
|
@@ -101,12 +105,52 @@ class StreamKeyForm extends AbstractStreamKeyForm<Props> {
|
|
101
|
105
|
</TouchableOpacity>
|
|
102
|
106
|
</View>
|
|
103
|
107
|
</View>
|
|
|
108
|
+ <View>
|
|
|
109
|
+ <TouchableOpacity onPress = { this._onOpenYoutubeTerms }>
|
|
|
110
|
+ <Text
|
|
|
111
|
+ style = { [
|
|
|
112
|
+ _dialogStyles.text,
|
|
|
113
|
+ styles.text,
|
|
|
114
|
+ styles.tcText
|
|
|
115
|
+ ] }>
|
|
|
116
|
+ {
|
|
|
117
|
+ t('liveStreaming.youtubeTerms')
|
|
|
118
|
+ }
|
|
|
119
|
+ </Text>
|
|
|
120
|
+ </TouchableOpacity>
|
|
|
121
|
+ </View>
|
|
|
122
|
+ <View>
|
|
|
123
|
+ <TouchableOpacity onPress = { this._onOpenGooglePrivacyPolicy }>
|
|
|
124
|
+ <Text
|
|
|
125
|
+ style = { [
|
|
|
126
|
+ _dialogStyles.text,
|
|
|
127
|
+ styles.text,
|
|
|
128
|
+ styles.tcText
|
|
|
129
|
+ ] }>
|
|
|
130
|
+ {
|
|
|
131
|
+ t('liveStreaming.googlePrivacyPolicy')
|
|
|
132
|
+ }
|
|
|
133
|
+ </Text>
|
|
|
134
|
+ </TouchableOpacity>
|
|
|
135
|
+ </View>
|
|
104
|
136
|
</View>
|
|
105
|
137
|
);
|
|
106
|
138
|
}
|
|
107
|
139
|
|
|
108
|
140
|
_onInputChange: Object => void
|
|
109
|
141
|
|
|
|
142
|
+ _onOpenGooglePrivacyPolicy: () => void;
|
|
|
143
|
+
|
|
|
144
|
+ /**
|
|
|
145
|
+ * Opens the Google Privacy Policy web page.
|
|
|
146
|
+ *
|
|
|
147
|
+ * @private
|
|
|
148
|
+ * @returns {void}
|
|
|
149
|
+ */
|
|
|
150
|
+ _onOpenGooglePrivacyPolicy() {
|
|
|
151
|
+ Linking.openURL(GOOGLE_PRIVACY_POLICY);
|
|
|
152
|
+ }
|
|
|
153
|
+
|
|
110
|
154
|
_onOpenHelp: () => void
|
|
111
|
155
|
|
|
112
|
156
|
/**
|
|
|
@@ -123,6 +167,18 @@ class StreamKeyForm extends AbstractStreamKeyForm<Props> {
|
|
123
|
167
|
Linking.openURL(helpURL);
|
|
124
|
168
|
}
|
|
125
|
169
|
}
|
|
|
170
|
+
|
|
|
171
|
+ _onOpenYoutubeTerms: () => void;
|
|
|
172
|
+
|
|
|
173
|
+ /**
|
|
|
174
|
+ * Opens the YouTube terms and conditions web page.
|
|
|
175
|
+ *
|
|
|
176
|
+ * @private
|
|
|
177
|
+ * @returns {void}
|
|
|
178
|
+ */
|
|
|
179
|
+ _onOpenYoutubeTerms() {
|
|
|
180
|
+ Linking.openURL(YOUTUBE_TERMS_URL);
|
|
|
181
|
+ }
|
|
126
|
182
|
}
|
|
127
|
183
|
|
|
128
|
184
|
export default translate(connect(_abstractMapStateToProps)(StreamKeyForm));
|