@scarlett-player/hls 1.0.1 → 1.0.2

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.
@@ -282,6 +282,11 @@ function setupVideoEventHandlers(video, api) {
282
282
  api.setState("duration", video.duration);
283
283
  api.setState("mediaType", video.videoWidth > 0 ? "video" : "audio");
284
284
  });
285
+ addHandler("loadeddata", () => {
286
+ if (video.videoWidth > 0) {
287
+ api.setState("mediaType", "video");
288
+ }
289
+ });
285
290
  addHandler("error", () => {
286
291
  const error = video.error;
287
292
  if (error) {
package/dist/index.cjs CHANGED
@@ -371,6 +371,11 @@ function setupVideoEventHandlers(video, api) {
371
371
  api.setState("duration", video.duration);
372
372
  api.setState("mediaType", video.videoWidth > 0 ? "video" : "audio");
373
373
  });
374
+ addHandler("loadeddata", () => {
375
+ if (video.videoWidth > 0) {
376
+ api.setState("mediaType", "video");
377
+ }
378
+ });
374
379
  addHandler("error", () => {
375
380
  const error = video.error;
376
381
  if (error) {
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  mapLevels,
5
5
  setupHlsEventHandlers,
6
6
  setupVideoEventHandlers
7
- } from "./chunk-OEPNMGNQ.js";
7
+ } from "./chunk-MLOYPPFI.js";
8
8
 
9
9
  // src/hls-loader.ts
10
10
  var hlsConstructor = null;
package/dist/light.cjs CHANGED
@@ -359,6 +359,11 @@ function setupVideoEventHandlers(video, api) {
359
359
  api.setState("duration", video.duration);
360
360
  api.setState("mediaType", video.videoWidth > 0 ? "video" : "audio");
361
361
  });
362
+ addHandler("loadeddata", () => {
363
+ if (video.videoWidth > 0) {
364
+ api.setState("mediaType", "video");
365
+ }
366
+ });
362
367
  addHandler("error", () => {
363
368
  const error = video.error;
364
369
  if (error) {
package/dist/light.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  mapLevels,
4
4
  setupHlsEventHandlers,
5
5
  setupVideoEventHandlers
6
- } from "./chunk-OEPNMGNQ.js";
6
+ } from "./chunk-MLOYPPFI.js";
7
7
 
8
8
  // src/hls-loader-light.ts
9
9
  var hlsConstructor = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scarlett-player/hls",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "HLS Provider Plugin for Scarlett Player",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -22,7 +22,7 @@
22
22
  "dist"
23
23
  ],
24
24
  "peerDependencies": {
25
- "@scarlett-player/core": "^1.0.1",
25
+ "@scarlett-player/core": "^1.0.2",
26
26
  "hls.js": "^1.5.0"
27
27
  },
28
28
  "peerDependenciesMeta": {
@@ -37,7 +37,7 @@
37
37
  "vitest": "^1.6.0",
38
38
  "@vitest/coverage-v8": "^1.6.0",
39
39
  "jsdom": "^24.0.0",
40
- "@scarlett-player/core": "1.0.1"
40
+ "@scarlett-player/core": "1.0.2"
41
41
  },
42
42
  "keywords": [
43
43
  "video",