@viostream/viostream-player-angular 0.1.5 → 0.1.7

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.
@@ -1,8 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { output, signal, viewChild, inject, NgZone, Input, Component } from '@angular/core';
3
- import { loadViostream, wrapRawPlayer } from '@viostream/viostream-player-core';
3
+ import { getViostreamApi, wrapRawPlayer } from '@viostream/viostream-player-core';
4
4
  export { createViostreamPlayer, loadViostream } from '@viostream/viostream-player-core';
5
5
 
6
+ // Auto-generated by scripts/sync-version.mjs — do not edit
7
+ const SDK_NAME = 'viostream-player-angular';
8
+ const SDK_VERSION = '0.1.7';
9
+
6
10
  /**
7
11
  * ViostreamPlayerComponent — Angular standalone component that embeds a Viostream video player.
8
12
  *
@@ -97,6 +101,8 @@ class ViostreamPlayerComponent {
97
101
  // ---------------------------------------------------------------------------
98
102
  /** Unique ID for the player container element. */
99
103
  containerId = `viostream-player-${Math.random().toString(36).slice(2, 10)}`;
104
+ /** SDK identifier stamped as a data attribute on the container. */
105
+ sdkTag = `${SDK_NAME}@${SDK_VERSION}`;
100
106
  /** Whether the player is still loading. */
101
107
  isLoading = signal(true);
102
108
  /** Error message if loading failed. */
@@ -128,7 +134,7 @@ class ViostreamPlayerComponent {
128
134
  // ---------------------------------------------------------------------------
129
135
  async init() {
130
136
  try {
131
- const api = await loadViostream(this.accountKey);
137
+ const api = getViostreamApi();
132
138
  if (this.destroyed)
133
139
  return;
134
140
  const embedOpts = this.buildEmbedOptions();
@@ -226,6 +232,7 @@ class ViostreamPlayerComponent {
226
232
  [class]="cssClass"
227
233
  data-viostream-player
228
234
  [attr.data-viostream-public-key]="publicKey"
235
+ [attr.data-viostream-sdk]="sdkTag"
229
236
  >
230
237
  @if (isLoading()) {
231
238
  <ng-content select="[loading]" />
@@ -251,6 +258,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
251
258
  [class]="cssClass"
252
259
  data-viostream-player
253
260
  [attr.data-viostream-public-key]="publicKey"
261
+ [attr.data-viostream-sdk]="sdkTag"
254
262
  >
255
263
  @if (isLoading()) {
256
264
  <ng-content select="[loading]" />
@@ -1 +1 @@
1
- {"version":3,"file":"viostream-viostream-player-angular.mjs","sources":["../../src/viostream-player.component.ts","../../src/index.ts","../../src/viostream-viostream-player-angular.ts"],"sourcesContent":["/**\n * ViostreamPlayerComponent — Angular standalone component that embeds a Viostream video player.\n *\n * @example\n * ```html\n * <viostream-player\n * [accountKey]=\"'vc-100100100'\"\n * [publicKey]=\"'nhedxonrxsyfee'\"\n * [displayTitle]=\"true\"\n * [sharing]=\"true\"\n * (play)=\"onPlay()\"\n * (timeUpdate)=\"onTimeUpdate($event)\"\n * (playerReady)=\"onPlayerReady($event)\"\n * />\n * ```\n */\n\nimport {\n Component,\n Input,\n OnInit,\n OnDestroy,\n ElementRef,\n NgZone,\n inject,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { loadViostream, wrapRawPlayer } from '@viostream/viostream-player-core';\nimport type {\n ViostreamEmbedOptions,\n ViostreamPlayer,\n RawViostreamPlayerInstance,\n ViostreamEventHandler,\n ViostreamTimeUpdateData,\n ViostreamVolumeChangeData,\n ViostreamErrorData,\n ViostreamProgressData,\n} from '@viostream/viostream-player-core';\n\n@Component({\n selector: 'viostream-player',\n standalone: true,\n template: `\n <div\n #container\n [id]=\"containerId\"\n [class]=\"cssClass\"\n data-viostream-player\n [attr.data-viostream-public-key]=\"publicKey\"\n >\n @if (isLoading()) {\n <ng-content select=\"[loading]\" />\n }\n\n @if (errorMsg(); as msg) {\n <div data-viostream-error style=\"color: red; padding: 1em;\">\n Failed to load Viostream player: {{ msg }}\n </div>\n }\n </div>\n `,\n})\nexport class ViostreamPlayerComponent implements OnInit, OnDestroy {\n // ---------------------------------------------------------------------------\n // Inputs (required)\n // ---------------------------------------------------------------------------\n\n /** Your Viostream account key (e.g. `'vc-100100100'`). */\n @Input({ required: true }) accountKey!: string;\n /** The public key of the media asset to embed. */\n @Input({ required: true }) publicKey!: string;\n\n // ---------------------------------------------------------------------------\n // Inputs (embed options)\n // ---------------------------------------------------------------------------\n\n /** Display chapter markers. */\n @Input() chapters?: boolean;\n /** Seek to a named chapter before playback begins. */\n @Input() chapterSlug?: string;\n /** Show the video title overlay. */\n @Input() displayTitle?: boolean;\n /** Show the HLS quality selector control. */\n @Input() hlsQualitySelector?: boolean;\n /** Override the player theme/key to use. */\n @Input() playerKey?: string;\n /** The player rendering style. */\n @Input() playerStyle?: 'video' | 'audio' | 'audio-poster';\n /** Show the sharing control. */\n @Input() sharing?: boolean;\n /** Custom skin active colour (e.g. `'#000'`). Requires `skinCustom: true`. */\n @Input() skinActive?: string;\n /** Custom skin background colour (e.g. `'#000'`). Requires `skinCustom: true`. */\n @Input() skinBackground?: string;\n /** Enable a custom skin via the API. */\n @Input() skinCustom?: boolean;\n /** Custom skin inactive colour (e.g. `'#000'`). Requires `skinCustom: true`. */\n @Input() skinInactive?: string;\n /** Show the playback speed selector. */\n @Input() speedSelector?: boolean;\n /** Play only a specific section of the video (e.g. `'10,30'`). */\n @Input() startEndTimespan?: string;\n /** Seek to a specific time (in seconds) before playback begins. */\n @Input() startTime?: string;\n /** Allow transcript download. */\n @Input() transcriptDownload?: boolean;\n /** Enable the settings menu on the control bar. */\n @Input() useSettingsMenu?: boolean;\n\n // ---------------------------------------------------------------------------\n // Inputs (styling)\n // ---------------------------------------------------------------------------\n\n /** Optional CSS class applied to the outer wrapper `<div>`. */\n @Input() cssClass?: string;\n\n // ---------------------------------------------------------------------------\n // Outputs (player events)\n // ---------------------------------------------------------------------------\n\n /** Emitted when playback starts or resumes. */\n readonly play = output<void>();\n /** Emitted when playback is paused. */\n readonly pause = output<void>();\n /** Emitted when the media finishes playing. */\n readonly ended = output<void>();\n /** Emitted when the current playback time changes. */\n readonly timeUpdate = output<ViostreamTimeUpdateData>();\n /** Emitted when the volume changes. */\n readonly volumeChange = output<ViostreamVolumeChangeData>();\n /** Emitted when a player error occurs. Named `playerError` to avoid conflict with the native DOM `error` event. */\n readonly playerError = output<ViostreamErrorData>();\n /** Emitted on buffering progress. */\n readonly progress = output<ViostreamProgressData>();\n /** Emitted when the player is ready. */\n readonly ready = output<void>();\n /** Emitted when a seek operation completes. */\n readonly seeked = output<void>();\n /** Emitted when metadata has loaded. */\n readonly loaded = output<void>();\n /** Emitted once the player is ready, providing the `ViostreamPlayer` instance for programmatic control. */\n readonly playerReady = output<ViostreamPlayer>();\n\n // ---------------------------------------------------------------------------\n // Internal state\n // ---------------------------------------------------------------------------\n\n /** Unique ID for the player container element. */\n readonly containerId = `viostream-player-${Math.random().toString(36).slice(2, 10)}`;\n\n /** Whether the player is still loading. */\n readonly isLoading = signal(true);\n\n /** Error message if loading failed. */\n readonly errorMsg = signal<string | undefined>(undefined);\n\n /** Reference to the container div. */\n private readonly containerRef = viewChild<ElementRef<HTMLDivElement>>('container');\n\n /** The wrapped player instance. */\n private player: ViostreamPlayer | undefined;\n\n /** Whether the component has been destroyed. */\n private destroyed = false;\n\n /** Unsubscribe functions for event listeners. */\n private readonly unsubscribers: Array<() => void> = [];\n\n /** Angular zone for triggering change detection. */\n private readonly ngZone = inject(NgZone);\n\n // ---------------------------------------------------------------------------\n // Lifecycle\n // ---------------------------------------------------------------------------\n\n ngOnInit(): void {\n this.init();\n }\n\n ngOnDestroy(): void {\n this.destroyed = true;\n this.unwireEvents();\n this.player?.destroy();\n this.player = undefined;\n }\n\n // ---------------------------------------------------------------------------\n // Private methods\n // ---------------------------------------------------------------------------\n\n private async init(): Promise<void> {\n try {\n const api = await loadViostream(this.accountKey);\n\n if (this.destroyed) return;\n\n const embedOpts = this.buildEmbedOptions();\n const raw: RawViostreamPlayerInstance = api.embed(\n this.publicKey,\n this.containerId,\n embedOpts,\n );\n const wrappedPlayer = wrapRawPlayer(raw, this.containerId);\n\n if (this.destroyed) {\n wrappedPlayer.destroy();\n return;\n }\n\n this.player = wrappedPlayer;\n\n // Run state updates inside NgZone to trigger change detection\n this.ngZone.run(() => {\n this.isLoading.set(false);\n });\n\n // Wire up event callbacks\n this.wireEvents(wrappedPlayer);\n\n // Notify consumer that the player is ready\n this.playerReady.emit(wrappedPlayer);\n } catch (err) {\n if (!this.destroyed) {\n this.ngZone.run(() => {\n this.errorMsg.set(err instanceof Error ? err.message : String(err));\n this.isLoading.set(false);\n });\n }\n }\n }\n\n private buildEmbedOptions(): ViostreamEmbedOptions {\n const opts: ViostreamEmbedOptions = {};\n if (this.chapters !== undefined) opts.chapters = this.chapters;\n if (this.chapterSlug !== undefined) opts.chapterSlug = this.chapterSlug;\n if (this.displayTitle !== undefined) opts.displayTitle = this.displayTitle;\n if (this.hlsQualitySelector !== undefined) opts.hlsQualitySelector = this.hlsQualitySelector;\n if (this.playerKey !== undefined) opts.playerKey = this.playerKey;\n if (this.playerStyle !== undefined) opts.playerStyle = this.playerStyle;\n if (this.sharing !== undefined) opts.sharing = this.sharing;\n if (this.skinActive !== undefined) opts.skinActive = this.skinActive;\n if (this.skinBackground !== undefined) opts.skinBackground = this.skinBackground;\n if (this.skinCustom !== undefined) opts.skinCustom = this.skinCustom;\n if (this.skinInactive !== undefined) opts.skinInactive = this.skinInactive;\n if (this.speedSelector !== undefined) opts.speedSelector = this.speedSelector;\n if (this.startEndTimespan !== undefined) opts.startEndTimespan = this.startEndTimespan;\n if (this.startTime !== undefined) opts.startTime = this.startTime;\n if (this.transcriptDownload !== undefined) opts.transcriptDownload = this.transcriptDownload;\n if (this.useSettingsMenu !== undefined) opts.useSettingsMenu = this.useSettingsMenu;\n return opts;\n }\n\n /** Maps raw player event names to component output emitters. */\n private readonly EVENT_MAP: Array<[string, ViostreamEventHandler]> = [\n ['play', () => this.ngZone.run(() => this.play.emit())],\n ['pause', () => this.ngZone.run(() => this.pause.emit())],\n ['ended', () => this.ngZone.run(() => this.ended.emit())],\n ['timeupdate', (data: unknown) => this.ngZone.run(() => this.timeUpdate.emit(data as ViostreamTimeUpdateData))],\n ['volumechange', (data: unknown) => this.ngZone.run(() => this.volumeChange.emit(data as ViostreamVolumeChangeData))],\n ['error', (data: unknown) => this.ngZone.run(() => this.playerError.emit(data as ViostreamErrorData))],\n ['progress', (data: unknown) => this.ngZone.run(() => this.progress.emit(data as ViostreamProgressData))],\n ['ready', () => this.ngZone.run(() => this.ready.emit())],\n ['seeked', () => this.ngZone.run(() => this.seeked.emit())],\n ['loaded', () => this.ngZone.run(() => this.loaded.emit())],\n ];\n\n private wireEvents(wrappedPlayer: ViostreamPlayer): void {\n for (const [eventName, handler] of this.EVENT_MAP) {\n const unsub = wrappedPlayer.on(eventName, handler);\n this.unsubscribers.push(unsub);\n }\n }\n\n private unwireEvents(): void {\n for (const unsub of this.unsubscribers) {\n unsub();\n }\n this.unsubscribers.length = 0;\n }\n}\n","/**\n * @viostream/viostream-player-angular\n *\n * Angular 17+ SDK for the Viostream video player.\n *\n * @example Component usage\n * ```ts\n * import { ViostreamPlayerComponent } from '@viostream/viostream-player-angular';\n *\n * @Component({\n * selector: 'app-root',\n * standalone: true,\n * imports: [ViostreamPlayerComponent],\n * template: `\n * <viostream-player\n * [accountKey]=\"'vc-100100100'\"\n * [publicKey]=\"'nhedxonrxsyfee'\"\n * [displayTitle]=\"true\"\n * (play)=\"onPlay()\"\n * />\n * `,\n * })\n * export class AppComponent {\n * onPlay() {\n * console.log('playing');\n * }\n * }\n * ```\n *\n * @example Headless / programmatic usage\n * ```ts\n * import { createViostreamPlayer } from '@viostream/viostream-player-angular';\n *\n * const player = await createViostreamPlayer({\n * accountKey: 'vc-100100100',\n * publicKey: 'nhedxonrxsyfee',\n * target: 'my-video-div'\n * });\n *\n * player.play();\n * const time = await player.getCurrentTime();\n * player.on('ended', () => console.log('done'));\n * ```\n */\n\n// Component\nexport { ViostreamPlayerComponent } from './viostream-player.component';\n\n// Re-export everything from core so consumers can import from this package\nexport {\n createViostreamPlayer,\n loadViostream,\n} from '@viostream/viostream-player-core';\n\nexport type {\n CreateViostreamPlayerOptions,\n ViostreamEmbedOptions,\n ViostreamTimeUpdateData,\n ViostreamVolumeChangeData,\n ViostreamErrorData,\n ViostreamProgressData,\n ViostreamPlayerEventMap,\n ViostreamEventHandler,\n ViostreamPlayer as ViostreamPlayerInstance,\n} from '@viostream/viostream-player-core';\n\n// Angular-specific types\nexport type {\n ViostreamPlayerInputs,\n ViostreamPlayerEventProps,\n} from './types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;;;;;;AAeG;MAiDU,wBAAwB,CAAA;;;;;AAMR,IAAA,UAAU;;AAEV,IAAA,SAAS;;;;;AAO3B,IAAA,QAAQ;;AAER,IAAA,WAAW;;AAEX,IAAA,YAAY;;AAEZ,IAAA,kBAAkB;;AAElB,IAAA,SAAS;;AAET,IAAA,WAAW;;AAEX,IAAA,OAAO;;AAEP,IAAA,UAAU;;AAEV,IAAA,cAAc;;AAEd,IAAA,UAAU;;AAEV,IAAA,YAAY;;AAEZ,IAAA,aAAa;;AAEb,IAAA,gBAAgB;;AAEhB,IAAA,SAAS;;AAET,IAAA,kBAAkB;;AAElB,IAAA,eAAe;;;;;AAOf,IAAA,QAAQ;;;;;IAOR,IAAI,GAAG,MAAM,EAAQ;;IAErB,KAAK,GAAG,MAAM,EAAQ;;IAEtB,KAAK,GAAG,MAAM,EAAQ;;IAEtB,UAAU,GAAG,MAAM,EAA2B;;IAE9C,YAAY,GAAG,MAAM,EAA6B;;IAElD,WAAW,GAAG,MAAM,EAAsB;;IAE1C,QAAQ,GAAG,MAAM,EAAyB;;IAE1C,KAAK,GAAG,MAAM,EAAQ;;IAEtB,MAAM,GAAG,MAAM,EAAQ;;IAEvB,MAAM,GAAG,MAAM,EAAQ;;IAEvB,WAAW,GAAG,MAAM,EAAmB;;;;;AAOvC,IAAA,WAAW,GAAG,CAAA,iBAAA,EAAoB,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CA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A,CAAA;sBAArB;gBAEQ,gBAAgB,EAAA,CAAA;sBAAxB;gBAEQ,SAAS,EAAA,CAAA;sBAAjB;gBAEQ,kBAAkB,EAAA,CAAA;sBAA1B;gBAEQ,eAAe,EAAA,CAAA;sBAAvB;gBAOQ,QAAQ,EAAA,CAAA;sBAAhB;;;ACpHH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CG;AAEH;;AC7CA;;AAEG;;;;"}
1
+ {"version":3,"file":"viostream-viostream-player-angular.mjs","sources":["../../src/version.ts","../../src/viostream-player.component.ts","../../src/index.ts","../../src/viostream-viostream-player-angular.ts"],"sourcesContent":["// Auto-generated by scripts/sync-version.mjs — do not edit\nexport const SDK_NAME = 'viostream-player-angular';\nexport const SDK_VERSION = '0.1.7';\n","/**\n * ViostreamPlayerComponent — Angular standalone component that embeds a Viostream video player.\n *\n * @example\n * ```html\n * <viostream-player\n * [accountKey]=\"'vc-100100100'\"\n * [publicKey]=\"'nhedxonrxsyfee'\"\n * [displayTitle]=\"true\"\n * [sharing]=\"true\"\n * (play)=\"onPlay()\"\n * (timeUpdate)=\"onTimeUpdate($event)\"\n * (playerReady)=\"onPlayerReady($event)\"\n * />\n * ```\n */\n\nimport {\n Component,\n Input,\n OnInit,\n OnDestroy,\n ElementRef,\n NgZone,\n inject,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { getViostreamApi, wrapRawPlayer } from '@viostream/viostream-player-core';\nimport type {\n ViostreamEmbedOptions,\n ViostreamPlayer,\n RawViostreamPlayerInstance,\n ViostreamEventHandler,\n ViostreamTimeUpdateData,\n ViostreamVolumeChangeData,\n ViostreamErrorData,\n ViostreamProgressData,\n} from '@viostream/viostream-player-core';\nimport { SDK_NAME, SDK_VERSION } from './version';\n\n@Component({\n selector: 'viostream-player',\n standalone: true,\n template: `\n <div\n #container\n [id]=\"containerId\"\n [class]=\"cssClass\"\n data-viostream-player\n [attr.data-viostream-public-key]=\"publicKey\"\n [attr.data-viostream-sdk]=\"sdkTag\"\n >\n @if (isLoading()) {\n <ng-content select=\"[loading]\" />\n }\n\n @if (errorMsg(); as msg) {\n <div data-viostream-error style=\"color: red; padding: 1em;\">\n Failed to load Viostream player: {{ msg }}\n </div>\n }\n </div>\n `,\n})\nexport class ViostreamPlayerComponent implements OnInit, OnDestroy {\n // ---------------------------------------------------------------------------\n // Inputs (required)\n // ---------------------------------------------------------------------------\n\n /** Your Viostream account key (e.g. `'vc-100100100'`). */\n @Input({ required: true }) accountKey!: string;\n /** The public key of the media asset to embed. */\n @Input({ required: true }) publicKey!: string;\n\n // ---------------------------------------------------------------------------\n // Inputs (embed options)\n // ---------------------------------------------------------------------------\n\n /** Display chapter markers. */\n @Input() chapters?: boolean;\n /** Seek to a named chapter before playback begins. */\n @Input() chapterSlug?: string;\n /** Show the video title overlay. */\n @Input() displayTitle?: boolean;\n /** Show the HLS quality selector control. */\n @Input() hlsQualitySelector?: boolean;\n /** Override the player theme/key to use. */\n @Input() playerKey?: string;\n /** The player rendering style. */\n @Input() playerStyle?: 'video' | 'audio' | 'audio-poster';\n /** Show the sharing control. */\n @Input() sharing?: boolean;\n /** Custom skin active colour (e.g. `'#000'`). Requires `skinCustom: true`. */\n @Input() skinActive?: string;\n /** Custom skin background colour (e.g. `'#000'`). Requires `skinCustom: true`. */\n @Input() skinBackground?: string;\n /** Enable a custom skin via the API. */\n @Input() skinCustom?: boolean;\n /** Custom skin inactive colour (e.g. `'#000'`). Requires `skinCustom: true`. */\n @Input() skinInactive?: string;\n /** Show the playback speed selector. */\n @Input() speedSelector?: boolean;\n /** Play only a specific section of the video (e.g. `'10,30'`). */\n @Input() startEndTimespan?: string;\n /** Seek to a specific time (in seconds) before playback begins. */\n @Input() startTime?: string;\n /** Allow transcript download. */\n @Input() transcriptDownload?: boolean;\n /** Enable the settings menu on the control bar. */\n @Input() useSettingsMenu?: boolean;\n\n // ---------------------------------------------------------------------------\n // Inputs (styling)\n // ---------------------------------------------------------------------------\n\n /** Optional CSS class applied to the outer wrapper `<div>`. */\n @Input() cssClass?: string;\n\n // ---------------------------------------------------------------------------\n // Outputs (player events)\n // ---------------------------------------------------------------------------\n\n /** Emitted when playback starts or resumes. */\n readonly play = output<void>();\n /** Emitted when playback is paused. */\n readonly pause = output<void>();\n /** Emitted when the media finishes playing. */\n readonly ended = output<void>();\n /** Emitted when the current playback time changes. */\n readonly timeUpdate = output<ViostreamTimeUpdateData>();\n /** Emitted when the volume changes. */\n readonly volumeChange = output<ViostreamVolumeChangeData>();\n /** Emitted when a player error occurs. Named `playerError` to avoid conflict with the native DOM `error` event. */\n readonly playerError = output<ViostreamErrorData>();\n /** Emitted on buffering progress. */\n readonly progress = output<ViostreamProgressData>();\n /** Emitted when the player is ready. */\n readonly ready = output<void>();\n /** Emitted when a seek operation completes. */\n readonly seeked = output<void>();\n /** Emitted when metadata has loaded. */\n readonly loaded = output<void>();\n /** Emitted once the player is ready, providing the `ViostreamPlayer` instance for programmatic control. */\n readonly playerReady = output<ViostreamPlayer>();\n\n // ---------------------------------------------------------------------------\n // Internal state\n // ---------------------------------------------------------------------------\n\n /** Unique ID for the player container element. */\n readonly containerId = `viostream-player-${Math.random().toString(36).slice(2, 10)}`;\n\n /** SDK identifier stamped as a data attribute on the container. */\n readonly sdkTag = `${SDK_NAME}@${SDK_VERSION}`;\n\n /** Whether the player is still loading. */\n readonly isLoading = signal(true);\n\n /** Error message if loading failed. */\n readonly errorMsg = signal<string | undefined>(undefined);\n\n /** Reference to the container div. */\n private readonly containerRef = viewChild<ElementRef<HTMLDivElement>>('container');\n\n /** The wrapped player instance. */\n private player: ViostreamPlayer | undefined;\n\n /** Whether the component has been destroyed. */\n private destroyed = false;\n\n /** Unsubscribe functions for event listeners. */\n private readonly unsubscribers: Array<() => void> = [];\n\n /** Angular zone for triggering change detection. */\n private readonly ngZone = inject(NgZone);\n\n // ---------------------------------------------------------------------------\n // Lifecycle\n // ---------------------------------------------------------------------------\n\n ngOnInit(): void {\n this.init();\n }\n\n ngOnDestroy(): void {\n this.destroyed = true;\n this.unwireEvents();\n this.player?.destroy();\n this.player = undefined;\n }\n\n // ---------------------------------------------------------------------------\n // Private methods\n // ---------------------------------------------------------------------------\n\n private async init(): Promise<void> {\n try {\n const api = getViostreamApi();\n\n if (this.destroyed) return;\n\n const embedOpts = this.buildEmbedOptions();\n const raw: RawViostreamPlayerInstance = api.embed(\n this.publicKey,\n this.containerId,\n embedOpts,\n );\n const wrappedPlayer = wrapRawPlayer(raw, this.containerId);\n\n if (this.destroyed) {\n wrappedPlayer.destroy();\n return;\n }\n\n this.player = wrappedPlayer;\n\n // Run state updates inside NgZone to trigger change detection\n this.ngZone.run(() => {\n this.isLoading.set(false);\n });\n\n // Wire up event callbacks\n this.wireEvents(wrappedPlayer);\n\n // Notify consumer that the player is ready\n this.playerReady.emit(wrappedPlayer);\n } catch (err) {\n if (!this.destroyed) {\n this.ngZone.run(() => {\n this.errorMsg.set(err instanceof Error ? err.message : String(err));\n this.isLoading.set(false);\n });\n }\n }\n }\n\n private buildEmbedOptions(): ViostreamEmbedOptions {\n const opts: ViostreamEmbedOptions = {};\n if (this.chapters !== undefined) opts.chapters = this.chapters;\n if (this.chapterSlug !== undefined) opts.chapterSlug = this.chapterSlug;\n if (this.displayTitle !== undefined) opts.displayTitle = this.displayTitle;\n if (this.hlsQualitySelector !== undefined) opts.hlsQualitySelector = this.hlsQualitySelector;\n if (this.playerKey !== undefined) opts.playerKey = this.playerKey;\n if (this.playerStyle !== undefined) opts.playerStyle = this.playerStyle;\n if (this.sharing !== undefined) opts.sharing = this.sharing;\n if (this.skinActive !== undefined) opts.skinActive = this.skinActive;\n if (this.skinBackground !== undefined) opts.skinBackground = this.skinBackground;\n if (this.skinCustom !== undefined) opts.skinCustom = this.skinCustom;\n if (this.skinInactive !== undefined) opts.skinInactive = this.skinInactive;\n if (this.speedSelector !== undefined) opts.speedSelector = this.speedSelector;\n if (this.startEndTimespan !== undefined) opts.startEndTimespan = this.startEndTimespan;\n if (this.startTime !== undefined) opts.startTime = this.startTime;\n if (this.transcriptDownload !== undefined) opts.transcriptDownload = this.transcriptDownload;\n if (this.useSettingsMenu !== undefined) opts.useSettingsMenu = this.useSettingsMenu;\n return opts;\n }\n\n /** Maps raw player event names to component output emitters. */\n private readonly EVENT_MAP: Array<[string, ViostreamEventHandler]> = [\n ['play', () => this.ngZone.run(() => this.play.emit())],\n ['pause', () => this.ngZone.run(() => this.pause.emit())],\n ['ended', () => this.ngZone.run(() => this.ended.emit())],\n ['timeupdate', (data: unknown) => this.ngZone.run(() => this.timeUpdate.emit(data as ViostreamTimeUpdateData))],\n ['volumechange', (data: unknown) => this.ngZone.run(() => this.volumeChange.emit(data as ViostreamVolumeChangeData))],\n ['error', (data: unknown) => this.ngZone.run(() => this.playerError.emit(data as ViostreamErrorData))],\n ['progress', (data: unknown) => this.ngZone.run(() => this.progress.emit(data as ViostreamProgressData))],\n ['ready', () => this.ngZone.run(() => this.ready.emit())],\n ['seeked', () => this.ngZone.run(() => this.seeked.emit())],\n ['loaded', () => this.ngZone.run(() => this.loaded.emit())],\n ];\n\n private wireEvents(wrappedPlayer: ViostreamPlayer): void {\n for (const [eventName, handler] of this.EVENT_MAP) {\n const unsub = wrappedPlayer.on(eventName, handler);\n this.unsubscribers.push(unsub);\n }\n }\n\n private unwireEvents(): void {\n for (const unsub of this.unsubscribers) {\n unsub();\n }\n this.unsubscribers.length = 0;\n }\n}\n","/**\n * @viostream/viostream-player-angular\n *\n * Angular 17+ SDK for the Viostream video player.\n *\n * @example Component usage\n * ```ts\n * import { ViostreamPlayerComponent } from '@viostream/viostream-player-angular';\n *\n * @Component({\n * selector: 'app-root',\n * standalone: true,\n * imports: [ViostreamPlayerComponent],\n * template: `\n * <viostream-player\n * [accountKey]=\"'vc-100100100'\"\n * [publicKey]=\"'nhedxonrxsyfee'\"\n * [displayTitle]=\"true\"\n * (play)=\"onPlay()\"\n * />\n * `,\n * })\n * export class AppComponent {\n * onPlay() {\n * console.log('playing');\n * }\n * }\n * ```\n *\n * @example Headless / programmatic usage\n * ```ts\n * import { createViostreamPlayer } from '@viostream/viostream-player-angular';\n *\n * const player = await createViostreamPlayer({\n * accountKey: 'vc-100100100',\n * publicKey: 'nhedxonrxsyfee',\n * target: 'my-video-div'\n * });\n *\n * player.play();\n * const time = await player.getCurrentTime();\n * player.on('ended', () => console.log('done'));\n * ```\n */\n\n// Component\nexport { ViostreamPlayerComponent } from './viostream-player.component';\n\n// Re-export everything from core so consumers can import from this package\nexport {\n createViostreamPlayer,\n loadViostream,\n} from '@viostream/viostream-player-core';\n\nexport type {\n CreateViostreamPlayerOptions,\n ViostreamEmbedOptions,\n ViostreamTimeUpdateData,\n ViostreamVolumeChangeData,\n ViostreamErrorData,\n ViostreamProgressData,\n ViostreamPlayerEventMap,\n ViostreamEventHandler,\n ViostreamPlayer as ViostreamPlayerInstance,\n} from '@viostream/viostream-player-core';\n\n// Angular-specific types\nexport type {\n ViostreamPlayerInputs,\n ViostreamPlayerEventProps,\n} from './types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;AACO,MAAM,QAAQ,GAAG,0BAA0B;AAC3C,MAAM,WAAW,GAAG,OAAO;;ACFlC;;;;;;;;;;;;;;;AAeG;MAmDU,wBAAwB,CAAA;;;;;AAMR,IAAA,UAAU;;AAEV,IAAA,SAAS;;;;;AAO3B,IAAA,QAAQ;;AAER,IAAA,WAAW;;AAEX,IAAA,YAAY;;AAEZ,IAAA,kBAAkB;;AAElB,IAAA,SAAS;;AAET,IAAA,WAAW;;AAEX,IAAA,OAAO;;AAEP,IAAA,UAAU;;AAEV,IAAA,cAAc;;AAEd,IAAA,UAAU;;AAEV,IAAA,YAAY;;AAEZ,IAAA,aAAa;;AAEb,IAAA,gBAAgB;;AAEhB,IAAA,SAAS;;AAET,IAAA,kBAAkB;;AAElB,IAAA,eAAe;;;;;AAOf,IAAA,QAAQ;;;;;IAOR,IAAI,GAAG,MAAM,EAA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AE;gBAEE,SAAS,EAAA,CAAA;sBAAnC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAOhB,QAAQ,EAAA,CAAA;sBAAhB;gBAEQ,WAAW,EAAA,CAAA;sBAAnB;gBAEQ,YAAY,EAAA,CAAA;sBAApB;gBAEQ,kBAAkB,EAAA,CAAA;sBAA1B;gBAEQ,SAAS,EAAA,CAAA;sBAAjB;gBAEQ,WAAW,EAAA,CAAA;sBAAnB;gBAEQ,OAAO,EAAA,CAAA;sBAAf;gBAEQ,UAAU,EAAA,CAAA;sBAAlB;gBAEQ,cAAc,EAAA,CAAA;sBAAtB;gBAEQ,UAAU,EAAA,CAAA;sBAAlB;gBAEQ,YAAY,EAAA,CAAA;sBAApB;gBAEQ,aAAa,EAAA,CAAA;sBAArB;gBAEQ,gBAAgB,EAAA,CAAA;sBAAxB;gBAEQ,SAAS,EAAA,CAAA;sBAAjB;gBAEQ,kBAAkB,EAAA,CAAA;sBAA1B;gBAEQ,eAAe,EAAA,CAAA;sBAAvB;gBAOQ,QAAQ,EAAA,CAAA;sBAAhB;;;ACtHH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CG;AAEH;;AC7CA;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viostream/viostream-player-angular",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Angular 17+ SDK for the Viostream video player — embed, control, and listen to player events",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "type": "module",
10
10
  "dependencies": {
11
- "@viostream/viostream-player-core": "^0.2.4",
11
+ "@viostream/viostream-player-core": "^0.2.6",
12
12
  "tslib": "^2.8.0"
13
13
  },
14
14
  "peerDependencies": {
package/version.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare const SDK_NAME = "viostream-player-angular";
2
+ export declare const SDK_VERSION = "0.1.7";
@@ -80,6 +80,8 @@ export declare class ViostreamPlayerComponent implements OnInit, OnDestroy {
80
80
  readonly playerReady: import("@angular/core").OutputEmitterRef<ViostreamPlayer>;
81
81
  /** Unique ID for the player container element. */
82
82
  readonly containerId: string;
83
+ /** SDK identifier stamped as a data attribute on the container. */
84
+ readonly sdkTag = "viostream-player-angular@0.1.7";
83
85
  /** Whether the player is still loading. */
84
86
  readonly isLoading: import("@angular/core").WritableSignal<boolean>;
85
87
  /** Error message if loading failed. */