diff --git a/plugins/prebuffer-mixin/package-lock.json b/plugins/prebuffer-mixin/package-lock.json index 7b57a884a..1bcc1fc28 100644 --- a/plugins/prebuffer-mixin/package-lock.json +++ b/plugins/prebuffer-mixin/package-lock.json @@ -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", diff --git a/plugins/prebuffer-mixin/package.json b/plugins/prebuffer-mixin/package.json index f223298f5..f8021095a 100644 --- a/plugins/prebuffer-mixin/package.json +++ b/plugins/prebuffer-mixin/package.json @@ -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", diff --git a/plugins/prebuffer-mixin/src/main.ts b/plugins/prebuffer-mixin/src/main.ts index fc7b9e999..98b9bd3e6 100644 --- a/plugins/prebuffer-mixin/src/main.ts +++ b/plugins/prebuffer-mixin/src/main.ts @@ -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);