@mottosports/motto-video-player 1.0.1-rc.18 → 1.0.1-rc.19
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.d.mts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.js +2 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1173,7 +1173,7 @@ var useQualityControl = (playerRef, qualityConfig, onQualityChange) => {
|
|
|
1173
1173
|
if (!playerRef.current) return [];
|
|
1174
1174
|
const tracks = playerRef.current.getVariantTracks();
|
|
1175
1175
|
const qualities = tracks.filter(
|
|
1176
|
-
(track, index,
|
|
1176
|
+
(track, index, self) => index === self.findIndex((t) => t.height === track.height)
|
|
1177
1177
|
).map((track) => ({
|
|
1178
1178
|
height: track.height || 0,
|
|
1179
1179
|
bandwidth: track.bandwidth || 0,
|
|
@@ -3354,7 +3354,7 @@ var Player = forwardRef(
|
|
|
3354
3354
|
const containerStyle = isResponsive ? {
|
|
3355
3355
|
aspectRatio: aspectRatio.toString()
|
|
3356
3356
|
} : { width, height };
|
|
3357
|
-
const videoClasses = isResponsive ? "motto-video-responsive" : "w-full h-full ";
|
|
3357
|
+
const videoClasses = isResponsive ? "motto-video-responsive w-full" : "w-full h-full ";
|
|
3358
3358
|
const videoStyle = isResponsive ? {} : { width, height };
|
|
3359
3359
|
const filteredVideoProps = { ...videoProps };
|
|
3360
3360
|
delete filteredVideoProps.controls;
|
|
@@ -3866,37 +3866,8 @@ var useMessages = (locale) => {
|
|
|
3866
3866
|
};
|
|
3867
3867
|
var useMessages_default = useMessages;
|
|
3868
3868
|
|
|
3869
|
-
// src/utils/crypto-polyfill.ts
|
|
3870
|
-
function polyfillCryptoRandomUUID() {
|
|
3871
|
-
if (typeof globalThis !== "undefined" && globalThis.crypto && !globalThis.crypto.randomUUID) {
|
|
3872
|
-
globalThis.crypto.randomUUID = generateRandomUUID;
|
|
3873
|
-
}
|
|
3874
|
-
if (typeof window !== "undefined" && window.crypto && !window.crypto.randomUUID) {
|
|
3875
|
-
window.crypto.randomUUID = generateRandomUUID;
|
|
3876
|
-
}
|
|
3877
|
-
if (typeof self !== "undefined" && self.crypto && !self.crypto.randomUUID) {
|
|
3878
|
-
self.crypto.randomUUID = generateRandomUUID;
|
|
3879
|
-
}
|
|
3880
|
-
}
|
|
3881
|
-
function generateRandomUUID() {
|
|
3882
|
-
if (typeof crypto !== "undefined" && crypto.getRandomValues) {
|
|
3883
|
-
const array = new Uint8Array(16);
|
|
3884
|
-
crypto.getRandomValues(array);
|
|
3885
|
-
array[6] = array[6] & 15 | 64;
|
|
3886
|
-
array[8] = array[8] & 63 | 128;
|
|
3887
|
-
const hex = Array.from(array).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
3888
|
-
return `${hex.substring(0, 8)}-${hex.substring(8, 12)}-${hex.substring(12, 16)}-${hex.substring(16, 20)}-${hex.substring(20, 32)}`;
|
|
3889
|
-
}
|
|
3890
|
-
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
3891
|
-
const r = Math.random() * 16 | 0;
|
|
3892
|
-
const v = c === "x" ? r : r & 3 | 8;
|
|
3893
|
-
return v.toString(16);
|
|
3894
|
-
});
|
|
3895
|
-
}
|
|
3896
|
-
|
|
3897
3869
|
// src/Video.tsx
|
|
3898
3870
|
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
3899
|
-
polyfillCryptoRandomUUID();
|
|
3900
3871
|
var Video = ({
|
|
3901
3872
|
videoId,
|
|
3902
3873
|
publicKey,
|
|
@@ -3987,7 +3958,6 @@ import { useCallback as useCallback8, useEffect as useEffect8, useState as useSt
|
|
|
3987
3958
|
import { twMerge as twMerge4 } from "tailwind-merge";
|
|
3988
3959
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
3989
3960
|
import { Fragment, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3990
|
-
polyfillCryptoRandomUUID();
|
|
3991
3961
|
var Event = ({
|
|
3992
3962
|
publicKey,
|
|
3993
3963
|
eventId,
|
|
@@ -4314,7 +4284,6 @@ import { useEffect as useEffect9, useState as useState5 } from "react";
|
|
|
4314
4284
|
import { twMerge as twMerge5 } from "tailwind-merge";
|
|
4315
4285
|
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
4316
4286
|
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
4317
|
-
polyfillCryptoRandomUUID();
|
|
4318
4287
|
var CreativeWork = ({
|
|
4319
4288
|
publicKey,
|
|
4320
4289
|
creativeWorkId,
|
|
@@ -4666,7 +4635,6 @@ export {
|
|
|
4666
4635
|
SkipBackIcon,
|
|
4667
4636
|
SkipForwardIcon,
|
|
4668
4637
|
Video,
|
|
4669
|
-
polyfillCryptoRandomUUID,
|
|
4670
4638
|
queryClient
|
|
4671
4639
|
};
|
|
4672
4640
|
//# sourceMappingURL=index.mjs.map
|