diff --git a/src/const.ts b/src/const.ts index 6aa9452..02c0f13 100644 --- a/src/const.ts +++ b/src/const.ts @@ -32,5 +32,5 @@ export const defaultRelays = { "wss://nostr.wine": { read: true, write: true }, }; -export const DefaultProviderUrl = "https://api.zap.stream/api/nostr/"; -//export const DefaultProviderUrl = "http://localhost:5295/api/nostr/"; +export const DefaultProviderUrl = "https://api.zap.stream/api/nostr"; +//export const DefaultProviderUrl = "http://localhost:5295/api/nostr"; diff --git a/src/element/provider/nostr/index.tsx b/src/element/provider/nostr/index.tsx index 3b49fd9..0a0cc35 100644 --- a/src/element/provider/nostr/index.tsx +++ b/src/element/provider/nostr/index.tsx @@ -159,7 +159,7 @@ export default function NostrProviderDialog({ } function streamEndpoints() { - if (!info) return; + if (!info?.endpoints) return; return ( <> {info.endpoints.length > 1 && ( diff --git a/src/providers/index.ts b/src/providers/index.ts index 3c38568..6403f53 100644 --- a/src/providers/index.ts +++ b/src/providers/index.ts @@ -3,7 +3,7 @@ import { ExternalStore } from "@snort/shared"; import { NostrStreamProvider } from "./zsz"; import { ManualProvider } from "./manual"; import { OwncastProvider } from "./owncast"; -import { DefaultProviderUrl, StreamState } from "@/const"; +import { DefaultProviderUrl } from "@/const"; export { NostrStreamProvider } from "./zsz"; @@ -47,13 +47,10 @@ export enum StreamProviders { export interface StreamProviderInfo { name: string; summary?: string; - version?: string; - state: StreamState; - viewers?: number; publishedEvent?: NostrEvent; streamInfo?: StreamProviderStreamInfo; balance?: number; - endpoints: Array; + endpoints?: Array; tosAccepted?: boolean; tosLink?: string; forwards?: Array; diff --git a/src/providers/manual.ts b/src/providers/manual.ts index afb0057..ec5d438 100644 --- a/src/providers/manual.ts +++ b/src/providers/manual.ts @@ -13,7 +13,7 @@ export class ManualProvider implements StreamProvider { info(): Promise { return Promise.resolve({ name: this.name, - } as StreamProviderInfo); + }); } createConfig() { diff --git a/src/providers/zsz.ts b/src/providers/zsz.ts index f867df3..606cca3 100644 --- a/src/providers/zsz.ts +++ b/src/providers/zsz.ts @@ -31,8 +31,6 @@ export class NostrStreamProvider implements StreamProvider { return { type: StreamProviders.NostrType, name: this.name, - state: StreamState.Planned, - viewers: 0, balance: rsp.balance, tosAccepted: rsp.tos?.accepted, tosLink: rsp.tos?.link, @@ -47,7 +45,7 @@ export class NostrStreamProvider implements StreamProvider { } as StreamProviderEndpoint; }), forwards: rsp.forwards, - } as StreamProviderInfo; + }; } createConfig() {