]>
Commit | Line | Data |
---|---|---|
80172072 | 1 | export function addPeer(peerId, shouldCreateOffer) { |
ed9f8fd5 | 2 | return { |
3 | peer_id: peerId, | |
4 | should_create_offer: shouldCreateOffer, | |
5 | } | |
6 | } | |
7 | ||
80172072 | 8 | export function removePeer(peerId) { |
ed9f8fd5 | 9 | return { |
10 | peer_id: peerId, | |
11 | } | |
12 | } | |
13 | ||
80172072 | 14 | export function SessionDescriptionReceived(peerId, sessionDescription) { |
ed9f8fd5 | 15 | return { |
16 | peer_id: peerId, | |
17 | session_description: sessionDescription, | |
18 | } | |
19 | } | |
20 | ||
80172072 | 21 | export function ICECandidateReceived(peerId, ICECandidate) { |
ed9f8fd5 | 22 | return { |
23 | peer_id: peerId, | |
24 | ice_candidate: ICECandidate, | |
25 | } | |
26 | } | |
27 | ||
80172072 RBR |
28 | export const types = { |
29 | ADD_PEER: 'addPeer', | |
30 | REMOVE_PEER: 'removePeer', | |
31 | RELAY_SESSION_DESCRIPTION: 'relaySessionDescription', | |
32 | RELAY_ICE_CANDIDATE: 'relayICECandidate', | |
33 | ICE_CANDIDATE_RECEIVED: 'ICECandidateReceived', | |
34 | SESSION_DESCRIPTION_RECEIVED: 'SessionDescriptionReceived', | |
35 | }; |