]>
git.r.bdr.sh - rbdr/junction/blob - extension/peers.js
6 createAudioElement(source
) {
8 const audioElement
= document
.createElement('audio');
9 audioElement
.setAttribute('class', 'junction-call-audio');
10 audioElement
.src
= source
;
11 audioElement
.autoplay
= 'autoplay';
12 document
.querySelector('body').appendChild(audioElement
);
21 internals
.peers
[id
] && this.remove(id
);
22 internals
.peers
[id
] = internals
.createAudioElement(url
)
27 internals
.peers
[id
] && internals
.peers
[id
].remove();
28 delete internals
.peers
[id
];
33 return Object
.keys(internals
.peers
).length
;
39 document
.querySelectorAll('.junction-call-audio').forEach((audioElement
) => audioElement
.remove());