@mottosports/motto-video-player 1.0.1-rc.75 → 1.0.1-rc.76
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 +27 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +59 -62
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -449,7 +449,7 @@ var supportsWidevinePersistentLicenses = () => {
|
|
|
449
449
|
import initShakaPlayerMux from "@mux/mux-data-shakaplayer";
|
|
450
450
|
|
|
451
451
|
// package.json
|
|
452
|
-
var version = "1.0.1-rc.
|
|
452
|
+
var version = "1.0.1-rc.76";
|
|
453
453
|
|
|
454
454
|
// src/utils/licenseCache.ts
|
|
455
455
|
var PERSISTENT_LICENSE_PREFIX = "motto_lic_";
|
|
@@ -1987,8 +1987,8 @@ var useAdEvents = (playerRef, handlers) => {
|
|
|
1987
1987
|
|
|
1988
1988
|
// src/components/Loading.tsx
|
|
1989
1989
|
import { twMerge } from "tailwind-merge";
|
|
1990
|
-
import { jsx as jsx4
|
|
1991
|
-
var Loading = ({ className }) => /* @__PURE__ */
|
|
1990
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
1991
|
+
var Loading = ({ className }) => /* @__PURE__ */ jsx4(
|
|
1992
1992
|
"div",
|
|
1993
1993
|
{
|
|
1994
1994
|
className: twMerge(
|
|
@@ -1996,38 +1996,35 @@ var Loading = ({ className }) => /* @__PURE__ */ jsxs3(
|
|
|
1996
1996
|
className
|
|
1997
1997
|
),
|
|
1998
1998
|
role: "status",
|
|
1999
|
-
children:
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
) }),
|
|
2023
|
-
/* @__PURE__ */ jsx4("span", { className: "sr-only", children: "Loading..." })
|
|
2024
|
-
]
|
|
1999
|
+
children: /* @__PURE__ */ jsx4("div", { className: " flex justify-center items-center", children: /* @__PURE__ */ jsx4(
|
|
2000
|
+
"svg",
|
|
2001
|
+
{
|
|
2002
|
+
className: "shaka-spinner-svg animate-spin h-12 w-12",
|
|
2003
|
+
viewBox: "0 0 64 64",
|
|
2004
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2005
|
+
children: /* @__PURE__ */ jsx4(
|
|
2006
|
+
"circle",
|
|
2007
|
+
{
|
|
2008
|
+
className: "shaka-spinner-path",
|
|
2009
|
+
cx: "32",
|
|
2010
|
+
cy: "32",
|
|
2011
|
+
r: "28",
|
|
2012
|
+
strokeWidth: "4",
|
|
2013
|
+
strokeLinecap: "round",
|
|
2014
|
+
stroke: "currentColor",
|
|
2015
|
+
fill: "none",
|
|
2016
|
+
strokeDasharray: "176",
|
|
2017
|
+
strokeDashoffset: "120"
|
|
2018
|
+
}
|
|
2019
|
+
)
|
|
2020
|
+
}
|
|
2021
|
+
) })
|
|
2025
2022
|
}
|
|
2026
2023
|
);
|
|
2027
2024
|
|
|
2028
2025
|
// src/components/ErrorScreen.tsx
|
|
2029
|
-
import { jsx as jsx5, jsxs as
|
|
2030
|
-
var ErrorScreen = ({ title, description }) => /* @__PURE__ */ jsx5("div", { className: "w-full h-full md:rounded-2xl! aspect-video bg-black", children: /* @__PURE__ */
|
|
2026
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
2027
|
+
var ErrorScreen = ({ title, description }) => /* @__PURE__ */ jsx5("div", { className: "w-full h-full md:rounded-2xl! aspect-video bg-black flex", children: /* @__PURE__ */ jsxs3("div", { className: "bg-[#151515] text-white w-full h-full flex justify-center items-center", children: [
|
|
2031
2028
|
/* @__PURE__ */ jsx5(
|
|
2032
2029
|
"svg",
|
|
2033
2030
|
{
|
|
@@ -2048,7 +2045,7 @@ var ErrorScreen = ({ title, description }) => /* @__PURE__ */ jsx5("div", { clas
|
|
|
2048
2045
|
)
|
|
2049
2046
|
}
|
|
2050
2047
|
),
|
|
2051
|
-
/* @__PURE__ */
|
|
2048
|
+
/* @__PURE__ */ jsxs3("div", { children: [
|
|
2052
2049
|
/* @__PURE__ */ jsx5("h3", { className: "text-2xl mb-2", children: title || "Playback Error" }),
|
|
2053
2050
|
/* @__PURE__ */ jsx5("div", { className: "text-lg", children: description || "Unable to play the video. Please try again later." })
|
|
2054
2051
|
] })
|
|
@@ -2059,7 +2056,7 @@ import { jsx as jsx6 } from "react/jsx-runtime";
|
|
|
2059
2056
|
var Title = ({ title }) => /* @__PURE__ */ jsx6("div", { className: "absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4", children: /* @__PURE__ */ jsx6("h2", { className: "text-white text-xl font-semibold", children: title }) });
|
|
2060
2057
|
|
|
2061
2058
|
// src/components/LiveBadge.tsx
|
|
2062
|
-
import { jsx as jsx7, jsxs as
|
|
2059
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2063
2060
|
var LiveBadge = ({
|
|
2064
2061
|
isVisible,
|
|
2065
2062
|
position = "top-right",
|
|
@@ -2091,7 +2088,7 @@ var LiveBadge = ({
|
|
|
2091
2088
|
${className}
|
|
2092
2089
|
`,
|
|
2093
2090
|
style,
|
|
2094
|
-
children: /* @__PURE__ */
|
|
2091
|
+
children: /* @__PURE__ */ jsxs4("span", { className: "flex items-center gap-1", children: [
|
|
2095
2092
|
/* @__PURE__ */ jsx7("span", { className: "w-2 h-2 bg-white rounded-full animate-pulse" }),
|
|
2096
2093
|
text
|
|
2097
2094
|
] })
|
|
@@ -2176,7 +2173,7 @@ async function waitForGlobals(globalNames, timeout = 5e3) {
|
|
|
2176
2173
|
}
|
|
2177
2174
|
|
|
2178
2175
|
// src/Player.tsx
|
|
2179
|
-
import { jsx as jsx8, jsxs as
|
|
2176
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2180
2177
|
var Player = forwardRef(
|
|
2181
2178
|
({
|
|
2182
2179
|
src,
|
|
@@ -2517,7 +2514,7 @@ var Player = forwardRef(
|
|
|
2517
2514
|
const videoStyle = isResponsive ? {} : { width, height };
|
|
2518
2515
|
const filteredVideoProps = { ...videoProps };
|
|
2519
2516
|
delete filteredVideoProps.controls;
|
|
2520
|
-
return /* @__PURE__ */
|
|
2517
|
+
return /* @__PURE__ */ jsxs5(
|
|
2521
2518
|
"div",
|
|
2522
2519
|
{
|
|
2523
2520
|
ref: containerRef,
|
|
@@ -3018,7 +3015,7 @@ var useMessages = (locale) => {
|
|
|
3018
3015
|
var useMessages_default = useMessages;
|
|
3019
3016
|
|
|
3020
3017
|
// src/Video.tsx
|
|
3021
|
-
import { jsx as jsx9, jsxs as
|
|
3018
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3022
3019
|
var Video = ({
|
|
3023
3020
|
videoId,
|
|
3024
3021
|
publicKey,
|
|
@@ -3076,7 +3073,7 @@ var Video = ({
|
|
|
3076
3073
|
}
|
|
3077
3074
|
const title = t(errorKey) || t("DEFAULT_ERROR");
|
|
3078
3075
|
const description = t(`${errorKey}_DESCRIPTION`) || t("DEFAULT_ERROR_DESCRIPTION");
|
|
3079
|
-
return /* @__PURE__ */ jsx9("div", { className: twMerge3("md:rounded-2xl overflow-hidden aspect-video", className), children: /* @__PURE__ */
|
|
3076
|
+
return /* @__PURE__ */ jsx9("div", { className: twMerge3("md:rounded-2xl overflow-hidden aspect-video", className), children: /* @__PURE__ */ jsxs6("div", { className: "relative w-full h-full", children: [
|
|
3080
3077
|
/* @__PURE__ */ jsx9(
|
|
3081
3078
|
ErrorScreen,
|
|
3082
3079
|
{
|
|
@@ -3088,7 +3085,7 @@ var Video = ({
|
|
|
3088
3085
|
] }) });
|
|
3089
3086
|
}
|
|
3090
3087
|
if (!activePlaylist || !activePlaylistHasUrl) {
|
|
3091
|
-
return /* @__PURE__ */ jsx9("div", { className: twMerge3("md:rounded-2xl overflow-hidden aspect-video", className), children: /* @__PURE__ */
|
|
3088
|
+
return /* @__PURE__ */ jsx9("div", { className: twMerge3("md:rounded-2xl overflow-hidden aspect-video", className), children: /* @__PURE__ */ jsxs6("div", { className: "relative w-full h-full bg-[#151515]", children: [
|
|
3092
3089
|
/* @__PURE__ */ jsx9(Title, { title: video?.name || "" }),
|
|
3093
3090
|
children
|
|
3094
3091
|
] }) });
|
|
@@ -3115,7 +3112,7 @@ var Video = ({
|
|
|
3115
3112
|
import { useCallback as useCallback10, useEffect as useEffect8, useState as useState6 } from "react";
|
|
3116
3113
|
import { twMerge as twMerge4 } from "tailwind-merge";
|
|
3117
3114
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
3118
|
-
import { Fragment, jsx as jsx10, jsxs as
|
|
3115
|
+
import { Fragment, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
3119
3116
|
var Event = ({
|
|
3120
3117
|
publicKey,
|
|
3121
3118
|
eventId,
|
|
@@ -3267,7 +3264,7 @@ var Event = ({
|
|
|
3267
3264
|
if (activePlaylist && activeVideoId && videosData) {
|
|
3268
3265
|
const activeVideo = videosData.find((video) => video.id === activeVideoId);
|
|
3269
3266
|
console.log("activeVideo?.ad?.adTagUrl", activeVideo?.ad?.adTagUrl);
|
|
3270
|
-
return /* @__PURE__ */
|
|
3267
|
+
return /* @__PURE__ */ jsxs7("div", { className: twMerge4("", className), children: [
|
|
3271
3268
|
/* @__PURE__ */ jsx10("div", { className: "relative w-full h-full", children: /* @__PURE__ */ jsx10(
|
|
3272
3269
|
Player,
|
|
3273
3270
|
{
|
|
@@ -3340,9 +3337,9 @@ function PreEvent({
|
|
|
3340
3337
|
const minutes = Math.floor(remainingTime / 1e3 / 60) % 60;
|
|
3341
3338
|
const hours = Math.floor(remainingTime / 1e3 / 60 / 60) % 24;
|
|
3342
3339
|
const days = Math.floor(remainingTime / 1e3 / 60 / 60 / 24);
|
|
3343
|
-
return /* @__PURE__ */
|
|
3344
|
-
/* @__PURE__ */
|
|
3345
|
-
/* @__PURE__ */ jsx10("span", { className: "font-mono text-lg md:text-5xl
|
|
3340
|
+
return /* @__PURE__ */ jsxs7("div", { className: "grid grid-flow-col gap-1 md:gap-5 text-center auto-cols-max", children: [
|
|
3341
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col p-2 bg-neutral rounded-box text-neutral-content", children: [
|
|
3342
|
+
/* @__PURE__ */ jsx10("span", { className: "font-mono text-lg md:text-5xl", children: /* @__PURE__ */ jsx10(
|
|
3346
3343
|
"span",
|
|
3347
3344
|
{
|
|
3348
3345
|
"aria-live": "polite",
|
|
@@ -3352,7 +3349,7 @@ function PreEvent({
|
|
|
3352
3349
|
) }),
|
|
3353
3350
|
/* @__PURE__ */ jsx10("span", { className: "text-xs uppercase tracking-widest mt-1", children: t("DAYS") })
|
|
3354
3351
|
] }),
|
|
3355
|
-
/* @__PURE__ */
|
|
3352
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col p-2 bg-neutral rounded-box text-neutral-content", children: [
|
|
3356
3353
|
/* @__PURE__ */ jsx10("span", { className: "countdown font-mono text-lg md:text-5xl", children: /* @__PURE__ */ jsx10(
|
|
3357
3354
|
"span",
|
|
3358
3355
|
{
|
|
@@ -3364,7 +3361,7 @@ function PreEvent({
|
|
|
3364
3361
|
) }),
|
|
3365
3362
|
/* @__PURE__ */ jsx10("span", { className: "text-xs uppercase tracking-widest mt-1", children: t("HOURS") })
|
|
3366
3363
|
] }),
|
|
3367
|
-
/* @__PURE__ */
|
|
3364
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col p-2 bg-neutral rounded-box text-neutral-content", children: [
|
|
3368
3365
|
/* @__PURE__ */ jsx10("span", { className: "countdown font-mono text-lg md:text-5xl", children: /* @__PURE__ */ jsx10(
|
|
3369
3366
|
"span",
|
|
3370
3367
|
{
|
|
@@ -3376,7 +3373,7 @@ function PreEvent({
|
|
|
3376
3373
|
) }),
|
|
3377
3374
|
/* @__PURE__ */ jsx10("span", { className: "text-xs uppercase tracking-widest mt-1", children: t("MINUTES") })
|
|
3378
3375
|
] }),
|
|
3379
|
-
/* @__PURE__ */
|
|
3376
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col p-2 bg-neutral rounded-box text-neutral-content", children: [
|
|
3380
3377
|
/* @__PURE__ */ jsx10("span", { className: "countdown font-mono text-lg md:text-5xl", children: /* @__PURE__ */ jsx10(
|
|
3381
3378
|
"span",
|
|
3382
3379
|
{
|
|
@@ -3390,7 +3387,7 @@ function PreEvent({
|
|
|
3390
3387
|
] })
|
|
3391
3388
|
] });
|
|
3392
3389
|
}, [remainingTime, shouldBeStarted, t]);
|
|
3393
|
-
return /* @__PURE__ */ jsx10(Fragment, { children: event?.posterUrl ? /* @__PURE__ */
|
|
3390
|
+
return /* @__PURE__ */ jsx10(Fragment, { children: event?.posterUrl ? /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
3394
3391
|
/* @__PURE__ */ jsx10(
|
|
3395
3392
|
"div",
|
|
3396
3393
|
{
|
|
@@ -3412,7 +3409,7 @@ function PreEvent({
|
|
|
3412
3409
|
locale
|
|
3413
3410
|
}
|
|
3414
3411
|
)
|
|
3415
|
-
] }) : /* @__PURE__ */
|
|
3412
|
+
] }) : /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
3416
3413
|
/* @__PURE__ */ jsx10(
|
|
3417
3414
|
"div",
|
|
3418
3415
|
{
|
|
@@ -3441,9 +3438,9 @@ var TitleAndDescription = ({
|
|
|
3441
3438
|
locale = "en",
|
|
3442
3439
|
className
|
|
3443
3440
|
}) => {
|
|
3444
|
-
return /* @__PURE__ */
|
|
3441
|
+
return /* @__PURE__ */ jsxs7("div", { className: twMerge4("mt-3 mb-6 m-event-details-ctn px-4 text-left w-full", className), children: [
|
|
3445
3442
|
/* @__PURE__ */ jsx10("div", { className: "text-base md:text-xl m-event-title text-base-content font-medium", children: title }),
|
|
3446
|
-
startTime ? /* @__PURE__ */
|
|
3443
|
+
startTime ? /* @__PURE__ */ jsxs7("div", { className: "text-xs md:text-base text-base-content/70 m-event-start-time", children: [
|
|
3447
3444
|
new Date(startTime || "").toLocaleDateString(locale || "default", {
|
|
3448
3445
|
month: "long",
|
|
3449
3446
|
year: "numeric",
|
|
@@ -3464,7 +3461,7 @@ var TitleAndDescription = ({
|
|
|
3464
3461
|
import { useEffect as useEffect9, useState as useState7 } from "react";
|
|
3465
3462
|
import { twMerge as twMerge5 } from "tailwind-merge";
|
|
3466
3463
|
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
3467
|
-
import { Fragment as Fragment2, jsx as jsx11, jsxs as
|
|
3464
|
+
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3468
3465
|
var CreativeWork = ({
|
|
3469
3466
|
publicKey,
|
|
3470
3467
|
creativeWorkId,
|
|
@@ -3626,7 +3623,7 @@ var CreativeWork = ({
|
|
|
3626
3623
|
}
|
|
3627
3624
|
if (activeVideoId && activePlaylist && !loadingPlaylist) {
|
|
3628
3625
|
const activeVideo = videosData?.find((video) => video.id === activeVideoId);
|
|
3629
|
-
return /* @__PURE__ */ jsx11("div", { className: twMerge5("", className), children: /* @__PURE__ */
|
|
3626
|
+
return /* @__PURE__ */ jsx11("div", { className: twMerge5("", className), children: /* @__PURE__ */ jsxs8("div", { className: "relative w-full h-full", children: [
|
|
3630
3627
|
/* @__PURE__ */ jsx11(
|
|
3631
3628
|
Player,
|
|
3632
3629
|
{
|
|
@@ -3695,8 +3692,8 @@ function PreCreativeWork({
|
|
|
3695
3692
|
const minutes = Math.floor(remainingTime / 1e3 / 60) % 60;
|
|
3696
3693
|
const hours = Math.floor(remainingTime / 1e3 / 60 / 60) % 24;
|
|
3697
3694
|
const days = Math.floor(remainingTime / 1e3 / 60 / 60 / 24);
|
|
3698
|
-
return /* @__PURE__ */
|
|
3699
|
-
/* @__PURE__ */
|
|
3695
|
+
return /* @__PURE__ */ jsxs8("div", { className: "grid grid-flow-col md:gap-5 gap-1 text-center auto-cols-max", children: [
|
|
3696
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex flex-col p-2 bg-neutral rounded-box text-neutral-content", children: [
|
|
3700
3697
|
/* @__PURE__ */ jsx11("span", { className: "font-mono text-lg md:text-5xl", children: /* @__PURE__ */ jsx11(
|
|
3701
3698
|
"span",
|
|
3702
3699
|
{
|
|
@@ -3707,7 +3704,7 @@ function PreCreativeWork({
|
|
|
3707
3704
|
) }),
|
|
3708
3705
|
/* @__PURE__ */ jsx11("span", { className: "text-xs uppercase tracking-widest mt-1", children: t("DAYS") })
|
|
3709
3706
|
] }),
|
|
3710
|
-
/* @__PURE__ */
|
|
3707
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex flex-col p-2 bg-neutral rounded-box text-neutral-content", children: [
|
|
3711
3708
|
/* @__PURE__ */ jsx11("span", { className: "countdown font-mono text-lg md:text-5xl", children: /* @__PURE__ */ jsx11(
|
|
3712
3709
|
"span",
|
|
3713
3710
|
{
|
|
@@ -3719,7 +3716,7 @@ function PreCreativeWork({
|
|
|
3719
3716
|
) }),
|
|
3720
3717
|
/* @__PURE__ */ jsx11("span", { className: "text-xs uppercase tracking-widest mt-1", children: t("HOURS") })
|
|
3721
3718
|
] }),
|
|
3722
|
-
/* @__PURE__ */
|
|
3719
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex flex-col p-2 bg-neutral rounded-box text-neutral-content", children: [
|
|
3723
3720
|
/* @__PURE__ */ jsx11("span", { className: "countdown font-mono text-lg md:text-5xl", children: /* @__PURE__ */ jsx11(
|
|
3724
3721
|
"span",
|
|
3725
3722
|
{
|
|
@@ -3731,7 +3728,7 @@ function PreCreativeWork({
|
|
|
3731
3728
|
) }),
|
|
3732
3729
|
/* @__PURE__ */ jsx11("span", { className: "text-xs uppercase tracking-widest mt-1", children: t("MINUTES") })
|
|
3733
3730
|
] }),
|
|
3734
|
-
/* @__PURE__ */
|
|
3731
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex flex-col p-2 bg-neutral rounded-box text-neutral-content", children: [
|
|
3735
3732
|
/* @__PURE__ */ jsx11("span", { className: "countdown font-mono text-lg md:text-5xl", children: /* @__PURE__ */ jsx11(
|
|
3736
3733
|
"span",
|
|
3737
3734
|
{
|
|
@@ -3745,8 +3742,8 @@ function PreCreativeWork({
|
|
|
3745
3742
|
] })
|
|
3746
3743
|
] });
|
|
3747
3744
|
};
|
|
3748
|
-
return /* @__PURE__ */
|
|
3749
|
-
/* @__PURE__ */
|
|
3745
|
+
return /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
3746
|
+
/* @__PURE__ */ jsxs8(
|
|
3750
3747
|
"div",
|
|
3751
3748
|
{
|
|
3752
3749
|
className: "relative overflow-hidden md:rounded-2xl bg-base-200 aspect-video text-base-content flex flex-col justify-center items-center w-full h-full bg-cover bg-center bg-no-repeat",
|
|
@@ -3777,9 +3774,9 @@ var TitleAndDescription2 = ({
|
|
|
3777
3774
|
locale = "en",
|
|
3778
3775
|
className
|
|
3779
3776
|
}) => {
|
|
3780
|
-
return /* @__PURE__ */
|
|
3777
|
+
return /* @__PURE__ */ jsxs8("div", { className: twMerge5("mt-3 mb-6 m-event-details-ctn px-4 text-left w-full", className), children: [
|
|
3781
3778
|
/* @__PURE__ */ jsx11("div", { className: "text-base md:text-xl m-event-title text-base-content font-medium", children: title }),
|
|
3782
|
-
releaseTime ? /* @__PURE__ */
|
|
3779
|
+
releaseTime ? /* @__PURE__ */ jsxs8("div", { className: "text-sm md:text-base text-base-content/70 m-event-start-time", children: [
|
|
3783
3780
|
new Date(releaseTime || "").toLocaleDateString(locale || "default", {
|
|
3784
3781
|
month: "long",
|
|
3785
3782
|
year: "numeric",
|