@viostream/viostream-player-angular 0.1.7 → 0.1.9

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/README.md CHANGED
@@ -102,6 +102,7 @@ All embed option inputs are optional and passed directly to the Viostream embed
102
102
  | `startTime` | `string` | Seek to a time (seconds) before playback. |
103
103
  | `transcriptDownload` | `boolean` | Allow transcript download. Default: `false`. |
104
104
  | `useSettingsMenu` | `boolean` | Enable the settings menu on the control bar. Default: `false`. |
105
+ | `forceAspectRatio` | `number` | Force a specific aspect ratio (e.g. `1.7778` for 16:9). Disables dynamic sizing. Must be a finite positive number; invalid values are ignored. |
105
106
 
106
107
  #### Other Inputs
107
108
 
@@ -1,11 +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 { getViostreamApi, wrapRawPlayer } from '@viostream/viostream-player-core';
3
+ import Debug from 'debug';
4
+ import { getViostreamApi, normalizeForceAspectRatio, wrapRawPlayer } from '@viostream/viostream-player-core';
4
5
  export { createViostreamPlayer, loadViostream } from '@viostream/viostream-player-core';
5
6
 
6
7
  // Auto-generated by scripts/sync-version.mjs — do not edit
7
8
  const SDK_NAME = 'viostream-player-angular';
8
- const SDK_VERSION = '0.1.7';
9
+ const SDK_VERSION = '0.1.9';
9
10
 
10
11
  /**
11
12
  * ViostreamPlayerComponent — Angular standalone component that embeds a Viostream video player.
@@ -23,6 +24,7 @@ const SDK_VERSION = '0.1.7';
23
24
  * />
24
25
  * ```
25
26
  */
27
+ const debug = Debug('viostream:angular');
26
28
  class ViostreamPlayerComponent {
27
29
  // ---------------------------------------------------------------------------
28
30
  // Inputs (required)
@@ -66,6 +68,8 @@ class ViostreamPlayerComponent {
66
68
  transcriptDownload;
67
69
  /** Enable the settings menu on the control bar. */
68
70
  useSettingsMenu;
71
+ /** Force a specific aspect ratio for the player container (e.g., `1.7778` for 16:9). */
72
+ forceAspectRatio;
69
73
  // ---------------------------------------------------------------------------
70
74
  // Inputs (styling)
71
75
  // ---------------------------------------------------------------------------
@@ -121,9 +125,11 @@ class ViostreamPlayerComponent {
121
125
  // Lifecycle
122
126
  // ---------------------------------------------------------------------------
123
127
  ngOnInit() {
128
+ debug('ngOnInit publicKey=%s accountKey=%s containerId=%s', this.publicKey, this.accountKey, this.containerId);
124
129
  this.init();
125
130
  }
126
131
  ngOnDestroy() {
132
+ debug('ngOnDestroy publicKey=%s hasPlayer=%s', this.publicKey, !!this.player);
127
133
  this.destroyed = true;
128
134
  this.unwireEvents();
129
135
  this.player?.destroy();
@@ -134,13 +140,20 @@ class ViostreamPlayerComponent {
134
140
  // ---------------------------------------------------------------------------
135
141
  async init() {
136
142
  try {
143
+ debug('init: getting embed API');
137
144
  const api = getViostreamApi();
138
- if (this.destroyed)
145
+ if (this.destroyed) {
146
+ debug('init: destroyed detected after getViostreamApi — aborting publicKey=%s', this.publicKey);
139
147
  return;
148
+ }
140
149
  const embedOpts = this.buildEmbedOptions();
141
- const raw = api.embed(this.publicKey, this.containerId, embedOpts);
150
+ debug('init: calling api.embed publicKey=%s containerId=%s options=%o', this.publicKey, this.containerId, embedOpts);
151
+ const raw = api.embed(this.publicKey, this.containerId, embedOpts, normalizeForceAspectRatio(this.forceAspectRatio));
152
+ debug('init: api.embed returned raw player');
142
153
  const wrappedPlayer = wrapRawPlayer(raw, this.containerId);
154
+ debug('init: wrapRawPlayer completed containerId=%s', this.containerId);
143
155
  if (this.destroyed) {
156
+ debug('init: destroyed detected after wrapRawPlayer — destroying and aborting publicKey=%s', this.publicKey);
144
157
  wrappedPlayer.destroy();
145
158
  return;
146
159
  }
@@ -149,18 +162,25 @@ class ViostreamPlayerComponent {
149
162
  this.ngZone.run(() => {
150
163
  this.isLoading.set(false);
151
164
  });
165
+ debug('init: player set, isLoading -> false publicKey=%s', this.publicKey);
152
166
  // Wire up event callbacks
153
167
  this.wireEvents(wrappedPlayer);
154
168
  // Notify consumer that the player is ready
169
+ debug('init: emitting playerReady publicKey=%s', this.publicKey);
155
170
  this.playerReady.emit(wrappedPlayer);
156
171
  }
157
172
  catch (err) {
158
173
  if (!this.destroyed) {
174
+ const msg = err instanceof Error ? err.message : String(err);
175
+ debug('init: error caught publicKey=%s error=%s', this.publicKey, msg);
159
176
  this.ngZone.run(() => {
160
- this.errorMsg.set(err instanceof Error ? err.message : String(err));
177
+ this.errorMsg.set(msg);
161
178
  this.isLoading.set(false);
162
179
  });
163
180
  }
181
+ else {
182
+ debug('init: error caught but destroyed — ignoring publicKey=%s', this.publicKey);
183
+ }
164
184
  }
165
185
  }
166
186
  buildEmbedOptions() {
@@ -213,19 +233,23 @@ class ViostreamPlayerComponent {
213
233
  ['loaded', () => this.ngZone.run(() => this.loaded.emit())],
214
234
  ];
215
235
  wireEvents(wrappedPlayer) {
236
+ const wiredEvents = [];
216
237
  for (const [eventName, handler] of this.EVENT_MAP) {
217
238
  const unsub = wrappedPlayer.on(eventName, handler);
218
239
  this.unsubscribers.push(unsub);
240
+ wiredEvents.push(eventName);
219
241
  }
242
+ debug('wireEvents: subscribed to [%s]', wiredEvents.join(', '));
220
243
  }
221
244
  unwireEvents() {
245
+ debug('unwireEvents: unsubscribing %d events', this.unsubscribers.length);
222
246
  for (const unsub of this.unsubscribers) {
223
247
  unsub();
224
248
  }
225
249
  this.unsubscribers.length = 0;
226
250
  }
227
251
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ViostreamPlayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
228
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: ViostreamPlayerComponent, isStandalone: true, selector: "viostream-player", inputs: { accountKey: "accountKey", publicKey: "publicKey", chapters: "chapters", chapterSlug: "chapterSlug", displayTitle: "displayTitle", hlsQualitySelector: "hlsQualitySelector", playerKey: "playerKey", playerStyle: "playerStyle", sharing: "sharing", skinActive: "skinActive", skinBackground: "skinBackground", skinCustom: "skinCustom", skinInactive: "skinInactive", speedSelector: "speedSelector", startEndTimespan: "startEndTimespan", startTime: "startTime", transcriptDownload: "transcriptDownload", useSettingsMenu: "useSettingsMenu", cssClass: "cssClass" }, outputs: { play: "play", pause: "pause", ended: "ended", timeUpdate: "timeUpdate", volumeChange: "volumeChange", playerError: "playerError", progress: "progress", ready: "ready", seeked: "seeked", loaded: "loaded", playerReady: "playerReady" }, viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true, isSignal: true }], ngImport: i0, template: `
252
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: ViostreamPlayerComponent, isStandalone: true, selector: "viostream-player", inputs: { accountKey: "accountKey", publicKey: "publicKey", chapters: "chapters", chapterSlug: "chapterSlug", displayTitle: "displayTitle", hlsQualitySelector: "hlsQualitySelector", playerKey: "playerKey", playerStyle: "playerStyle", sharing: "sharing", skinActive: "skinActive", skinBackground: "skinBackground", skinCustom: "skinCustom", skinInactive: "skinInactive", speedSelector: "speedSelector", startEndTimespan: "startEndTimespan", startTime: "startTime", transcriptDownload: "transcriptDownload", useSettingsMenu: "useSettingsMenu", forceAspectRatio: "forceAspectRatio", cssClass: "cssClass" }, outputs: { play: "play", pause: "pause", ended: "ended", timeUpdate: "timeUpdate", volumeChange: "volumeChange", playerError: "playerError", progress: "progress", ready: "ready", seeked: "seeked", loaded: "loaded", playerReady: "playerReady" }, viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true, isSignal: true }], ngImport: i0, template: `
229
253
  <div
230
254
  #container
231
255
  [id]="containerId"
@@ -310,6 +334,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
310
334
  type: Input
311
335
  }], useSettingsMenu: [{
312
336
  type: Input
337
+ }], forceAspectRatio: [{
338
+ type: Input
313
339
  }], cssClass: [{
314
340
  type: Input
315
341
  }] } });
@@ -1 +1 @@
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,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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EQ,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;;;;"}
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.9';\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 Debug from 'debug';\nimport { getViostreamApi, wrapRawPlayer, normalizeForceAspectRatio } 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\nconst debug = Debug('viostream:angular');\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 /** Force a specific aspect ratio for the player container (e.g., `1.7778` for 16:9). */\n @Input() forceAspectRatio?: number;\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 debug('ngOnInit publicKey=%s accountKey=%s containerId=%s', this.publicKey, this.accountKey, this.containerId);\n this.init();\n }\n\n ngOnDestroy(): void {\n debug('ngOnDestroy publicKey=%s hasPlayer=%s', this.publicKey, !!this.player);\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 debug('init: getting embed API');\n const api = getViostreamApi();\n\n if (this.destroyed) {\n debug('init: destroyed detected after getViostreamApi — aborting publicKey=%s', this.publicKey);\n return;\n }\n\n const embedOpts = this.buildEmbedOptions();\n debug('init: calling api.embed publicKey=%s containerId=%s options=%o', this.publicKey, this.containerId, embedOpts);\n const raw: RawViostreamPlayerInstance = api.embed(\n this.publicKey,\n this.containerId,\n embedOpts,\n normalizeForceAspectRatio(this.forceAspectRatio),\n );\n debug('init: api.embed returned raw player');\n\n const wrappedPlayer = wrapRawPlayer(raw, this.containerId);\n debug('init: wrapRawPlayer completed containerId=%s', this.containerId);\n\n if (this.destroyed) {\n debug('init: destroyed detected after wrapRawPlayer — destroying and aborting publicKey=%s', this.publicKey);\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 debug('init: player set, isLoading -> false publicKey=%s', this.publicKey);\n\n // Wire up event callbacks\n this.wireEvents(wrappedPlayer);\n\n // Notify consumer that the player is ready\n debug('init: emitting playerReady publicKey=%s', this.publicKey);\n this.playerReady.emit(wrappedPlayer);\n } catch (err) {\n if (!this.destroyed) {\n const msg = err instanceof Error ? err.message : String(err);\n debug('init: error caught publicKey=%s error=%s', this.publicKey, msg);\n this.ngZone.run(() => {\n this.errorMsg.set(msg);\n this.isLoading.set(false);\n });\n } else {\n debug('init: error caught but destroyed — ignoring publicKey=%s', this.publicKey);\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 const wiredEvents: string[] = [];\n for (const [eventName, handler] of this.EVENT_MAP) {\n const unsub = wrappedPlayer.on(eventName, handler);\n this.unsubscribers.push(unsub);\n wiredEvents.push(eventName);\n }\n debug('wireEvents: subscribed to [%s]', wiredEvents.join(', '));\n }\n\n private unwireEvents(): void {\n debug('unwireEvents: unsubscribing %d events', this.unsubscribers.length);\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;AA4BH,MAAM,KAAK,GAAG,KAAK,CAAC,mBAAmB,CAAC;MA0B3B,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;;AAEf,IAAA,gBAAgB;;;;;AAOhB,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,EAAs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A,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;gBAEQ,gBAAgB,EAAA,CAAA;sBAAxB;gBAOQ,QAAQ,EAAA,CAAA;sBAAhB;;;AC3HH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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.7",
3
+ "version": "0.1.9",
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,8 @@
8
8
  },
9
9
  "type": "module",
10
10
  "dependencies": {
11
- "@viostream/viostream-player-core": "^0.2.6",
11
+ "@viostream/viostream-player-core": "^0.2.8",
12
+ "debug": "^4.4.3",
12
13
  "tslib": "^2.8.0"
13
14
  },
14
15
  "peerDependencies": {
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export declare const SDK_NAME = "viostream-player-angular";
2
- export declare const SDK_VERSION = "0.1.7";
2
+ export declare const SDK_VERSION = "0.1.9";
@@ -54,6 +54,8 @@ export declare class ViostreamPlayerComponent implements OnInit, OnDestroy {
54
54
  transcriptDownload?: boolean;
55
55
  /** Enable the settings menu on the control bar. */
56
56
  useSettingsMenu?: boolean;
57
+ /** Force a specific aspect ratio for the player container (e.g., `1.7778` for 16:9). */
58
+ forceAspectRatio?: number;
57
59
  /** Optional CSS class applied to the outer wrapper `<div>`. */
58
60
  cssClass?: string;
59
61
  /** Emitted when playback starts or resumes. */
@@ -81,7 +83,7 @@ export declare class ViostreamPlayerComponent implements OnInit, OnDestroy {
81
83
  /** Unique ID for the player container element. */
82
84
  readonly containerId: string;
83
85
  /** SDK identifier stamped as a data attribute on the container. */
84
- readonly sdkTag = "viostream-player-angular@0.1.7";
86
+ readonly sdkTag = "viostream-player-angular@0.1.9";
85
87
  /** Whether the player is still loading. */
86
88
  readonly isLoading: import("@angular/core").WritableSignal<boolean>;
87
89
  /** Error message if loading failed. */
@@ -105,5 +107,5 @@ export declare class ViostreamPlayerComponent implements OnInit, OnDestroy {
105
107
  private wireEvents;
106
108
  private unwireEvents;
107
109
  static ɵfac: i0.ɵɵFactoryDeclaration<ViostreamPlayerComponent, never>;
108
- static ɵcmp: i0.ɵɵComponentDeclaration<ViostreamPlayerComponent, "viostream-player", never, { "accountKey": { "alias": "accountKey"; "required": true; }; "publicKey": { "alias": "publicKey"; "required": true; }; "chapters": { "alias": "chapters"; "required": false; }; "chapterSlug": { "alias": "chapterSlug"; "required": false; }; "displayTitle": { "alias": "displayTitle"; "required": false; }; "hlsQualitySelector": { "alias": "hlsQualitySelector"; "required": false; }; "playerKey": { "alias": "playerKey"; "required": false; }; "playerStyle": { "alias": "playerStyle"; "required": false; }; "sharing": { "alias": "sharing"; "required": false; }; "skinActive": { "alias": "skinActive"; "required": false; }; "skinBackground": { "alias": "skinBackground"; "required": false; }; "skinCustom": { "alias": "skinCustom"; "required": false; }; "skinInactive": { "alias": "skinInactive"; "required": false; }; "speedSelector": { "alias": "speedSelector"; "required": false; }; "startEndTimespan": { "alias": "startEndTimespan"; "required": false; }; "startTime": { "alias": "startTime"; "required": false; }; "transcriptDownload": { "alias": "transcriptDownload"; "required": false; }; "useSettingsMenu": { "alias": "useSettingsMenu"; "required": false; }; "cssClass": { "alias": "cssClass"; "required": false; }; }, { "play": "play"; "pause": "pause"; "ended": "ended"; "timeUpdate": "timeUpdate"; "volumeChange": "volumeChange"; "playerError": "playerError"; "progress": "progress"; "ready": "ready"; "seeked": "seeked"; "loaded": "loaded"; "playerReady": "playerReady"; }, never, ["[loading]"], true, never>;
110
+ static ɵcmp: i0.ɵɵComponentDeclaration<ViostreamPlayerComponent, "viostream-player", never, { "accountKey": { "alias": "accountKey"; "required": true; }; "publicKey": { "alias": "publicKey"; "required": true; }; "chapters": { "alias": "chapters"; "required": false; }; "chapterSlug": { "alias": "chapterSlug"; "required": false; }; "displayTitle": { "alias": "displayTitle"; "required": false; }; "hlsQualitySelector": { "alias": "hlsQualitySelector"; "required": false; }; "playerKey": { "alias": "playerKey"; "required": false; }; "playerStyle": { "alias": "playerStyle"; "required": false; }; "sharing": { "alias": "sharing"; "required": false; }; "skinActive": { "alias": "skinActive"; "required": false; }; "skinBackground": { "alias": "skinBackground"; "required": false; }; "skinCustom": { "alias": "skinCustom"; "required": false; }; "skinInactive": { "alias": "skinInactive"; "required": false; }; "speedSelector": { "alias": "speedSelector"; "required": false; }; "startEndTimespan": { "alias": "startEndTimespan"; "required": false; }; "startTime": { "alias": "startTime"; "required": false; }; "transcriptDownload": { "alias": "transcriptDownload"; "required": false; }; "useSettingsMenu": { "alias": "useSettingsMenu"; "required": false; }; "forceAspectRatio": { "alias": "forceAspectRatio"; "required": false; }; "cssClass": { "alias": "cssClass"; "required": false; }; }, { "play": "play"; "pause": "pause"; "ended": "ended"; "timeUpdate": "timeUpdate"; "volumeChange": "volumeChange"; "playerError": "playerError"; "progress": "progress"; "ready": "ready"; "seeked": "seeked"; "loaded": "loaded"; "playerReady": "playerReady"; }, never, ["[loading]"], true, never>;
109
111
  }