@scarlett-player/embed 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.
@@ -277,6 +277,11 @@ function setupVideoEventHandlers(video, api) {
277
277
  api.setState("duration", video.duration);
278
278
  api.setState("mediaType", video.videoWidth > 0 ? "video" : "audio");
279
279
  });
280
+ addHandler("loadeddata", () => {
281
+ if (video.videoWidth > 0) {
282
+ api.setState("mediaType", "video");
283
+ }
284
+ });
280
285
  addHandler("error", () => {
281
286
  const error = video.error;
282
287
  if (error) {