- this.socket = io(socketUrl);
-
- var that = this;
-
- this.socket.on('connect', function() {
- console.log("Connected to signaling server");
-
- that.socket.emit('join', {
- 'url': currentUrl,
- });
- });
-
- this.socket.on('disconnect', function() {
- console.log("disconnected from signaling server");
+ internals.port = port;
+ port.onDisconnect.addListener(internals.onDisconnect);
+ port.onMessage.addListener(internals.onMessage);
+ port.postMessage({
+ action: 'joinAudioCall',
+ data: {
+ tada: internals.getRoot().runtime.getURL('sounds/tada.wav')
+ }