@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.
- package/dist/embed.audio.js +5 -0
- package/dist/embed.audio.js.map +1 -1
- package/dist/embed.audio.umd.cjs +1 -1
- package/dist/embed.audio.umd.cjs.map +1 -1
- package/dist/embed.js +35 -11
- package/dist/embed.js.map +1 -1
- package/dist/embed.umd.cjs +1 -1
- package/dist/embed.umd.cjs.map +1 -1
- package/dist/embed.video.js +35 -11
- package/dist/embed.video.js.map +1 -1
- package/dist/embed.video.umd.cjs +1 -1
- package/dist/embed.video.umd.cjs.map +1 -1
- package/package.json +10 -10
package/dist/embed.audio.js
CHANGED
|
@@ -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) {
|