@viostream/viostream-player-svelte 0.2.4 → 0.2.6

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.
@@ -25,7 +25,7 @@
25
25
  -->
26
26
  <script lang="ts">
27
27
  import { onMount, type Snippet } from 'svelte';
28
- import { loadViostream, wrapRawPlayer } from '@viostream/viostream-player-core';
28
+ import { getViostreamApi, wrapRawPlayer } from '@viostream/viostream-player-core';
29
29
  import type {
30
30
  ViostreamEmbedOptions,
31
31
  ViostreamPlayer,
@@ -33,6 +33,7 @@
33
33
  ViostreamEventHandler,
34
34
  } from '@viostream/viostream-player-core';
35
35
  import type { ViostreamPlayerProps } from './types.js';
36
+ import { SDK_NAME, SDK_VERSION } from './version.js';
36
37
 
37
38
  let {
38
39
  // Required props
@@ -137,7 +138,7 @@
137
138
 
138
139
  async function init() {
139
140
  try {
140
- const api = await loadViostream(accountKey);
141
+ const api = getViostreamApi();
141
142
 
142
143
  if (destroyed) return;
143
144
 
@@ -213,6 +214,7 @@
213
214
  bind:this={containerEl}
214
215
  data-viostream-player
215
216
  data-viostream-public-key={publicKey}
217
+ data-viostream-sdk={`${SDK_NAME}@${SDK_VERSION}`}
216
218
  >
217
219
  {#if isLoading}
218
220
  {#if loadingSnippet}
@@ -0,0 +1,2 @@
1
+ export declare const SDK_NAME = "viostream-player-svelte";
2
+ export declare const SDK_VERSION = "0.2.6";
@@ -0,0 +1,3 @@
1
+ // Auto-generated by scripts/sync-version.mjs — do not edit
2
+ export const SDK_NAME = 'viostream-player-svelte';
3
+ export const SDK_VERSION = '0.2.6';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viostream/viostream-player-svelte",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "Svelte 5 SDK for the Viostream video player — embed, control, and listen to player events",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -8,6 +8,7 @@
8
8
  },
9
9
  "type": "module",
10
10
  "scripts": {
11
+ "prebuild": "node ../../scripts/sync-version.mjs src/lib/version.ts",
11
12
  "package": "svelte-kit sync && svelte-package && publint",
12
13
  "build": "npm run package",
13
14
  "prepublishOnly": "npm run package",
@@ -30,7 +31,7 @@
30
31
  "!dist/**/*.spec.*"
31
32
  ],
32
33
  "dependencies": {
33
- "@viostream/viostream-player-core": "^0.2.4"
34
+ "@viostream/viostream-player-core": "^0.2.6"
34
35
  },
35
36
  "peerDependencies": {
36
37
  "svelte": "^5.0.0"