]>
Commit | Line | Data |
---|---|---|
80172072 | 1 | export function addPeer(peerId, shouldCreateOffer) { |
284fc661 RBR |
2 | return { |
3 | peerId, | |
4 | shouldCreateOffer, | |
5 | } | |
ed9f8fd5 | 6 | } |
7 | ||
80172072 | 8 | export function removePeer(peerId) { |
ed9f8fd5 | 9 | return { |
284fc661 | 10 | peerId, |
ed9f8fd5 | 11 | } |
12 | } | |
13 | ||
80172072 | 14 | export function SessionDescriptionReceived(peerId, sessionDescription) { |
ed9f8fd5 | 15 | return { |
284fc661 RBR |
16 | peerId, |
17 | sessionDescription, | |
18 | } | |
19 | } | |
20 | ||
21 | export function ICECandidateReceived(peerId, candidate) { | |
22 | return { | |
23 | peerId, | |
24 | candidate | |
25 | } | |
26 | } | |
27 | ||
28 | export function offerReceived(peerId, offer) { | |
29 | return { | |
30 | peerId, | |
31 | offer | |
ed9f8fd5 | 32 | } |
33 | } | |
34 | ||
284fc661 | 35 | export function answerReceived(peerId, answer) { |
ed9f8fd5 | 36 | return { |
284fc661 RBR |
37 | peerId, |
38 | answer | |
ed9f8fd5 | 39 | } |
40 | } | |
41 | ||
80172072 RBR |
42 | export const types = { |
43 | ADD_PEER: 'addPeer', | |
44 | REMOVE_PEER: 'removePeer', | |
45 | RELAY_SESSION_DESCRIPTION: 'relaySessionDescription', | |
46 | RELAY_ICE_CANDIDATE: 'relayICECandidate', | |
284fc661 RBR |
47 | OFFER_RECEIVED: 'offerReceived', |
48 | ANSWER_RECEIVED: 'answerReceived', | |
80172072 RBR |
49 | ICE_CANDIDATE_RECEIVED: 'ICECandidateReceived', |
50 | SESSION_DESCRIPTION_RECEIVED: 'SessionDescriptionReceived', | |
51 | }; |