@blueharford/scrypted-spatial-awareness 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/plugin.zip CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueharford/scrypted-spatial-awareness",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Cross-camera object tracking for Scrypted NVR with spatial awareness",
5
5
  "author": "Joshua Seidel <blueharford>",
6
6
  "license": "Apache-2.0",
package/src/main.ts CHANGED
@@ -335,12 +335,12 @@ export class SpatialAwarenessPlugin extends ScryptedDeviceBase
335
335
  async getSettings(): Promise<Setting[]> {
336
336
  const settings = await this.storageSettings.getSettings();
337
337
 
338
- // Embed topology editor as iframe
338
+ // Embed topology editor as iframe with absolute path
339
339
  settings.push({
340
340
  key: 'topologyEditor',
341
341
  title: 'Topology Editor',
342
342
  type: 'html' as any,
343
- value: `<iframe src="ui/editor" style="width: 100%; height: 700px; border: none; border-radius: 8px;"></iframe>`,
343
+ value: `<iframe src="/endpoint/@blueharford/scrypted-spatial-awareness/ui/editor" style="width: 100%; height: 600px; border: none; border-radius: 8px; background: #1a1a2e;"></iframe>`,
344
344
  group: 'Topology',
345
345
  });
346
346
 
@@ -233,7 +233,7 @@ export const EDITOR_HTML = `<!DOCTYPE html>
233
233
 
234
234
  async function loadTopology() {
235
235
  try {
236
- const response = await fetch('api/topology');
236
+ const response = await fetch('../api/topology');
237
237
  if (response.ok) {
238
238
  topology = await response.json();
239
239
  if (topology.floorPlan?.imageData) {
@@ -251,7 +251,7 @@ export const EDITOR_HTML = `<!DOCTYPE html>
251
251
  async function saveTopology() {
252
252
  try {
253
253
  setStatus('Saving...', 'warning');
254
- const response = await fetch('api/topology', {
254
+ const response = await fetch('../api/topology', {
255
255
  method: 'PUT',
256
256
  headers: { 'Content-Type': 'application/json' },
257
257
  body: JSON.stringify(topology)