mirror of
https://github.com/koush/scrypted.git
synced 2026-02-03 14:13:28 +00:00
cloud/etc: shuffle cors
This commit is contained in:
4
plugins/chromecast/package-lock.json
generated
4
plugins/chromecast/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/chromecast",
|
||||
"version": "0.1.56",
|
||||
"version": "0.1.57",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/chromecast",
|
||||
"version": "0.1.56",
|
||||
"version": "0.1.57",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@scrypted/common": "file:../../common",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/chromecast",
|
||||
"version": "0.1.56",
|
||||
"version": "0.1.57",
|
||||
"description": "Send video, audio, and text to speech notifications to Chromecast and Google Home devices",
|
||||
"author": "Scrypted",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -215,7 +215,7 @@ class CastDevice extends ScryptedDeviceBase implements MediaPlayer, Refresh, Eng
|
||||
let cameraStreamAuthToken: string;
|
||||
|
||||
try {
|
||||
cameraStreamAuthToken= await mediaManager.convertMediaObjectToUrl(mo, ScryptedMimeTypes.LocalUrl);
|
||||
cameraStreamAuthToken = await mediaManager.convertMediaObjectToUrl(mo, ScryptedMimeTypes.LocalUrl);
|
||||
}
|
||||
catch (e) {
|
||||
this.log.a('Streaming failed. Install and set up Scrypted Cloud to cast this media type.');
|
||||
@@ -469,6 +469,12 @@ class CastDeviceProvider extends ScryptedDeviceBase implements DeviceProvider {
|
||||
constructor() {
|
||||
super(null);
|
||||
|
||||
endpointManager.setAccessControlAllowOrigin({
|
||||
origins: [
|
||||
// chromecast receiver
|
||||
'https://koush.github.io',
|
||||
],
|
||||
});
|
||||
|
||||
this.browser.on('response', response => {
|
||||
for (const additional of response.additionals) {
|
||||
@@ -562,7 +568,7 @@ class CastDeviceProvider extends ScryptedDeviceBase implements DeviceProvider {
|
||||
}
|
||||
|
||||
async releaseDevice(id: string, nativeId: string): Promise<void> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
async discoverDevices(duration: number) {
|
||||
|
||||
4
plugins/cloud/package-lock.json
generated
4
plugins/cloud/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/cloud",
|
||||
"version": "0.2.12",
|
||||
"version": "0.2.13",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/cloud",
|
||||
"version": "0.2.12",
|
||||
"version": "0.2.13",
|
||||
"dependencies": {
|
||||
"@eneris/push-receiver": "^3.1.5",
|
||||
"@scrypted/common": "file:../../common",
|
||||
|
||||
@@ -53,5 +53,5 @@
|
||||
"@types/nat-upnp": "^1.1.5",
|
||||
"@types/node": "^20.11.19"
|
||||
},
|
||||
"version": "0.2.12"
|
||||
"version": "0.2.13"
|
||||
}
|
||||
|
||||
@@ -557,8 +557,6 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings,
|
||||
origins: [
|
||||
`http://${SCRYPTED_SERVER}`,
|
||||
`https://${SCRYPTED_SERVER}`,
|
||||
// chromecast receiver. move this into google home and chromecast plugins?
|
||||
'https://koush.github.io',
|
||||
...this.storageSettings.values.additionalCorsOrigins,
|
||||
],
|
||||
});
|
||||
|
||||
4
plugins/google-home/package-lock.json
generated
4
plugins/google-home/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/google-home",
|
||||
"version": "0.0.59",
|
||||
"version": "0.0.60",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/google-home",
|
||||
"version": "0.0.59",
|
||||
"version": "0.0.60",
|
||||
"dependencies": {
|
||||
"@googleapis/homegraph": "^2.0.0",
|
||||
"@homebridge/ciao": "^1.1.5",
|
||||
|
||||
@@ -49,5 +49,5 @@
|
||||
"@types/lodash": "^4.14.168",
|
||||
"@types/url-parse": "^1.4.3"
|
||||
},
|
||||
"version": "0.0.59"
|
||||
"version": "0.0.60"
|
||||
}
|
||||
|
||||
@@ -97,7 +97,10 @@ class GoogleHome extends ScryptedDeviceBase implements HttpRequestHandler, Engin
|
||||
|
||||
endpointManager.setAccessControlAllowOrigin({
|
||||
origins: [
|
||||
// webrtc signaling
|
||||
'https://www.gstatic.com',
|
||||
// chromecast receiver
|
||||
'https://koush.github.io',
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user