mirror of
https://github.com/koush/scrypted.git
synced 2026-07-01 05:10:36 +01:00
rebroadcast: fix external url behavior
This commit is contained in:
4
plugins/prebuffer-mixin/package-lock.json
generated
4
plugins/prebuffer-mixin/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/prebuffer-mixin",
|
||||
"version": "0.9.75",
|
||||
"version": "0.9.76",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/prebuffer-mixin",
|
||||
"version": "0.9.75",
|
||||
"version": "0.9.76",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@scrypted/common": "file:../../common",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/prebuffer-mixin",
|
||||
"version": "0.9.75",
|
||||
"version": "0.9.76",
|
||||
"description": "Video Stream Rebroadcast, Prebuffer, and Management Plugin for Scrypted.",
|
||||
"author": "Scrypted",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1156,17 +1156,19 @@ class PrebufferSession {
|
||||
if (hostname) {
|
||||
try {
|
||||
const addresses = await sdk.endpointManager.getLocalAddresses();
|
||||
const [address] = addresses;
|
||||
if (address) {
|
||||
const u = new URL(url);
|
||||
u.hostname = address;
|
||||
url = u.toString();
|
||||
if (addresses) {
|
||||
const [address] = addresses;
|
||||
if (address) {
|
||||
const u = new URL(url);
|
||||
u.hostname = address;
|
||||
url = u.toString();
|
||||
}
|
||||
urls = addresses.map(address => {
|
||||
const u = new URL(url);
|
||||
u.hostname = address;
|
||||
return u.toString();
|
||||
});
|
||||
}
|
||||
urls = addresses.map(address => {
|
||||
const u = new URL(url);
|
||||
u.hostname = address;
|
||||
return u.toString();
|
||||
})
|
||||
}
|
||||
catch (e) {
|
||||
this.console.warn('Error determining external addresses. Is Scrypted Server Address configured?', e);
|
||||
|
||||
Reference in New Issue
Block a user