Skip to content
Snippets Groups Projects
Commit 77cb0e16 authored by Sami Spets's avatar Sami Spets
Browse files

Changing the configs from browser works

parent 5728fbb5
Branches
Tags
No related merge requests found
Pipeline #17038 passed
......@@ -158,7 +158,6 @@ connectToStream = () => {
const converter = new VideoConverter.default(element, 20, 6);
peer.bind(current_data.uri, (latency, streampckg, pckg) => {
console.log("CURRENTDATAS URI", current_data.uri)
if(pckg[0] === 2){
function decode(value){
converter.appendRawData(value);
......
......@@ -422,7 +422,6 @@ app.ws('/', (ws, req) => {
p.bind("find_stream", (uri) => {
const parsedURI = stringSplitter(uri)
console.log("PARSEDURI", parsedURI)
if (uri_to_peer.hasOwnProperty(parsedURI)) {
console.log("Stream found: ", uri);
return [Peer.uuid];
......@@ -514,15 +513,14 @@ app.ws('/', (ws, req) => {
* Update certain URIs values
*/
p.bind("update_cfg", (uri, json) => {
const parsedURI = stringSplitter(uri);
console.log("PARSEDURI", parsedURI)
const parsedURI = stringSplitter(uri)
console.log("URI", uri)
console.log("JSON", json)
if(uri_to_peer[parsedURI]){
let peer = uri_to_peer[parsedURI].peer
if(peer){
let peer = uri_to_peer[parsedURI]
peer.send("update_cfg", uri, json)
}
}else{
console.log("Config not found", uri)
console.log("Failed to update the configuration uri", uri)
return "{}";
}
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment