@mottosports/motto-video-player 1.0.1-rc.20 → 1.0.1-rc.22

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.mjs CHANGED
@@ -1293,6 +1293,11 @@ var useSkipControls = (videoRef, onSkipBack, onSkipForward) => {
1293
1293
  import { useCallback as useCallback4, useRef as useRef3 } from "react";
1294
1294
  import initShakaPlayerMux from "@mux/mux-data-shakaplayer";
1295
1295
  import shaka from "shaka-player/dist/shaka-player.ui";
1296
+
1297
+ // package.json
1298
+ var version = "1.0.1-rc.22";
1299
+
1300
+ // src/hooks/useMuxAnalytics.ts
1296
1301
  var useMuxAnalytics = (playerRef, muxConfig, onMuxReady, onMuxDataUpdate) => {
1297
1302
  const shakaPlayerMuxRef = useRef3(null);
1298
1303
  const initializeMux = useCallback4(() => {
@@ -1308,9 +1313,12 @@ var useMuxAnalytics = (playerRef, muxConfig, onMuxReady, onMuxDataUpdate) => {
1308
1313
  ...muxConfig.errorTranslator && { errorTranslator: muxConfig.errorTranslator },
1309
1314
  data: {
1310
1315
  env_key: muxConfig.envKey,
1311
- player_name: "Motto Video Player",
1312
- player_version: "1.0.0",
1316
+ player_name: muxConfig?.metadata?.player_name,
1317
+ player_version: version,
1313
1318
  player_init_time: playerInitTime,
1319
+ video_title: muxConfig?.metadata?.video_title ?? "",
1320
+ video_id: muxConfig?.metadata?.video_id ?? "",
1321
+ viewer_user_id: muxConfig?.metadata?.viewer_user_id ?? "",
1314
1322
  ...muxConfig.metadata
1315
1323
  }
1316
1324
  };
@@ -3889,7 +3897,6 @@ import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
3889
3897
  var Video = ({
3890
3898
  videoId,
3891
3899
  publicKey,
3892
- mottoToken,
3893
3900
  videoData: providedVideoData,
3894
3901
  refetchInterval = 0,
3895
3902
  playerName,
@@ -3897,6 +3904,8 @@ var Video = ({
3897
3904
  events,
3898
3905
  children,
3899
3906
  className,
3907
+ auth,
3908
+ settings,
3900
3909
  queryOptions = {},
3901
3910
  ...props
3902
3911
  }) => {
@@ -3906,8 +3915,8 @@ var Video = ({
3906
3915
  error,
3907
3916
  refetch
3908
3917
  } = useQuery({
3909
- queryKey: ["video", videoId, publicKey, mottoToken],
3910
- queryFn: () => fetchVideoData(videoId, publicKey, mottoToken),
3918
+ queryKey: ["video", videoId, publicKey, auth?.mottoToken],
3919
+ queryFn: () => fetchVideoData(videoId, publicKey, auth?.mottoToken),
3911
3920
  enabled: !!videoId && !!publicKey && !providedVideoData,
3912
3921
  refetchInterval: refetchInterval > 0 ? refetchInterval : false,
3913
3922
  staleTime: queryOptions.staleTime ?? 5 * 60 * 1e3,
@@ -3957,7 +3966,6 @@ var Video = ({
3957
3966
  children
3958
3967
  ] }) });
3959
3968
  }
3960
- console.log("hlsUrl", hlsUrl);
3961
3969
  return /* @__PURE__ */ jsx9("div", { className: twMerge3("md:rounded-2xl overflow-hidden aspect-video", className), children: /* @__PURE__ */ jsx9("div", { className: "relative w-full h-full", children: /* @__PURE__ */ jsx9(
3962
3970
  Player,
3963
3971
  {