@thestatic-tv/dcl-sdk 2.5.4 → 2.5.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.
- package/dist/index.js +12 -11
- package/dist/index.mjs +13 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3793,18 +3793,19 @@ var StaticTVClient = class {
|
|
|
3793
3793
|
this._clearVerificationTimeout();
|
|
3794
3794
|
this._streamVerified = false;
|
|
3795
3795
|
if (import_ecs3.VideoPlayer.has(screen)) {
|
|
3796
|
-
import_ecs3.VideoPlayer.
|
|
3796
|
+
const player = import_ecs3.VideoPlayer.getMutable(screen);
|
|
3797
|
+
player.src = url;
|
|
3798
|
+
player.playing = true;
|
|
3799
|
+
player.loop = isFallback;
|
|
3800
|
+
player.volume = 1;
|
|
3801
|
+
} else {
|
|
3802
|
+
import_ecs3.VideoPlayer.create(screen, {
|
|
3803
|
+
src: url,
|
|
3804
|
+
playing: true,
|
|
3805
|
+
loop: isFallback,
|
|
3806
|
+
volume: 1
|
|
3807
|
+
});
|
|
3797
3808
|
}
|
|
3798
|
-
import_ecs3.VideoPlayer.create(screen, {
|
|
3799
|
-
src: url,
|
|
3800
|
-
playing: true,
|
|
3801
|
-
loop: isFallback,
|
|
3802
|
-
// Loop fallback videos
|
|
3803
|
-
volume: 1
|
|
3804
|
-
});
|
|
3805
|
-
import_ecs3.Material.setBasicMaterial(screen, {
|
|
3806
|
-
texture: import_ecs3.Material.Texture.Video({ videoPlayerEntity: screen })
|
|
3807
|
-
});
|
|
3808
3809
|
if (!this._videoEventsRegistered) {
|
|
3809
3810
|
this._registerVideoEvents();
|
|
3810
3811
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -3449,7 +3449,7 @@ function setupStaticUI(client) {
|
|
|
3449
3449
|
}
|
|
3450
3450
|
|
|
3451
3451
|
// src/StaticTVClient.ts
|
|
3452
|
-
import { VideoPlayer,
|
|
3452
|
+
import { VideoPlayer, videoEventsSystem, VideoState } from "@dcl/sdk/ecs";
|
|
3453
3453
|
import * as utils from "@dcl-sdk/utils";
|
|
3454
3454
|
var DEFAULT_BASE_URL = "https://thestatic.tv/api/v1/dcl";
|
|
3455
3455
|
var DEFAULT_FALLBACK_VIDEO = "https://media.thestatic.tv/fallback-loop.mp4";
|
|
@@ -3750,18 +3750,19 @@ var StaticTVClient = class {
|
|
|
3750
3750
|
this._clearVerificationTimeout();
|
|
3751
3751
|
this._streamVerified = false;
|
|
3752
3752
|
if (VideoPlayer.has(screen)) {
|
|
3753
|
-
VideoPlayer.
|
|
3753
|
+
const player = VideoPlayer.getMutable(screen);
|
|
3754
|
+
player.src = url;
|
|
3755
|
+
player.playing = true;
|
|
3756
|
+
player.loop = isFallback;
|
|
3757
|
+
player.volume = 1;
|
|
3758
|
+
} else {
|
|
3759
|
+
VideoPlayer.create(screen, {
|
|
3760
|
+
src: url,
|
|
3761
|
+
playing: true,
|
|
3762
|
+
loop: isFallback,
|
|
3763
|
+
volume: 1
|
|
3764
|
+
});
|
|
3754
3765
|
}
|
|
3755
|
-
VideoPlayer.create(screen, {
|
|
3756
|
-
src: url,
|
|
3757
|
-
playing: true,
|
|
3758
|
-
loop: isFallback,
|
|
3759
|
-
// Loop fallback videos
|
|
3760
|
-
volume: 1
|
|
3761
|
-
});
|
|
3762
|
-
Material.setBasicMaterial(screen, {
|
|
3763
|
-
texture: Material.Texture.Video({ videoPlayerEntity: screen })
|
|
3764
|
-
});
|
|
3765
3766
|
if (!this._videoEventsRegistered) {
|
|
3766
3767
|
this._registerVideoEvents();
|
|
3767
3768
|
}
|
package/package.json
CHANGED