Ugly hack to work around the handling of stream key
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f5ad932b12
commit
f1e309381a
@ -199,11 +199,14 @@ export default {
|
|||||||
case "ingest":
|
case "ingest":
|
||||||
data["outputNeighbours"] = [];
|
data["outputNeighbours"] = [];
|
||||||
break;
|
break;
|
||||||
case "restreamer":
|
case "restreamer": {
|
||||||
data["inputNeighbour"] = null;
|
let fixed_thing = new_node.data.url.slice(-1) !== '/' ? new_node.data.url + '/' : new_node.data.url;
|
||||||
data["outputURLs"] = new_node.data.url ? [new_node.data.url] : [];
|
let full_url = new_node.data.url ? new URL("./" + new_node.data.streamkey, fixed_thing).href : null;
|
||||||
|
data["inputNeighbour"] = new_node ? new_node.apiId : null;
|
||||||
|
data["outputURLs"] = full_url ? [full_url] : full_url;
|
||||||
translated_type = "restream";
|
translated_type = "restream";
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "encoder":
|
case "encoder":
|
||||||
data["inputNeighbour"] = null;
|
data["inputNeighbour"] = null;
|
||||||
data["outputNeighbours"] = []
|
data["outputNeighbours"] = []
|
||||||
@ -279,11 +282,14 @@ export default {
|
|||||||
case "ingest":
|
case "ingest":
|
||||||
data["outputNeighbours"] = map(output_neighbors, 'apiId');
|
data["outputNeighbours"] = map(output_neighbors, 'apiId');
|
||||||
break;
|
break;
|
||||||
case "restreamer":
|
case "restreamer": {
|
||||||
|
let fixed_thing = changed_node.data.url.slice(-1) !== '/' ? changed_node.data.url + '/' : changed_node.data.url;
|
||||||
|
let full_url = changed_node.data.url ? new URL("./" + changed_node.data.streamkey, fixed_thing).href : null;
|
||||||
data["inputNeighbour"] = input_neighbor ? input_neighbor.apiId : null;
|
data["inputNeighbour"] = input_neighbor ? input_neighbor.apiId : null;
|
||||||
data["outputURLs"] = changed_node.data.url ? [changed_node.data.url] : [];
|
data["outputURLs"] = full_url ? [full_url] : full_url;
|
||||||
translated_type = "restream";
|
translated_type = "restream";
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "encoder":
|
case "encoder":
|
||||||
data["inputNeighbour"] = input_neighbor ? input_neighbor.apiId : null;
|
data["inputNeighbour"] = input_neighbor ? input_neighbor.apiId : null;
|
||||||
data["outputNeighbours"] = map(output_neighbors, 'apiId');
|
data["outputNeighbours"] = map(output_neighbors, 'apiId');
|
||||||
@ -357,12 +363,20 @@ export default {
|
|||||||
height: apiNode.height
|
height: apiNode.height
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "restreamer":
|
case "restreamer": {
|
||||||
|
let full_url = apiNode.output_urls[0] || '';
|
||||||
|
let url = '';
|
||||||
|
let key = '';
|
||||||
|
if (full_url) {
|
||||||
|
url = full_url.substring(0, full_url.lastIndexOf("/") + 1);
|
||||||
|
key = full_url.substring(full_url.lastIndexOf("/") + 1, full_url.length);
|
||||||
|
}
|
||||||
newNode.data = {
|
newNode.data = {
|
||||||
url: apiNode.output_urls[0] || '',
|
url: url,
|
||||||
streamkey: apiNode.stream_key
|
streamkey: key
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
newNode.id = this.idGenerator;
|
newNode.id = this.idGenerator;
|
||||||
|
Loading…
Reference in New Issue
Block a user