@applicaster/zapp-react-native-utils 13.0.0-alpha.7210171818 → 13.0.0-alpha.7222980745
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/actionsExecutor/ActionExecutor.ts +16 -9
- package/actionsExecutor/ActionExecutorContext.tsx +74 -9
- package/alertUtils/alert.ts +148 -0
- package/alertUtils/index.ts +1 -148
- package/analyticsUtils/AnalyticPlayerListener.ts +18 -1
- package/analyticsUtils/__tests__/__snapshots__/analyticsManagerNoModule.test.js.snap +9 -9
- package/analyticsUtils/helpers/hooks.ts +1 -1
- package/appUtils/HooksManager/{Hook.js → Hook.ts} +35 -23
- package/appUtils/HooksManager/__tests__/__snapshots__/hook.test.js.snap +10 -8
- package/appUtils/HooksManager/__tests__/__snapshots__/hooksManager.test.js.snap +693 -0
- package/appUtils/HooksManager/__tests__/hook.test.js +196 -184
- package/appUtils/HooksManager/__tests__/hooksManager.test.js +96 -99
- package/appUtils/HooksManager/{constants.js → constants.ts} +1 -1
- package/appUtils/HooksManager/{index.js → index.ts} +121 -112
- package/appUtils/HooksManager/types.ts +119 -0
- package/appUtils/RiverFocusManager/index.js +17 -12
- package/appUtils/accessibilityManager/index.ts +42 -1
- package/appUtils/contextKeysManager/contextResolver.ts +77 -0
- package/appUtils/focusManager/__tests__/__snapshots__/focusManager.test.js.snap +7 -6
- package/appUtils/focusManager/index.ts +100 -65
- package/appUtils/focusManager/treeDataStructure/Tree/index.js +25 -3
- package/appUtils/focusManager/treeDataStructure/Utils/index.js +1 -3
- package/appUtils/focusManager/utils/enums.ts +4 -0
- package/appUtils/focusManagerAux/utils/index.ts +4 -3
- package/appUtils/{index.js → index.ts} +1 -1
- package/appUtils/keyCodes/__tests__/__snapshots__/keyCodes.test.js.snap +2 -2
- package/appUtils/keyCodes/__tests__/keyCodes.test.js +4 -4
- package/appUtils/keyCodes/{index.js → index.ts} +2 -0
- package/appUtils/keyCodes/keys/index.ts +3 -0
- package/appUtils/keyCodes/{keys.android.js → keys/keyEventMapper.ts} +0 -19
- package/appUtils/keyCodes/keys/keys.android.ts +18 -0
- package/appUtils/keyCodes/keys/keys.ios.ts +25 -0
- package/appUtils/keyCodes/keys/keys.ts +15 -0
- package/appUtils/keyCodes/{keysByPlatform.js → keys/keysByPlatform.ts} +4 -3
- package/appUtils/keyCodes/keysByPlatform.ts +8 -0
- package/appUtils/keyInputHandler/KeyInputHandler.ts +10 -32
- package/appUtils/orientationHelper.ts +1 -1
- package/appUtils/platform/const.ts +14 -0
- package/appUtils/platform/platformUtils.ts +47 -18
- package/appUtils/playerManager/index.ts +6 -2
- package/appUtils/playerManager/player.ts +9 -10
- package/appUtils/playerManager/playerNative.ts +1 -1
- package/appUtils/playerManager/usePlayerControllerSetup.tsx +1 -15
- package/arrayUtils/__tests__/__snapshots__/arrayUtils.test.ts.snap +4 -4
- package/domUtils/{cookieManager.js → cookieManager.ts} +1 -2
- package/equalUtils/index.ts +10 -3
- package/focusManager/FocusManager.ts +11 -1
- package/functionUtils/__tests__/__snapshots__/functionUtils.test.js.snap +4 -4
- package/functionUtils/index.ts +15 -11
- package/idleUtils/__tests__/withTimeout$.test.ts +37 -0
- package/idleUtils/index.ts +1 -1
- package/idleUtils/withTimeout.ts +15 -2
- package/logger/const.ts +9 -67
- package/manifestUtils/__tests__/createConfig.test.js +16 -16
- package/modalState/index.ts +1 -5
- package/navigationUtils/__tests__/__snapshots__/navigationUtils.test.js.snap +6 -6
- package/navigationUtils/__tests__/itemTypes.test.js +2 -2
- package/navigationUtils/__tests__/navigationUtils.test.js +2 -2
- package/navigationUtils/index.ts +17 -8
- package/package.json +3 -2
- package/reactHooks/autoscrolling/__tests__/useTrackCurrentAutoScrollingElement.test.ts +1 -1
- package/reactHooks/autoscrolling/__tests__/useTrackedView.test.tsx +1 -1
- package/reactHooks/cell-click/__tests__/index.test.js +10 -2
- package/reactHooks/cell-click/index.ts +7 -1
- package/reactHooks/feed/__tests__/useBuildPipesUrl.test.tsx +4 -4
- package/reactHooks/feed/__tests__/useFeedLoader.test.tsx +10 -11
- package/reactHooks/feed/useFeedLoader.tsx +1 -1
- package/reactHooks/feed/usePipesCacheReset.ts +5 -5
- package/reactHooks/flatList/__tests__/index.test.tsx +30 -21
- package/reactHooks/layout/__tests__/index.test.tsx +10 -10
- package/reactHooks/layout/useDimensions/helpers/__tests__/getInitialDimensions.native.test.js +14 -28
- package/reactHooks/layout/useDimensions/helpers/__tests__/getInitialDimensions.test.js +1 -1
- package/reactHooks/layout/useDimensions/useDimensions.ts +8 -0
- package/reactHooks/navigation/__tests__/index.test.tsx +0 -4
- package/reactHooks/navigation/index.ts +29 -218
- package/reactHooks/navigation/useGetBottomTabBarHeight.ts +12 -0
- package/reactHooks/navigation/useGetNavBarTopBorderWidth.ts +14 -0
- package/reactHooks/navigation/useGetTabBarHeight.ts +10 -0
- package/reactHooks/navigation/useIsScreenActive.ts +17 -0
- package/reactHooks/navigation/useNavigationPluginData.ts +15 -0
- package/reactHooks/navigation/useNavigationType.ts +15 -0
- package/reactHooks/navigation/usePathname.ts +4 -0
- package/reactHooks/navigation/useRoute.ts +100 -0
- package/reactHooks/navigation/useUniqueRouteSuffix.ts +41 -0
- package/reactHooks/player/TVSeekControlller/ISeekController.ts +27 -2
- package/reactHooks/player/TVSeekControlller/LongPressSeekController.ts +39 -74
- package/reactHooks/player/TVSeekControlller/TVSeekController.ts +155 -96
- package/reactHooks/player/TVSeekControlller/TapSeekController.ts +31 -53
- package/reactHooks/player/__tests__/useAutoSeek._test.tsx +115 -0
- package/reactHooks/player/__tests__/useTapSeek._test.ts +94 -0
- package/reactHooks/player/const.ts +1 -5
- package/reactHooks/state/useRefWithInitialValue.ts +14 -0
- package/reactHooks/state/useStateFromSubscribe.ts +23 -0
- package/reactHooks/usePluginConfiguration.ts +1 -1
- package/reactHooks/useSubscriberFor.ts +4 -3
- package/reactUtils/__tests__/reactUtils.test.js +10 -28
- package/reactUtils/createContext/__tests__/__snapshots__/helpers.test.js.snap +19 -19
- package/reactUtils/createContext/__tests__/__snapshots__/index.test.js.snap +2 -2
- package/reactUtils/createContext/__tests__/__snapshots__/provider.test.js.snap +3 -3
- package/reactUtils/createContext/__tests__/helpers.test.js +8 -8
- package/reactUtils/index.ts +0 -14
- package/screenState/index.ts +24 -10
- package/theme/__mocks__/index.ts +4 -0
- package/theme/index.ts +1 -1
- package/time/Timer.ts +5 -2
- package/types.ts +1 -0
- package/zappFrameworkUtils/presentPluginOneTime.ts +2 -3
- package/appUtils/keyCodes/keys.ios.js +0 -46
- package/appUtils/playerManager/DelayedSeekPlayerWrapper.tsx +0 -180
- /package/appUtils/HooksManager/{logger.js → logger.ts} +0 -0
- /package/appUtils/{directionHelper.js → directionHelper.ts} +0 -0
- /package/appUtils/keyCodes/{androidTVKeys.js → androidTVKeys.ts} +0 -0
- /package/appUtils/keyCodes/{keys.web.js → keys/keys.web.ts} +0 -0
- /package/appUtils/{localizationsHelper.js → localizationsHelper.ts} +0 -0
- /package/domUtils/{logger.js → logger.ts} +0 -0
package/reactUtils/index.ts
CHANGED
|
@@ -109,20 +109,6 @@ export const isTvOSPlatform = () => getPlatform() === "tvos";
|
|
|
109
109
|
|
|
110
110
|
export const isAndroidTVPlatform = () => getPlatform() === "android_tv";
|
|
111
111
|
|
|
112
|
-
declare global {
|
|
113
|
-
interface Window {
|
|
114
|
-
VIZIO?: {
|
|
115
|
-
Chromevox: {
|
|
116
|
-
play: (text: string) => void;
|
|
117
|
-
};
|
|
118
|
-
exitApplication: () => void;
|
|
119
|
-
setClosedCaptionHandler: (
|
|
120
|
-
callback: (isCCEnabled: boolean) => void
|
|
121
|
-
) => void;
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
112
|
/**
|
|
127
113
|
* Platforms found in userAgent string, please note that simulators
|
|
128
114
|
* might not have the same agents that the devices have
|
package/screenState/index.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { create } from "zustand";
|
|
2
2
|
import { produce } from "immer";
|
|
3
3
|
import { path } from "ramda";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { useShallow } from "zustand/react/shallow";
|
|
4
6
|
|
|
5
7
|
type ScreenState = {
|
|
6
8
|
selectedEntry: {
|
|
@@ -18,6 +20,8 @@ type ScreenStore = {
|
|
|
18
20
|
setSelectedEntry: (screenId: string, entryId: string) => void;
|
|
19
21
|
};
|
|
20
22
|
|
|
23
|
+
type SetSelectedEntry = (screenId: string, entryId: string) => void;
|
|
24
|
+
|
|
21
25
|
const useScreenStore = create<ScreenStore>((set) => ({
|
|
22
26
|
screens: screensInitialState,
|
|
23
27
|
setSelectedEntry: (screenId, entryId) =>
|
|
@@ -35,17 +39,27 @@ const useScreenStore = create<ScreenStore>((set) => ({
|
|
|
35
39
|
export function useScreenState(
|
|
36
40
|
screenId: ScreenId
|
|
37
41
|
): null | { screen: ScreenState; setSelectedEntry: (entryId: string) => void } {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
) as ScreenState;
|
|
42
|
+
const screenState = useScreenStore<ScreenState>(
|
|
43
|
+
useShallow(path(["screens", screenId]))
|
|
44
|
+
);
|
|
42
45
|
|
|
43
|
-
const setSelectedEntry = useScreenStore(
|
|
46
|
+
const setSelectedEntry = useScreenStore<SetSelectedEntry>(
|
|
47
|
+
useShallow(path(["setSelectedEntry"]))
|
|
48
|
+
);
|
|
44
49
|
|
|
45
|
-
|
|
50
|
+
const memoizedSetSelectedEntry = React.useCallback(
|
|
51
|
+
(entryId) => setSelectedEntry(screenId, entryId),
|
|
52
|
+
[screenId, setSelectedEntry]
|
|
53
|
+
);
|
|
46
54
|
|
|
47
|
-
return
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
55
|
+
return React.useMemo(
|
|
56
|
+
() =>
|
|
57
|
+
!screenId
|
|
58
|
+
? null
|
|
59
|
+
: {
|
|
60
|
+
screen: screenState,
|
|
61
|
+
setSelectedEntry: memoizedSetSelectedEntry,
|
|
62
|
+
},
|
|
63
|
+
[screenId, screenState]
|
|
64
|
+
);
|
|
51
65
|
}
|
package/theme/__mocks__/index.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
1
3
|
export const themeMock = {
|
|
2
4
|
screen_padding_top: 20,
|
|
3
5
|
screen_padding_bottom: 48,
|
|
@@ -17,3 +19,5 @@ export const themeMock = {
|
|
|
17
19
|
};
|
|
18
20
|
|
|
19
21
|
export const useTheme = jest.fn().mockReturnValue(themeMock);
|
|
22
|
+
|
|
23
|
+
export const ThemeContext = React.createContext(themeMock);
|
package/theme/index.ts
CHANGED
|
@@ -14,7 +14,7 @@ export const ThemeContext = React.createContext({
|
|
|
14
14
|
export function useTheme<
|
|
15
15
|
T extends Record<string, any> =
|
|
16
16
|
| BaseThemePropertiesTV
|
|
17
|
-
| BaseThemePropertiesMobile
|
|
17
|
+
| BaseThemePropertiesMobile,
|
|
18
18
|
>(): T {
|
|
19
19
|
const { themes, selectedThemeId } = React.useContext(ThemeContext);
|
|
20
20
|
|
package/time/Timer.ts
CHANGED
|
@@ -3,8 +3,11 @@ export class Timer {
|
|
|
3
3
|
private remaining: number;
|
|
4
4
|
private timeoutId: NodeJS.Timeout | null;
|
|
5
5
|
|
|
6
|
-
constructor(
|
|
7
|
-
|
|
6
|
+
constructor(
|
|
7
|
+
private callback: () => void,
|
|
8
|
+
private duration: number
|
|
9
|
+
) {
|
|
10
|
+
this.remaining = this.duration;
|
|
8
11
|
this.timeoutId = null;
|
|
9
12
|
}
|
|
10
13
|
|
package/types.ts
CHANGED
|
@@ -92,9 +92,8 @@ export const PresentHookPluginOneTime = (
|
|
|
92
92
|
const presentOneTimeVersionName =
|
|
93
93
|
await getLatestWatchedVersionNumberFromStorage(storageKey, namespace);
|
|
94
94
|
|
|
95
|
-
const applicationVersionName =
|
|
96
|
-
versionNameKey
|
|
97
|
-
);
|
|
95
|
+
const applicationVersionName =
|
|
96
|
+
await sessionStorage.getItem(versionNameKey);
|
|
98
97
|
|
|
99
98
|
if (!presentOneTimeVersionName || !applicationVersionName) {
|
|
100
99
|
log_info(
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/* global tizen */
|
|
2
|
-
const isTizen = typeof tizen !== "undefined";
|
|
3
|
-
|
|
4
|
-
export const KEYS = {
|
|
5
|
-
Enter: { code: "Enter", keyCode: 13 },
|
|
6
|
-
Space: { code: "Space", keyCode: 32 },
|
|
7
|
-
m: { code: "m", keyCode: 77 },
|
|
8
|
-
ArrowLeft: { code: "ArrowLeft", keyCode: 37 },
|
|
9
|
-
ArrowUp: { code: "ArrowUp", keyCode: 38 },
|
|
10
|
-
ArrowRight: { code: "ArrowRight", keyCode: 39 },
|
|
11
|
-
ArrowDown: { code: "ArrowDown", keyCode: 40 },
|
|
12
|
-
Back: isTizen
|
|
13
|
-
? { code: "Back", keyCode: 10009 }
|
|
14
|
-
: { code: "Backspace", keyCode: 8 },
|
|
15
|
-
Play: isTizen
|
|
16
|
-
? { code: "MediaPlay", keyCode: 10252 }
|
|
17
|
-
: { code: "PlayPause", keyCode: 179 },
|
|
18
|
-
Pause: isTizen
|
|
19
|
-
? { code: "MediaPause", keyCode: 19 }
|
|
20
|
-
: { code: "Pause", keyCode: 179 },
|
|
21
|
-
Forward: isTizen
|
|
22
|
-
? { code: "MediaFastForward", keyCode: 417 }
|
|
23
|
-
: { code: "Forward", keyCode: 176 },
|
|
24
|
-
Rewind: isTizen
|
|
25
|
-
? { code: "MediaRewind", keyCode: 412 }
|
|
26
|
-
: { code: "Rewind", keyCode: 177 },
|
|
27
|
-
VolumeUp: isTizen
|
|
28
|
-
? { code: "VolumeUp", keyCode: 447 }
|
|
29
|
-
: { code: "VolumeUp", keyCode: 175 },
|
|
30
|
-
VolumeDown: isTizen
|
|
31
|
-
? { code: "VolumeDown", keyCode: 448 }
|
|
32
|
-
: { code: "VolumeDown", keyCode: 174 },
|
|
33
|
-
ToggleMute: isTizen
|
|
34
|
-
? { code: "VolumeMute", keyCode: 449 }
|
|
35
|
-
: { code: "VolumeMute", keyCode: 173 },
|
|
36
|
-
Stop: isTizen
|
|
37
|
-
? { code: "MediaStop", keyCode: 413 }
|
|
38
|
-
: { code: "Q", keyCode: 81 },
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export const ARROW_KEYS = [
|
|
42
|
-
KEYS.ArrowUp,
|
|
43
|
-
KEYS.ArrowLeft,
|
|
44
|
-
KEYS.ArrowDown,
|
|
45
|
-
KEYS.ArrowRight,
|
|
46
|
-
];
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import { Player } from "./player";
|
|
2
|
-
import { BehaviorSubject } from "rxjs";
|
|
3
|
-
|
|
4
|
-
export class DelayedSeekPlayerWrapper extends Player {
|
|
5
|
-
private wrappedPlayer: Player;
|
|
6
|
-
private delayedSeekPosition: number;
|
|
7
|
-
private wasPlaying: boolean;
|
|
8
|
-
|
|
9
|
-
constructor(props, player: Player) {
|
|
10
|
-
super(props);
|
|
11
|
-
this.wrappedPlayer = player;
|
|
12
|
-
this.delayedSeekPosition = null;
|
|
13
|
-
|
|
14
|
-
this.wrappedPlayer.addListener({
|
|
15
|
-
id: "Master-Wrapper-Listener",
|
|
16
|
-
listener: this,
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
this.onPlayerSeekComplete = this.onPlayerSeekComplete.bind(this);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
getOverlayObservable = () => {
|
|
23
|
-
return this.wrappedPlayer.getOverlayObservable();
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
getEntryObservable = (): BehaviorSubject<ZappEntry | null> => {
|
|
27
|
-
return this.wrappedPlayer.getEntryObservable();
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
getEntry = (): ZappEntry | null => this.wrappedPlayer.getEntry();
|
|
31
|
-
|
|
32
|
-
getListener = (): QuickBrickPlayer.SharedPlayerCallBacks => {
|
|
33
|
-
return this.wrappedPlayer.getListener();
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
togglePlayPause = () => {
|
|
37
|
-
this.wrappedPlayer.togglePlayPause();
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
selectTrack = (_track) => this.wrappedPlayer.selectTrack(_track);
|
|
41
|
-
|
|
42
|
-
// Implement all default methods by delegating them to wrapped player
|
|
43
|
-
public seekTo = (position: number) => {
|
|
44
|
-
this.wrappedPlayer.seekTo(position);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
public isPlaying = () => {
|
|
48
|
-
return this.wrappedPlayer.isPlaying();
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
public isPaused = () => {
|
|
52
|
-
return this.wrappedPlayer.isPaused();
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
public play = () => {
|
|
56
|
-
this.wrappedPlayer.play();
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
public pause = () => {
|
|
60
|
-
this.wrappedPlayer.pause();
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
getState = () => {
|
|
64
|
-
const currentState = this.wrappedPlayer.getState();
|
|
65
|
-
|
|
66
|
-
if (this.delayedSeekPosition === null) {
|
|
67
|
-
return currentState;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return {
|
|
71
|
-
...currentState,
|
|
72
|
-
contentPosition: this.delayedSeekPosition,
|
|
73
|
-
isPaused: false,
|
|
74
|
-
seekPosition: this.delayedSeekPosition,
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
forward = (deltaTime: number) => {
|
|
79
|
-
if (this.delayedSeekPosition !== null) {
|
|
80
|
-
this.delayedSeekPosition += deltaTime;
|
|
81
|
-
this.playerState.seekPosition = this.delayedSeekPosition;
|
|
82
|
-
|
|
83
|
-
this.onVideoProgress({
|
|
84
|
-
currentTime: this.playerState.seekPosition,
|
|
85
|
-
duration: this.getDuration(),
|
|
86
|
-
seekableDuration: this.playerState.seekableDuration,
|
|
87
|
-
isLive: this.playerState.isLive,
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
// this.scheduleResumePlayback(DELAYED_SEEK_DELAY, this.delayedSeekPosition);
|
|
91
|
-
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
if (this.playerState.seekPosition == null) {
|
|
96
|
-
this.playerState.seekPosition = this.playerState.contentPosition;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
this.playerState.seekPosition += deltaTime;
|
|
100
|
-
|
|
101
|
-
this.wrappedPlayer.forward(deltaTime);
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
rewind = (deltaTime: number) => {
|
|
105
|
-
if (this.delayedSeekPosition !== null) {
|
|
106
|
-
this.delayedSeekPosition -= deltaTime;
|
|
107
|
-
|
|
108
|
-
if (this.delayedSeekPosition < 0) {
|
|
109
|
-
this.delayedSeekPosition = 0;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
this.playerState.seekPosition = this.delayedSeekPosition;
|
|
113
|
-
|
|
114
|
-
this.onVideoProgress({
|
|
115
|
-
currentTime: this.playerState.seekPosition,
|
|
116
|
-
duration: this.getDuration(),
|
|
117
|
-
seekableDuration: this.playerState.seekableDuration,
|
|
118
|
-
isLive: this.playerState.isLive,
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
// this.scheduleResumePlayback(DELAYED_SEEK_DELAY, this.delayedSeekPosition);
|
|
122
|
-
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if (this.playerState.seekPosition == null) {
|
|
127
|
-
this.playerState.seekPosition = this.playerState.contentPosition;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
this.playerState.seekPosition -= deltaTime;
|
|
131
|
-
this.wrappedPlayer.rewind(deltaTime);
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
public getConfig = () => this.wrappedPlayer.getConfig();
|
|
135
|
-
|
|
136
|
-
// TODO: replace with enum of supported orientations
|
|
137
|
-
isFullScreenSupported(): boolean {
|
|
138
|
-
return this.wrappedPlayer.isFullScreenSupported();
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
public supportsNativeControls = (): boolean =>
|
|
142
|
-
this.wrappedPlayer.supportsNativeControls();
|
|
143
|
-
|
|
144
|
-
public supportNativeCast = (): boolean =>
|
|
145
|
-
this.wrappedPlayer.supportNativeCast();
|
|
146
|
-
|
|
147
|
-
public isInDelayedSeek = () => this.delayedSeekPosition !== null;
|
|
148
|
-
|
|
149
|
-
public enterDelayedSeek() {
|
|
150
|
-
if (this.delayedSeekPosition !== null) {
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
if (this.playerState.seekPosition === null) {
|
|
155
|
-
this.playerState.seekPosition = this.playerState.contentPosition;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
this.delayedSeekPosition = this.playerState.seekPosition;
|
|
159
|
-
|
|
160
|
-
if (!this.isPaused()) {
|
|
161
|
-
this.wasPlaying = true;
|
|
162
|
-
this.wrappedPlayer.pause();
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
public exitDelayedSeek() {
|
|
167
|
-
if (this.delayedSeekPosition === null) {
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
this.wrappedPlayer.seekTo(this.delayedSeekPosition);
|
|
172
|
-
|
|
173
|
-
if (this.wasPlaying) {
|
|
174
|
-
this.wasPlaying = false;
|
|
175
|
-
this.wrappedPlayer.play();
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
this.delayedSeekPosition = null;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|