mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-06-30 05:31:07 +02:00
Parse JSON from server SDP
This commit is contained in:
@ -55,9 +55,9 @@ export class GsWebSocket {
|
||||
*/
|
||||
onDescription(callback) {
|
||||
this.socket.addEventListener("message", (event) => {
|
||||
// FIXME: json to session description
|
||||
console.log("Message from server ", event.data);
|
||||
callback(event.data);
|
||||
const sdp = new RTCSessionDescription(JSON.parse(event.data));
|
||||
callback(sdp);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user