@thestatic-tv/dcl-sdk 2.5.10 → 2.5.13

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/index.d.mts CHANGED
@@ -763,6 +763,8 @@ declare class AdminPanelUIModule {
763
763
  private streamControlling;
764
764
  private streamControlStatus;
765
765
  private pollIntervalId;
766
+ private commandPollIntervalId;
767
+ private lastCommandTimestamp;
766
768
  private trialClaiming;
767
769
  private trialClaimError;
768
770
  private sceneAdmins;
@@ -812,6 +814,9 @@ declare class AdminPanelUIModule {
812
814
  registerSceneTab(tab: SceneTabDefinition): void;
813
815
  private startStreamPolling;
814
816
  private stopStreamPolling;
817
+ private startCommandPolling;
818
+ private stopCommandPolling;
819
+ private pollCommands;
815
820
  private fetchStreamData;
816
821
  private refreshStreamStatus;
817
822
  private fetchVideoState;
@@ -843,8 +848,9 @@ declare class AdminPanelUIModule {
843
848
  private ModTab;
844
849
  /**
845
850
  * Get the React-ECS component for the admin panel
851
+ * Always renders NotificationBanner (for broadcasts), admin panel only for admins
846
852
  */
847
- getComponent: () => ReactEcs.JSX.Element | null;
853
+ getComponent: () => ReactEcs.JSX.Element;
848
854
  }
849
855
 
850
856
  /**
@@ -1062,9 +1068,29 @@ declare class StaticTVClient {
1062
1068
  _handleGuideVideoSelect(video: GuideVideo): void;
1063
1069
  /**
1064
1070
  * Play video with stream verification for live content
1071
+ * Works with both videoScreen (SDK-managed) and onVideoPlay (user-managed) modes.
1065
1072
  * @internal
1066
1073
  */
1067
1074
  private _playVideoWithVerification;
1075
+ /**
1076
+ * Start stream verification for callback-based video playback
1077
+ * Shows CONNECTING state and triggers fallback if verification times out
1078
+ * @internal
1079
+ */
1080
+ private _startCallbackVerification;
1081
+ /**
1082
+ * Call this to confirm that a video stream is playing successfully.
1083
+ * Use this when you're managing video playback yourself (onVideoPlay callback).
1084
+ *
1085
+ * @example
1086
+ * ```typescript
1087
+ * // In your video player's onReady or similar event:
1088
+ * videoPlayer.events.on('playing', () => {
1089
+ * staticTV.confirmVideoPlaying()
1090
+ * })
1091
+ * ```
1092
+ */
1093
+ confirmVideoPlaying(): void;
1068
1094
  /**
1069
1095
  * Internal handler for broadcast messages
1070
1096
  * @internal
@@ -1213,6 +1239,27 @@ declare class StaticTVClient {
1213
1239
  * @param durationMs How long to show (default 5000ms)
1214
1240
  */
1215
1241
  declare function showNotification(message: string, durationMs?: number): void;
1242
+ /**
1243
+ * Hide the current notification immediately
1244
+ */
1245
+ declare function hideNotification(): void;
1246
+ /**
1247
+ * Notification banner component - thestatic.tv styled
1248
+ * Positioned at bottom-left, away from Guide/Chat/Admin panels
1249
+ *
1250
+ * @example
1251
+ * ```typescript
1252
+ * import { NotificationBanner } from '@thestatic-tv/dcl-sdk'
1253
+ *
1254
+ * ReactEcsRenderer.setUiRenderer(() => (
1255
+ * <UiEntity>
1256
+ * <NotificationBanner />
1257
+ * {myOtherComponents}
1258
+ * </UiEntity>
1259
+ * ))
1260
+ * ```
1261
+ */
1262
+ declare function NotificationBanner(): ReactEcs.JSX.Element | null;
1216
1263
  /**
1217
1264
  * Set up the UI renderer for a StaticTVClient
1218
1265
  * Call this in your scene's main() function after creating the client.
@@ -1249,4 +1296,4 @@ declare function getPlayerWallet(): string | null;
1249
1296
  */
1250
1297
  declare function getPlayerDisplayName(): string | null;
1251
1298
 
1252
- export { type AdminPanelConfig, AdminPanelUIModule, type Channel, type ChatChannel, type ChatMessage, type ChatUIConfig, ChatUIModule, type CommandHandler, type GuideFeaturedPlaylist, GuideModule, type GuideResponse, type GuideUIConfig, GuideUIModule, type GuideVideo, HeartbeatModule, type HeartbeatResponse, type InteractionResponse, InteractionsModule, KEY_TYPE_CHANNEL, KEY_TYPE_SCENE, type PlayerData, type SDKTier, type SceneStats, type SceneStatsResponse, type SceneTabDefinition, SessionModule, type SessionResponse, StaticTVClient, type StaticTVConfig, type StreamData, type VideoSlot, type Vod, fetchUserData, getPlayerDisplayName, getPlayerWallet, setupStaticUI, showNotification };
1299
+ export { type AdminPanelConfig, AdminPanelUIModule, type Channel, type ChatChannel, type ChatMessage, type ChatUIConfig, ChatUIModule, type CommandHandler, type GuideFeaturedPlaylist, GuideModule, type GuideResponse, type GuideUIConfig, GuideUIModule, type GuideVideo, HeartbeatModule, type HeartbeatResponse, type InteractionResponse, InteractionsModule, KEY_TYPE_CHANNEL, KEY_TYPE_SCENE, NotificationBanner, type PlayerData, type SDKTier, type SceneStats, type SceneStatsResponse, type SceneTabDefinition, SessionModule, type SessionResponse, StaticTVClient, type StaticTVConfig, type StreamData, type VideoSlot, type Vod, fetchUserData, getPlayerDisplayName, getPlayerWallet, hideNotification, setupStaticUI, showNotification };
package/dist/index.d.ts CHANGED
@@ -763,6 +763,8 @@ declare class AdminPanelUIModule {
763
763
  private streamControlling;
764
764
  private streamControlStatus;
765
765
  private pollIntervalId;
766
+ private commandPollIntervalId;
767
+ private lastCommandTimestamp;
766
768
  private trialClaiming;
767
769
  private trialClaimError;
768
770
  private sceneAdmins;
@@ -812,6 +814,9 @@ declare class AdminPanelUIModule {
812
814
  registerSceneTab(tab: SceneTabDefinition): void;
813
815
  private startStreamPolling;
814
816
  private stopStreamPolling;
817
+ private startCommandPolling;
818
+ private stopCommandPolling;
819
+ private pollCommands;
815
820
  private fetchStreamData;
816
821
  private refreshStreamStatus;
817
822
  private fetchVideoState;
@@ -843,8 +848,9 @@ declare class AdminPanelUIModule {
843
848
  private ModTab;
844
849
  /**
845
850
  * Get the React-ECS component for the admin panel
851
+ * Always renders NotificationBanner (for broadcasts), admin panel only for admins
846
852
  */
847
- getComponent: () => ReactEcs.JSX.Element | null;
853
+ getComponent: () => ReactEcs.JSX.Element;
848
854
  }
849
855
 
850
856
  /**
@@ -1062,9 +1068,29 @@ declare class StaticTVClient {
1062
1068
  _handleGuideVideoSelect(video: GuideVideo): void;
1063
1069
  /**
1064
1070
  * Play video with stream verification for live content
1071
+ * Works with both videoScreen (SDK-managed) and onVideoPlay (user-managed) modes.
1065
1072
  * @internal
1066
1073
  */
1067
1074
  private _playVideoWithVerification;
1075
+ /**
1076
+ * Start stream verification for callback-based video playback
1077
+ * Shows CONNECTING state and triggers fallback if verification times out
1078
+ * @internal
1079
+ */
1080
+ private _startCallbackVerification;
1081
+ /**
1082
+ * Call this to confirm that a video stream is playing successfully.
1083
+ * Use this when you're managing video playback yourself (onVideoPlay callback).
1084
+ *
1085
+ * @example
1086
+ * ```typescript
1087
+ * // In your video player's onReady or similar event:
1088
+ * videoPlayer.events.on('playing', () => {
1089
+ * staticTV.confirmVideoPlaying()
1090
+ * })
1091
+ * ```
1092
+ */
1093
+ confirmVideoPlaying(): void;
1068
1094
  /**
1069
1095
  * Internal handler for broadcast messages
1070
1096
  * @internal
@@ -1213,6 +1239,27 @@ declare class StaticTVClient {
1213
1239
  * @param durationMs How long to show (default 5000ms)
1214
1240
  */
1215
1241
  declare function showNotification(message: string, durationMs?: number): void;
1242
+ /**
1243
+ * Hide the current notification immediately
1244
+ */
1245
+ declare function hideNotification(): void;
1246
+ /**
1247
+ * Notification banner component - thestatic.tv styled
1248
+ * Positioned at bottom-left, away from Guide/Chat/Admin panels
1249
+ *
1250
+ * @example
1251
+ * ```typescript
1252
+ * import { NotificationBanner } from '@thestatic-tv/dcl-sdk'
1253
+ *
1254
+ * ReactEcsRenderer.setUiRenderer(() => (
1255
+ * <UiEntity>
1256
+ * <NotificationBanner />
1257
+ * {myOtherComponents}
1258
+ * </UiEntity>
1259
+ * ))
1260
+ * ```
1261
+ */
1262
+ declare function NotificationBanner(): ReactEcs.JSX.Element | null;
1216
1263
  /**
1217
1264
  * Set up the UI renderer for a StaticTVClient
1218
1265
  * Call this in your scene's main() function after creating the client.
@@ -1249,4 +1296,4 @@ declare function getPlayerWallet(): string | null;
1249
1296
  */
1250
1297
  declare function getPlayerDisplayName(): string | null;
1251
1298
 
1252
- export { type AdminPanelConfig, AdminPanelUIModule, type Channel, type ChatChannel, type ChatMessage, type ChatUIConfig, ChatUIModule, type CommandHandler, type GuideFeaturedPlaylist, GuideModule, type GuideResponse, type GuideUIConfig, GuideUIModule, type GuideVideo, HeartbeatModule, type HeartbeatResponse, type InteractionResponse, InteractionsModule, KEY_TYPE_CHANNEL, KEY_TYPE_SCENE, type PlayerData, type SDKTier, type SceneStats, type SceneStatsResponse, type SceneTabDefinition, SessionModule, type SessionResponse, StaticTVClient, type StaticTVConfig, type StreamData, type VideoSlot, type Vod, fetchUserData, getPlayerDisplayName, getPlayerWallet, setupStaticUI, showNotification };
1299
+ export { type AdminPanelConfig, AdminPanelUIModule, type Channel, type ChatChannel, type ChatMessage, type ChatUIConfig, ChatUIModule, type CommandHandler, type GuideFeaturedPlaylist, GuideModule, type GuideResponse, type GuideUIConfig, GuideUIModule, type GuideVideo, HeartbeatModule, type HeartbeatResponse, type InteractionResponse, InteractionsModule, KEY_TYPE_CHANNEL, KEY_TYPE_SCENE, NotificationBanner, type PlayerData, type SDKTier, type SceneStats, type SceneStatsResponse, type SceneTabDefinition, SessionModule, type SessionResponse, StaticTVClient, type StaticTVConfig, type StreamData, type VideoSlot, type Vod, fetchUserData, getPlayerDisplayName, getPlayerWallet, hideNotification, setupStaticUI, showNotification };