zarebin-player-library 1.1.0 → 1.1.2
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.
|
@@ -12728,8 +12728,9 @@ var useGetMarkers = () => {
|
|
|
12728
12728
|
var useGetPlayList = () => {
|
|
12729
12729
|
const dispatch = useAppDispatch();
|
|
12730
12730
|
const { isFetchDetails } = useAppSelector(({ videoData: { isFetchDetails } }) => ({ isFetchDetails }), shallowEqual);
|
|
12731
|
+
const { loadedFragmentsCount } = useAppSelector(({ controller: { loadedFragmentsCount } }) => ({ loadedFragmentsCount }), shallowEqual);
|
|
12731
12732
|
useEffect(() => {
|
|
12732
|
-
if (conditions(ConditionName.getPlayList)) {
|
|
12733
|
+
if (conditions(ConditionName.getPlayList) && conditions(ConditionName.hasPermittedLoadedFragment)) {
|
|
12733
12734
|
const handleGetPlayList = async () => {
|
|
12734
12735
|
const { data, status } = await getPlaylistHeader(API().playList);
|
|
12735
12736
|
if (responseValidator(status)) {
|
|
@@ -12747,7 +12748,7 @@ var useGetPlayList = () => {
|
|
|
12747
12748
|
};
|
|
12748
12749
|
handleGetPlayList();
|
|
12749
12750
|
}
|
|
12750
|
-
}, [isFetchDetails]);
|
|
12751
|
+
}, [isFetchDetails, loadedFragmentsCount.length]);
|
|
12751
12752
|
};
|
|
12752
12753
|
//#endregion
|
|
12753
12754
|
//#region src/videoPlayerLibrary/shared/helpers/hooks/useGetData/useGetProfile.tsx
|
|
@@ -12796,12 +12797,13 @@ var useGetRecommendationList = () => {
|
|
|
12796
12797
|
isFetchDetails,
|
|
12797
12798
|
params
|
|
12798
12799
|
}), shallowEqual);
|
|
12800
|
+
const { loadedFragmentsCount } = useAppSelector(({ controller: { loadedFragmentsCount } }) => ({ loadedFragmentsCount }), shallowEqual);
|
|
12799
12801
|
useEffect(() => {
|
|
12800
|
-
if (conditions(ConditionName.getRecommendationList)) (async () => {
|
|
12802
|
+
if (conditions(ConditionName.getRecommendationList) && conditions(ConditionName.hasPermittedLoadedFragment)) (async () => {
|
|
12801
12803
|
const { data, status } = await apiCaller({ url: API().recommendationList() });
|
|
12802
12804
|
if (responseValidator(status)) dispatch(setRecommendationList(data));
|
|
12803
12805
|
})();
|
|
12804
|
-
}, [isFetchDetails]);
|
|
12806
|
+
}, [isFetchDetails, loadedFragmentsCount.length]);
|
|
12805
12807
|
};
|
|
12806
12808
|
//#endregion
|
|
12807
12809
|
//#region src/videoPlayerLibrary/shared/helpers/hooks/useGetData/useUserSettings.tsx
|
|
@@ -68963,6 +68965,7 @@ var useVideoControls = (ad, params) => {
|
|
|
68963
68965
|
video.addEventListener("progress", handleProgress);
|
|
68964
68966
|
video.addEventListener("timeupdate", handleTimeUpdate);
|
|
68965
68967
|
(async () => {
|
|
68968
|
+
if (!conditions(ConditionName.hasAd)) await handleFullScreen();
|
|
68966
68969
|
await handleLockOrientation();
|
|
68967
68970
|
const playPromise = video.play();
|
|
68968
68971
|
dispatch(setPlay(true));
|