summaryrefslogtreecommitdiffstats
path: root/webapp/actions/webrtc_actions.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/actions/webrtc_actions.jsx')
-rw-r--r--webapp/actions/webrtc_actions.jsx16
1 files changed, 16 insertions, 0 deletions
diff --git a/webapp/actions/webrtc_actions.jsx b/webapp/actions/webrtc_actions.jsx
index 444eee241..b096e1c33 100644
--- a/webapp/actions/webrtc_actions.jsx
+++ b/webapp/actions/webrtc_actions.jsx
@@ -4,6 +4,8 @@
import AppDispatcher from 'dispatcher/app_dispatcher.jsx';
import {WebrtcActionTypes} from 'utils/constants.jsx';
+import Client from 'client/web_client.jsx';
+
export function initWebrtc(userId, isCalling) {
AppDispatcher.handleServerAction({
type: WebrtcActionTypes.INITIALIZE,
@@ -18,3 +20,17 @@ export function handle(message) {
message
});
}
+
+export function webrtcToken(success, error) {
+ Client.webrtcToken(
+ (data) => {
+ if (success) {
+ success(data);
+ }
+ },
+ () => {
+ if (error) {
+ error();
+ }
+ });
+}