-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCineActionCreators.coffee
73 lines (59 loc) · 1.82 KB
/
CineActionCreators.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
AppDispatcher = require('../dispatcher/AppDispatcher');
MainConstants = require('../constants/MainConstants');
# ChatWebAPIUtils = require('../utils/ChatWebAPIUtils');
# MessageStore = require('../stores/MessageStore');
ActionTypes = MainConstants.ActionTypes;
module.exports =
localWebcamStarted: (video)->
AppDispatcher.handleCineAction
type: ActionTypes.LOCAL_WEBCAM_STARTED
video: video
localWebcamRemoved: (video)->
AppDispatcher.handleCineAction
type: ActionTypes.LOCAL_WEBCAM_REMOVED
video: video
localScreenShareStarted: (video)->
AppDispatcher.handleCineAction
type: ActionTypes.LOCAL_SCREEN_SHARE_STARTED
video: video
localScreenShareRemoved: (video)->
AppDispatcher.handleCineAction
type: ActionTypes.LOCAL_SCREEN_SHARE_REMOVED
video: video
showInstallExtension: (url, type)->
AppDispatcher.handleCineAction
type: ActionTypes.INSTALL_EXTENSION
url: url
extensionType: type
newPeer: (video)->
AppDispatcher.handleCineAction
type: ActionTypes.NEW_PEER
video: video
newCall: (call)->
AppDispatcher.handleCineAction
type: ActionTypes.INCOMING_CALL
call: call
currentCall: (call)->
AppDispatcher.handleCineAction
type: ActionTypes.OUTGOING_CALL
call: call
callCancelled: (call)->
AppDispatcher.handleCineAction
type: ActionTypes.CALL_CANCELED
call: call
callRejected: (call)->
AppDispatcher.handleCineAction
type: ActionTypes.CALL_REJECTED
call: call
peerLeft: (video)->
AppDispatcher.handleCineAction
type: ActionTypes.PEER_LEFT
video: video
gotPeerData: (data)->
if data.type == 'message'
AppDispatcher.handleCineAction
type: ActionTypes.NEW_MESSAGE
message: data
# useless else
else
return