export function addPeer(peerId, shouldCreateOffer) {
- return {
- peer_id: peerId,
- should_create_offer: shouldCreateOffer,
- }
+ return {
+ peerId,
+ shouldCreateOffer,
+ }
}
export function removePeer(peerId) {
return {
- peer_id: peerId,
+ peerId,
}
}
export function SessionDescriptionReceived(peerId, sessionDescription) {
return {
- peer_id: peerId,
- session_description: sessionDescription,
+ peerId,
+ sessionDescription,
+ }
+}
+
+export function ICECandidateReceived(peerId, candidate) {
+ return {
+ peerId,
+ candidate
+ }
+}
+
+export function offerReceived(peerId, offer) {
+ return {
+ peerId,
+ offer
}
}
-export function ICECandidateReceived(peerId, ICECandidate) {
+export function answerReceived(peerId, answer) {
return {
- peer_id: peerId,
- ice_candidate: ICECandidate,
+ peerId,
+ answer
}
}
REMOVE_PEER: 'removePeer',
RELAY_SESSION_DESCRIPTION: 'relaySessionDescription',
RELAY_ICE_CANDIDATE: 'relayICECandidate',
+ OFFER_RECEIVED: 'offerReceived',
+ ANSWER_RECEIVED: 'answerReceived',
ICE_CANDIDATE_RECEIVED: 'ICECandidateReceived',
SESSION_DESCRIPTION_RECEIVED: 'SessionDescriptionReceived',
};