@thestatic-tv/dcl-sdk 2.2.2 → 2.2.4

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 CHANGED
@@ -616,10 +616,10 @@ var UI_DIMENSIONS = {
616
616
  padding: 15
617
617
  }
618
618
  },
619
- // Chat UI
619
+ // Chat UI - match m1d-hq-lifted dimensions
620
620
  chat: {
621
- width: 340,
622
- height: 480,
621
+ width: 380,
622
+ height: 580,
623
623
  bottom: 55,
624
624
  right: 20,
625
625
  messagesPerPage: 5,
@@ -900,12 +900,15 @@ var GuideUIModule = class {
900
900
  if (data.videoMap) {
901
901
  for (const [slug, video] of Object.entries(data.videoMap)) {
902
902
  const v = video;
903
+ const src = v.src || v.liveStreamUrl || "";
903
904
  const mapped = {
904
905
  id: v.id || slug,
905
906
  name: v.name || v.title || "Unknown",
906
- src: v.src || v.liveStreamUrl || "",
907
- isLive: v.isLive === true || v.type === "live",
908
- isCreator: v.isCreator || v.type === "live",
907
+ src,
908
+ // isLive = actually streaming live (not just a creator channel)
909
+ isLive: v.isLive === true || src.includes("media.thestatic.tv"),
910
+ // isCreator = creator channel (type === 'live' means creator, not actually live)
911
+ isCreator: v.isCreator === true || v.type === "live",
909
912
  channelId: v.channelId || slug,
910
913
  duration: v.duration,
911
914
  requiresAuth: v.requiresAuth
@@ -919,6 +922,7 @@ var GuideUIModule = class {
919
922
  const playlists = [];
920
923
  if (data.featuredPlaylists) {
921
924
  for (const pl of data.featuredPlaylists) {
925
+ if (pl.name === "NODES") continue;
922
926
  playlists.push({
923
927
  name: pl.name,
924
928
  videos: (pl.videos || []).map((v) => ({
@@ -934,6 +938,10 @@ var GuideUIModule = class {
934
938
  });
935
939
  }
936
940
  }
941
+ const nodeVideos = videos.filter((v) => v.isCreator);
942
+ if (nodeVideos.length > 0) {
943
+ playlists.push({ name: "NODES", videos: nodeVideos });
944
+ }
937
945
  this.videos = videos;
938
946
  this.liveVideos = liveVideos;
939
947
  this.featuredPlaylists = playlists;
@@ -1736,16 +1744,14 @@ var ChatUIModule = class {
1736
1744
  }
1737
1745
  }
1738
1746
  getPositionStyle() {
1739
- const base = { bottom: UI_DIMENSIONS.chat.bottom };
1740
1747
  switch (this.position) {
1741
1748
  case "left":
1742
- return { ...base, left: 20 };
1749
+ return { bottom: 55, left: 20 };
1743
1750
  case "center":
1744
- return { ...base, left: 400 };
1745
- // Approximate center
1751
+ return { bottom: 55, left: 400 };
1746
1752
  case "right":
1747
1753
  default:
1748
- return { ...base, right: 380 };
1754
+ return { bottom: 55, right: 20 };
1749
1755
  }
1750
1756
  }
1751
1757
  renderHeader() {
@@ -2315,6 +2321,9 @@ var StaticTVClient = class {
2315
2321
  this.guideUI = new GuideUIModule(this, this.config.guideUI);
2316
2322
  this.chatUI = new ChatUIModule(this, this.config.chatUI);
2317
2323
  this._fullFeaturesEnabled = true;
2324
+ this.chatUI.init().catch((err) => {
2325
+ this.log(`Chat init failed: ${err}`);
2326
+ });
2318
2327
  this.log("Full features enabled (guide, chat, heartbeat, interactions)");
2319
2328
  }
2320
2329
  /**
package/dist/index.mjs CHANGED
@@ -576,10 +576,10 @@ var UI_DIMENSIONS = {
576
576
  padding: 15
577
577
  }
578
578
  },
579
- // Chat UI
579
+ // Chat UI - match m1d-hq-lifted dimensions
580
580
  chat: {
581
- width: 340,
582
- height: 480,
581
+ width: 380,
582
+ height: 580,
583
583
  bottom: 55,
584
584
  right: 20,
585
585
  messagesPerPage: 5,
@@ -860,12 +860,15 @@ var GuideUIModule = class {
860
860
  if (data.videoMap) {
861
861
  for (const [slug, video] of Object.entries(data.videoMap)) {
862
862
  const v = video;
863
+ const src = v.src || v.liveStreamUrl || "";
863
864
  const mapped = {
864
865
  id: v.id || slug,
865
866
  name: v.name || v.title || "Unknown",
866
- src: v.src || v.liveStreamUrl || "",
867
- isLive: v.isLive === true || v.type === "live",
868
- isCreator: v.isCreator || v.type === "live",
867
+ src,
868
+ // isLive = actually streaming live (not just a creator channel)
869
+ isLive: v.isLive === true || src.includes("media.thestatic.tv"),
870
+ // isCreator = creator channel (type === 'live' means creator, not actually live)
871
+ isCreator: v.isCreator === true || v.type === "live",
869
872
  channelId: v.channelId || slug,
870
873
  duration: v.duration,
871
874
  requiresAuth: v.requiresAuth
@@ -879,6 +882,7 @@ var GuideUIModule = class {
879
882
  const playlists = [];
880
883
  if (data.featuredPlaylists) {
881
884
  for (const pl of data.featuredPlaylists) {
885
+ if (pl.name === "NODES") continue;
882
886
  playlists.push({
883
887
  name: pl.name,
884
888
  videos: (pl.videos || []).map((v) => ({
@@ -894,6 +898,10 @@ var GuideUIModule = class {
894
898
  });
895
899
  }
896
900
  }
901
+ const nodeVideos = videos.filter((v) => v.isCreator);
902
+ if (nodeVideos.length > 0) {
903
+ playlists.push({ name: "NODES", videos: nodeVideos });
904
+ }
897
905
  this.videos = videos;
898
906
  this.liveVideos = liveVideos;
899
907
  this.featuredPlaylists = playlists;
@@ -1696,16 +1704,14 @@ var ChatUIModule = class {
1696
1704
  }
1697
1705
  }
1698
1706
  getPositionStyle() {
1699
- const base = { bottom: UI_DIMENSIONS.chat.bottom };
1700
1707
  switch (this.position) {
1701
1708
  case "left":
1702
- return { ...base, left: 20 };
1709
+ return { bottom: 55, left: 20 };
1703
1710
  case "center":
1704
- return { ...base, left: 400 };
1705
- // Approximate center
1711
+ return { bottom: 55, left: 400 };
1706
1712
  case "right":
1707
1713
  default:
1708
- return { ...base, right: 380 };
1714
+ return { bottom: 55, right: 20 };
1709
1715
  }
1710
1716
  }
1711
1717
  renderHeader() {
@@ -2275,6 +2281,9 @@ var StaticTVClient = class {
2275
2281
  this.guideUI = new GuideUIModule(this, this.config.guideUI);
2276
2282
  this.chatUI = new ChatUIModule(this, this.config.chatUI);
2277
2283
  this._fullFeaturesEnabled = true;
2284
+ this.chatUI.init().catch((err) => {
2285
+ this.log(`Chat init failed: ${err}`);
2286
+ });
2278
2287
  this.log("Full features enabled (guide, chat, heartbeat, interactions)");
2279
2288
  }
2280
2289
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thestatic-tv/dcl-sdk",
3
- "version": "2.2.2",
3
+ "version": "2.2.4",
4
4
  "description": "Connect your Decentraland scene to thestatic.tv - full channel lineup, metrics tracking, and interactions",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",