aboutsummaryrefslogtreecommitdiff
path: root/server/events.js
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2023-08-25 22:42:52 +0200
committerRuben Beltran del Rio <ruben@unlimited.pizza>2023-08-25 22:42:52 +0200
commit80172072ed99b14e3d5b435b097888a4621f78bc (patch)
tree2f68a26d96ec2d7d659ed6672a6127979877c4e6 /server/events.js
parenteadfca7b00e2fb48ffd6b2a0e06c2b6d7e427679 (diff)
Update dependencies
Diffstat (limited to 'server/events.js')
-rw-r--r--server/events.js30
1 files changed, 12 insertions, 18 deletions
diff --git a/server/events.js b/server/events.js
index 062b7c1..99e6b37 100644
--- a/server/events.js
+++ b/server/events.js
@@ -1,41 +1,35 @@
-function addPeer(peerId, shouldCreateOffer) {
+export function addPeer(peerId, shouldCreateOffer) {
return {
peer_id: peerId,
should_create_offer: shouldCreateOffer,
}
}
-function removePeer(peerId) {
+export function removePeer(peerId) {
return {
peer_id: peerId,
}
}
-function SessionDescriptionReceived(peerId, sessionDescription) {
+export function SessionDescriptionReceived(peerId, sessionDescription) {
return {
peer_id: peerId,
session_description: sessionDescription,
}
}
-function ICECandidateReceived(peerId, ICECandidate) {
+export function ICECandidateReceived(peerId, ICECandidate) {
return {
peer_id: peerId,
ice_candidate: ICECandidate,
}
}
-module.exports = {
- types: {
- ADD_PEER: 'addPeer',
- REMOVE_PEER: 'removePeer',
- RELAY_SESSION_DESCRIPTION: 'relaySessionDescription',
- RELAY_ICE_CANDIDATE: 'relayICECandidate',
- ICE_CANDIDATE_RECEIVED: 'ICECandidateReceived',
- SESSION_DESCRIPTION_RECEIVED: 'SessionDescriptionReceived',
- },
- addPeer,
- removePeer,
- SessionDescriptionReceived: SessionDescriptionReceived,
- ICECandidateReceived: ICECandidateReceived,
-} \ No newline at end of file
+export const types = {
+ ADD_PEER: 'addPeer',
+ REMOVE_PEER: 'removePeer',
+ RELAY_SESSION_DESCRIPTION: 'relaySessionDescription',
+ RELAY_ICE_CANDIDATE: 'relayICECandidate',
+ ICE_CANDIDATE_RECEIVED: 'ICECandidateReceived',
+ SESSION_DESCRIPTION_RECEIVED: 'SessionDescriptionReceived',
+};