@applicaster/zapp-react-native-utils 16.0.0-rc.48 → 16.0.0-rc.49
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.
|
@@ -59,6 +59,7 @@ type PlayNextConfig = {
|
|
|
59
59
|
export type PlayNextState = PlayNextConfig & {
|
|
60
60
|
triggerTime: number;
|
|
61
61
|
handleUserCancelPlayNext: () => void;
|
|
62
|
+
hidePlayNext: () => void;
|
|
62
63
|
};
|
|
63
64
|
|
|
64
65
|
export class OverlaysObserver {
|
|
@@ -76,7 +77,7 @@ export class OverlaysObserver {
|
|
|
76
77
|
private chapterMarkerEvents: ChapterMarkerEvent[];
|
|
77
78
|
readonly player: Player;
|
|
78
79
|
private playNextConfig?: PlayNextConfig;
|
|
79
|
-
private
|
|
80
|
+
private isPlayNextSuppressed = false;
|
|
80
81
|
|
|
81
82
|
constructor({ player }: ChapterMarkersObserverProps) {
|
|
82
83
|
this.chapterSubject = new BehaviorSubject(null);
|
|
@@ -143,11 +144,15 @@ export class OverlaysObserver {
|
|
|
143
144
|
return this.titleSummarySubject.asObservable().pipe(distinctUntilChanged());
|
|
144
145
|
}
|
|
145
146
|
|
|
146
|
-
|
|
147
|
-
this.
|
|
147
|
+
hidePlayNext = () => {
|
|
148
|
+
this.isPlayNextSuppressed = true;
|
|
148
149
|
this.playNextSubject.next(null);
|
|
149
150
|
};
|
|
150
151
|
|
|
152
|
+
handleUserCancelPlayNext = () => {
|
|
153
|
+
this.hidePlayNext();
|
|
154
|
+
};
|
|
155
|
+
|
|
151
156
|
preparePlayNext = async () => {
|
|
152
157
|
try {
|
|
153
158
|
const plugins = appStore.get("plugins");
|
|
@@ -270,7 +275,7 @@ export class OverlaysObserver {
|
|
|
270
275
|
|
|
271
276
|
// TODO: Hack for video end, will be replaced with playlist prev/next in the future
|
|
272
277
|
getPlayNextEntry = () =>
|
|
273
|
-
!this.
|
|
278
|
+
!this.isPlayNextSuppressed ? this.playNextConfig?.entry : null;
|
|
274
279
|
|
|
275
280
|
prepareChapterMarkers = () => {
|
|
276
281
|
const chapterMarkers: ChapterMarkerOriginal[] =
|
|
@@ -353,7 +358,7 @@ export class OverlaysObserver {
|
|
|
353
358
|
const shouldPlayNextBeVisible = currentTime > triggerTime;
|
|
354
359
|
|
|
355
360
|
if (shouldPlayNextBeVisible) {
|
|
356
|
-
if (this.
|
|
361
|
+
if (this.isPlayNextSuppressed) {
|
|
357
362
|
return;
|
|
358
363
|
}
|
|
359
364
|
|
|
@@ -361,10 +366,11 @@ export class OverlaysObserver {
|
|
|
361
366
|
...this.playNextConfig,
|
|
362
367
|
triggerTime,
|
|
363
368
|
handleUserCancelPlayNext: this.handleUserCancelPlayNext,
|
|
369
|
+
hidePlayNext: this.hidePlayNext,
|
|
364
370
|
});
|
|
365
371
|
} else {
|
|
366
372
|
this.playNextSubject.next(null);
|
|
367
|
-
this.
|
|
373
|
+
this.isPlayNextSuppressed = false;
|
|
368
374
|
}
|
|
369
375
|
};
|
|
370
376
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "16.0.0-rc.
|
|
3
|
+
"version": "16.0.0-rc.49",
|
|
4
4
|
"description": "Applicaster Zapp React Native utilities package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@applicaster/applicaster-types": "16.0.0-rc.
|
|
30
|
+
"@applicaster/applicaster-types": "16.0.0-rc.49",
|
|
31
31
|
"buffer": "^5.2.1",
|
|
32
32
|
"camelize": "^1.0.0",
|
|
33
33
|
"dayjs": "^1.11.10",
|