native-fn 1.2.0 → 1.2.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.
- package/README.md +145 -33
- package/dist/index.d.ts +12 -6
- package/dist/native.cjs +180 -102
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +180 -102
- package/dist/native.umd.js +180 -102
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/appearance/index.cjs +8 -3
- package/dist/plugin/appearance/index.mjs +8 -3
- package/dist/plugin/appearance/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
- package/dist/plugin/appearance/src/plugin/pip/types/pip.d.ts +5 -2
- package/dist/plugin/appearance/src/types/subscription-manager.d.ts +1 -1
- package/dist/plugin/badge/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
- package/dist/plugin/badge/src/plugin/pip/types/pip.d.ts +5 -2
- package/dist/plugin/badge/src/types/subscription-manager.d.ts +1 -1
- package/dist/plugin/battery/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
- package/dist/plugin/battery/src/plugin/pip/types/pip.d.ts +5 -2
- package/dist/plugin/battery/src/types/subscription-manager.d.ts +1 -1
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
- package/dist/plugin/clipboard/src/plugin/pip/types/pip.d.ts +5 -2
- package/dist/plugin/clipboard/src/types/subscription-manager.d.ts +1 -1
- package/dist/plugin/dimension/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
- package/dist/plugin/dimension/src/plugin/pip/types/pip.d.ts +5 -2
- package/dist/plugin/dimension/src/types/subscription-manager.d.ts +1 -1
- package/dist/plugin/fullscreen/index.cjs +93 -54
- package/dist/plugin/fullscreen/index.d.ts +7 -4
- package/dist/plugin/fullscreen/index.mjs +93 -54
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
- package/dist/plugin/fullscreen/src/plugin/pip/types/pip.d.ts +5 -2
- package/dist/plugin/fullscreen/src/types/subscription-manager.d.ts +1 -1
- package/dist/plugin/geolocation/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
- package/dist/plugin/geolocation/src/plugin/pip/types/pip.d.ts +5 -2
- package/dist/plugin/geolocation/src/types/subscription-manager.d.ts +1 -1
- package/dist/plugin/notification/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
- package/dist/plugin/notification/src/plugin/pip/types/pip.d.ts +5 -2
- package/dist/plugin/notification/src/types/subscription-manager.d.ts +1 -1
- package/dist/plugin/open/index.cjs +8 -3
- package/dist/plugin/open/index.mjs +8 -3
- package/dist/plugin/open/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
- package/dist/plugin/open/src/plugin/pip/types/pip.d.ts +5 -2
- package/dist/plugin/open/src/types/subscription-manager.d.ts +1 -1
- package/dist/plugin/permission/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
- package/dist/plugin/permission/src/plugin/pip/types/pip.d.ts +5 -2
- package/dist/plugin/permission/src/types/subscription-manager.d.ts +1 -1
- package/dist/plugin/pip/index.cjs +448 -47
- package/dist/plugin/pip/index.d.ts +5 -2
- package/dist/plugin/pip/index.mjs +448 -47
- package/dist/plugin/pip/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
- package/dist/plugin/pip/src/plugin/pip/types/pip.d.ts +5 -2
- package/dist/plugin/pip/src/types/subscription-manager.d.ts +1 -1
- package/dist/plugin/platform/index.cjs +8 -3
- package/dist/plugin/platform/index.mjs +8 -3
- package/dist/plugin/platform/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
- package/dist/plugin/platform/src/plugin/pip/types/pip.d.ts +5 -2
- package/dist/plugin/platform/src/types/subscription-manager.d.ts +1 -1
- package/dist/plugin/theme/index.cjs +8 -3
- package/dist/plugin/theme/index.mjs +8 -3
- package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
- package/dist/plugin/theme/src/plugin/pip/types/pip.d.ts +5 -2
- package/dist/plugin/theme/src/types/subscription-manager.d.ts +1 -1
- package/dist/plugin/vibration/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
- package/dist/plugin/vibration/src/plugin/pip/types/pip.d.ts +5 -2
- package/dist/plugin/vibration/src/types/subscription-manager.d.ts +1 -1
- package/dist/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
- package/dist/src/plugin/pip/types/pip.d.ts +5 -2
- package/dist/src/types/subscription-manager.d.ts +1 -1
- package/package.json +1 -1
|
@@ -652,10 +652,15 @@ function parseFromHighEntropyValues() {
|
|
|
652
652
|
parsedFromHighEntropyValuesEngine.version = brandVersion;
|
|
653
653
|
}
|
|
654
654
|
if (typeof platformVersion === 'string') {
|
|
655
|
-
if (getParsedCache().os.name === OS.Windows)
|
|
656
|
-
|
|
657
|
-
|
|
655
|
+
if (getParsedCache().os.name === OS.Windows) {
|
|
656
|
+
if (parseInt(platformVersion.split('.')[0], 10) >= 13)
|
|
657
|
+
parsedFromHighEntropyValuesOS.version = '11';
|
|
658
|
+
else
|
|
659
|
+
parsedFromHighEntropyValuesOS.version = '10';
|
|
660
|
+
}
|
|
661
|
+
else {
|
|
658
662
|
parsedFromHighEntropyValuesOS.version = platformVersion;
|
|
663
|
+
}
|
|
659
664
|
}
|
|
660
665
|
if (typeof platform === 'string') {
|
|
661
666
|
if (/android/i.test(platform))
|
|
@@ -904,7 +909,8 @@ var NotSupportedError = createCustomError('NotSupportedError');
|
|
|
904
909
|
|
|
905
910
|
var InvalidStateError = createCustomError('InvalidStateError');
|
|
906
911
|
|
|
907
|
-
var
|
|
912
|
+
var videoElement = null;
|
|
913
|
+
var lastFallbackVideoElement = null;
|
|
908
914
|
var eventsBridged = false;
|
|
909
915
|
var FS_BRIDGE_KEY = (function () {
|
|
910
916
|
if (typeof Symbol === 'function') {
|
|
@@ -950,24 +956,33 @@ var onChangeSubscriptionManager = createSubscriptionManager(attachOnChange, deta
|
|
|
950
956
|
var onErrorSubscriptionManager = createSubscriptionManager(attachOnError, detachOnError);
|
|
951
957
|
var Fullscreen = {
|
|
952
958
|
get supported() {
|
|
953
|
-
return
|
|
959
|
+
return getSupported();
|
|
954
960
|
},
|
|
955
961
|
get element() {
|
|
956
962
|
return getElement();
|
|
957
963
|
},
|
|
958
|
-
get
|
|
959
|
-
return
|
|
964
|
+
get isActive() {
|
|
965
|
+
return getIsActive();
|
|
960
966
|
},
|
|
961
967
|
request: request,
|
|
962
968
|
exit: exit,
|
|
963
|
-
|
|
964
|
-
|
|
969
|
+
toggle: toggle,
|
|
970
|
+
onChange: onChange,
|
|
971
|
+
onError: onError,
|
|
965
972
|
Constants: {},
|
|
966
973
|
Errors: {
|
|
967
974
|
NotSupportedError: NotSupportedError,
|
|
968
975
|
InvalidStateError: InvalidStateError,
|
|
969
976
|
},
|
|
970
977
|
};
|
|
978
|
+
function getHTMLVideoElement() {
|
|
979
|
+
var selected = globalThis.document.querySelector('video');
|
|
980
|
+
if (selected !== null)
|
|
981
|
+
return selected;
|
|
982
|
+
if (videoElement === null)
|
|
983
|
+
return videoElement = globalThis.document.createElement('video');
|
|
984
|
+
return videoElement;
|
|
985
|
+
}
|
|
971
986
|
function hasStandardApi() {
|
|
972
987
|
return api !== null;
|
|
973
988
|
}
|
|
@@ -990,27 +1005,24 @@ function detectApi() {
|
|
|
990
1005
|
function getDefaultTarget() {
|
|
991
1006
|
if (Platform.os.name === OS.iOS) {
|
|
992
1007
|
var video = globalThis.document.querySelector('video');
|
|
993
|
-
|
|
1008
|
+
if (video !== null)
|
|
1009
|
+
return video;
|
|
1010
|
+
return undefined;
|
|
994
1011
|
}
|
|
995
1012
|
return globalThis.document.documentElement;
|
|
996
1013
|
}
|
|
997
|
-
function
|
|
1014
|
+
function getSupported() {
|
|
998
1015
|
if (api !== null)
|
|
999
1016
|
return globalThis.document[api.enabled] === true;
|
|
1000
1017
|
if (Platform.os.name !== OS.iOS)
|
|
1001
1018
|
return false;
|
|
1002
|
-
var video;
|
|
1003
|
-
var selected = globalThis.document.querySelector('video');
|
|
1004
|
-
if (selected !== null)
|
|
1005
|
-
video = selected;
|
|
1006
|
-
else
|
|
1007
|
-
video = globalThis.document.createElement('video');
|
|
1019
|
+
var video = getHTMLVideoElement();
|
|
1008
1020
|
return video.webkitSupportsFullscreen === true || typeof video.webkitEnterFullscreen === 'function';
|
|
1009
1021
|
}
|
|
1010
1022
|
function getElement() {
|
|
1011
1023
|
if (api === null) {
|
|
1012
|
-
if (
|
|
1013
|
-
return
|
|
1024
|
+
if (lastFallbackVideoElement !== null && lastFallbackVideoElement.webkitDisplayingFullscreen === true)
|
|
1025
|
+
return lastFallbackVideoElement;
|
|
1014
1026
|
return null;
|
|
1015
1027
|
}
|
|
1016
1028
|
var currentElement = globalThis.document[api.element];
|
|
@@ -1018,43 +1030,43 @@ function getElement() {
|
|
|
1018
1030
|
return currentElement;
|
|
1019
1031
|
return null;
|
|
1020
1032
|
}
|
|
1021
|
-
function
|
|
1033
|
+
function getIsActive() {
|
|
1022
1034
|
return getElement() !== null;
|
|
1023
1035
|
}
|
|
1024
|
-
function createEventPayload(nativeEvent, element,
|
|
1036
|
+
function createEventPayload(nativeEvent, element, isActive) {
|
|
1025
1037
|
return {
|
|
1026
1038
|
nativeEvent: nativeEvent,
|
|
1027
1039
|
element: element,
|
|
1028
|
-
|
|
1040
|
+
isActive: isActive,
|
|
1029
1041
|
};
|
|
1030
1042
|
}
|
|
1031
|
-
function emitChange(nativeEvent, element,
|
|
1032
|
-
onChangeSubscriptionManager.emit(createEventPayload(nativeEvent, element,
|
|
1043
|
+
function emitChange(nativeEvent, element, isActive) {
|
|
1044
|
+
onChangeSubscriptionManager.emit(createEventPayload(nativeEvent, element, isActive));
|
|
1033
1045
|
}
|
|
1034
|
-
function emitError(nativeEvent, element,
|
|
1035
|
-
onErrorSubscriptionManager.emit(createEventPayload(nativeEvent, element,
|
|
1046
|
+
function emitError(nativeEvent, element, isActive) {
|
|
1047
|
+
onErrorSubscriptionManager.emit(createEventPayload(nativeEvent, element, isActive));
|
|
1036
1048
|
}
|
|
1037
1049
|
function onFullscreenChange(event) {
|
|
1038
1050
|
var target = event.target;
|
|
1039
1051
|
if (target instanceof globalThis.Element)
|
|
1040
|
-
emitChange(event, target,
|
|
1052
|
+
emitChange(event, target, getIsActive());
|
|
1041
1053
|
if (target instanceof globalThis.Document)
|
|
1042
|
-
emitChange(event, globalThis.document.documentElement,
|
|
1054
|
+
emitChange(event, globalThis.document.documentElement, getIsActive());
|
|
1043
1055
|
}
|
|
1044
1056
|
function onFullscreenError(event) {
|
|
1045
1057
|
var target = event.target;
|
|
1046
1058
|
if (target instanceof globalThis.Element)
|
|
1047
|
-
emitError(event, target,
|
|
1059
|
+
emitError(event, target, getIsActive());
|
|
1048
1060
|
if (target instanceof globalThis.Document)
|
|
1049
|
-
emitError(event, globalThis.document.documentElement,
|
|
1061
|
+
emitError(event, globalThis.document.documentElement, getIsActive());
|
|
1050
1062
|
}
|
|
1051
1063
|
function onIOSBeginFullscreen(event) {
|
|
1052
|
-
|
|
1064
|
+
lastFallbackVideoElement = this;
|
|
1053
1065
|
emitChange(event, this, true);
|
|
1054
1066
|
}
|
|
1055
1067
|
function onIOSEndFullscreen(event) {
|
|
1056
|
-
if (
|
|
1057
|
-
|
|
1068
|
+
if (lastFallbackVideoElement === this)
|
|
1069
|
+
lastFallbackVideoElement = null;
|
|
1058
1070
|
emitChange(event, this, false);
|
|
1059
1071
|
}
|
|
1060
1072
|
function bridgeSingleVideoNode(video) {
|
|
@@ -1081,13 +1093,13 @@ function bridgeEvents() {
|
|
|
1081
1093
|
if (typeof globalThis.MutationObserver === 'undefined')
|
|
1082
1094
|
return;
|
|
1083
1095
|
var observer = new globalThis.MutationObserver(function (records) {
|
|
1084
|
-
if (
|
|
1096
|
+
if (lastFallbackVideoElement !== null) {
|
|
1085
1097
|
var removed = false;
|
|
1086
1098
|
for (var i = 0; i < records.length; i++) {
|
|
1087
1099
|
var removedNodes = records[i].removedNodes;
|
|
1088
1100
|
for (var j = 0; j < removedNodes.length; j++) {
|
|
1089
1101
|
var node = removedNodes[j];
|
|
1090
|
-
if (node ===
|
|
1102
|
+
if (node === lastFallbackVideoElement || (node.nodeType === Node.ELEMENT_NODE && node.contains(lastFallbackVideoElement))) {
|
|
1091
1103
|
removed = true;
|
|
1092
1104
|
break;
|
|
1093
1105
|
}
|
|
@@ -1095,8 +1107,8 @@ function bridgeEvents() {
|
|
|
1095
1107
|
if (removed)
|
|
1096
1108
|
break;
|
|
1097
1109
|
}
|
|
1098
|
-
if (removed && !globalThis.document.contains(
|
|
1099
|
-
|
|
1110
|
+
if (removed && !globalThis.document.contains(lastFallbackVideoElement))
|
|
1111
|
+
lastFallbackVideoElement = null;
|
|
1100
1112
|
}
|
|
1101
1113
|
for (var i = 0; i < records.length; i++) {
|
|
1102
1114
|
var addedNodes = records[i].addedNodes;
|
|
@@ -1149,8 +1161,10 @@ function request(target, options) {
|
|
|
1149
1161
|
target = getDefaultTarget();
|
|
1150
1162
|
if (typeof target === 'undefined')
|
|
1151
1163
|
return reject(new NotSupportedError('Failed to enter fullscreen mode.'));
|
|
1164
|
+
if (getIsActive() && getElement() !== target && Platform.browser.name === Browsers.Safari && Platform.os.name === OS.iOS)
|
|
1165
|
+
return reject(new NotSupportedError('There is already a Fullscreen element in this document.'));
|
|
1152
1166
|
var tagName = target.tagName.toLowerCase();
|
|
1153
|
-
var isIOSFullscreenActive =
|
|
1167
|
+
var isIOSFullscreenActive = lastFallbackVideoElement !== null && lastFallbackVideoElement.webkitDisplayingFullscreen === true;
|
|
1154
1168
|
if (api !== null) {
|
|
1155
1169
|
var method = target[api.request];
|
|
1156
1170
|
if (typeof method === 'function' && !isIOSFullscreenActive) {
|
|
@@ -1164,7 +1178,7 @@ function request(target, options) {
|
|
|
1164
1178
|
return reject(new NotSupportedError('The "' + tagName + '" element does not support fullscreen requests.'));
|
|
1165
1179
|
fallbackToIOSVideo();
|
|
1166
1180
|
}
|
|
1167
|
-
catch (
|
|
1181
|
+
catch (e) {
|
|
1168
1182
|
reject(new NotSupportedError('The "' + tagName + '" element does not support fullscreen requests.'));
|
|
1169
1183
|
}
|
|
1170
1184
|
});
|
|
@@ -1183,7 +1197,8 @@ function request(target, options) {
|
|
|
1183
1197
|
video_1.play()
|
|
1184
1198
|
.then(function () {
|
|
1185
1199
|
try {
|
|
1186
|
-
video_1.webkitEnterFullscreen
|
|
1200
|
+
if (video_1.webkitSupportsFullscreen && typeof video_1.webkitEnterFullscreen === 'function')
|
|
1201
|
+
video_1.webkitEnterFullscreen();
|
|
1187
1202
|
}
|
|
1188
1203
|
catch (e) {
|
|
1189
1204
|
return reject(new InvalidStateError('The object is in an invalid state.'));
|
|
@@ -1198,7 +1213,7 @@ function request(target, options) {
|
|
|
1198
1213
|
return reject(new InvalidStateError('The object is in an invalid state.'));
|
|
1199
1214
|
}
|
|
1200
1215
|
}
|
|
1201
|
-
|
|
1216
|
+
lastFallbackVideoElement = video_1;
|
|
1202
1217
|
return resolve();
|
|
1203
1218
|
}
|
|
1204
1219
|
}
|
|
@@ -1216,16 +1231,7 @@ function exit() {
|
|
|
1216
1231
|
if (typeof result !== 'undefined' && typeof result.then === 'function') {
|
|
1217
1232
|
result
|
|
1218
1233
|
.then(resolve)
|
|
1219
|
-
.catch(
|
|
1220
|
-
try {
|
|
1221
|
-
if (Platform.os.name !== OS.iOS)
|
|
1222
|
-
return reject(new NotSupportedError('Failed to exit fullscreen mode.'));
|
|
1223
|
-
fallbackToIOSVideo();
|
|
1224
|
-
}
|
|
1225
|
-
catch (_e) {
|
|
1226
|
-
reject(new NotSupportedError('Failed to exit fullscreen mode.'));
|
|
1227
|
-
}
|
|
1228
|
-
});
|
|
1234
|
+
.catch(resolve);
|
|
1229
1235
|
return;
|
|
1230
1236
|
}
|
|
1231
1237
|
return resolve();
|
|
@@ -1236,12 +1242,12 @@ function exit() {
|
|
|
1236
1242
|
reject(new NotSupportedError('Failed to exit fullscreen mode.'));
|
|
1237
1243
|
return;
|
|
1238
1244
|
}
|
|
1239
|
-
var target =
|
|
1245
|
+
var target = lastFallbackVideoElement;
|
|
1240
1246
|
if (target !== null && typeof target.webkitExitFullscreen === 'function' && target.webkitDisplayingFullscreen === true) {
|
|
1241
1247
|
target.webkitExitFullscreen();
|
|
1242
1248
|
if (target.webkitDisplayingFullscreen)
|
|
1243
1249
|
return reject(new NotSupportedError('Failed to exit fullscreen mode.'));
|
|
1244
|
-
|
|
1250
|
+
lastFallbackVideoElement = null;
|
|
1245
1251
|
return resolve();
|
|
1246
1252
|
}
|
|
1247
1253
|
var videos = globalThis.document.querySelectorAll('video');
|
|
@@ -1251,7 +1257,7 @@ function exit() {
|
|
|
1251
1257
|
video.webkitExitFullscreen();
|
|
1252
1258
|
if (video.webkitDisplayingFullscreen)
|
|
1253
1259
|
return reject(new NotSupportedError('Failed to exit fullscreen mode.'));
|
|
1254
|
-
|
|
1260
|
+
lastFallbackVideoElement = null;
|
|
1255
1261
|
return resolve();
|
|
1256
1262
|
}
|
|
1257
1263
|
}
|
|
@@ -1262,6 +1268,39 @@ function exit() {
|
|
|
1262
1268
|
fallbackToIOSVideo();
|
|
1263
1269
|
});
|
|
1264
1270
|
}
|
|
1271
|
+
function toggle(target, options) {
|
|
1272
|
+
var current = getElement();
|
|
1273
|
+
if (typeof target !== 'undefined') {
|
|
1274
|
+
if (current === target)
|
|
1275
|
+
return this.exit();
|
|
1276
|
+
return this.request(target, options);
|
|
1277
|
+
}
|
|
1278
|
+
if (current !== null)
|
|
1279
|
+
return this.exit();
|
|
1280
|
+
return this.request(undefined, options);
|
|
1281
|
+
}
|
|
1282
|
+
function onChange(targetOrListener, listenerOrOptions, options) {
|
|
1283
|
+
if (typeof targetOrListener === 'function')
|
|
1284
|
+
return onChangeSubscriptionManager.subscribe(targetOrListener, listenerOrOptions);
|
|
1285
|
+
var target = targetOrListener;
|
|
1286
|
+
var listener = listenerOrOptions;
|
|
1287
|
+
function wrappedListener(payload) {
|
|
1288
|
+
if (payload.element === target)
|
|
1289
|
+
listener(payload);
|
|
1290
|
+
}
|
|
1291
|
+
return onChangeSubscriptionManager.subscribe(wrappedListener, options);
|
|
1292
|
+
}
|
|
1293
|
+
function onError(targetOrListener, listenerOrOptions, options) {
|
|
1294
|
+
if (typeof targetOrListener === 'function')
|
|
1295
|
+
return onErrorSubscriptionManager.subscribe(targetOrListener, listenerOrOptions);
|
|
1296
|
+
var target = targetOrListener;
|
|
1297
|
+
var listener = listenerOrOptions;
|
|
1298
|
+
function wrappedListener(payload) {
|
|
1299
|
+
if (payload.element === target)
|
|
1300
|
+
listener(payload);
|
|
1301
|
+
}
|
|
1302
|
+
return onErrorSubscriptionManager.subscribe(wrappedListener, options);
|
|
1303
|
+
}
|
|
1265
1304
|
bridgeEvents();
|
|
1266
1305
|
|
|
1267
1306
|
export { Fullscreen as default };
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { NotSupportedError } from "../../../errors/not-supported-error";
|
|
2
2
|
import { InvalidStateError } from "../../../errors/invalid-state-error";
|
|
3
3
|
export declare interface FullscreenInstance {
|
|
4
|
-
supported: boolean;
|
|
5
|
-
element: Element | null;
|
|
6
|
-
|
|
4
|
+
get supported(): boolean;
|
|
5
|
+
get element(): Element | null;
|
|
6
|
+
get isActive(): boolean;
|
|
7
7
|
request(target?: Element, options?: FullscreenOptions): Promise<void>;
|
|
8
|
+
toggle(target?: Element, options?: FullscreenOptions): Promise<void>;
|
|
8
9
|
exit(): Promise<void>;
|
|
9
10
|
onChange(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
|
+
onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
10
12
|
onError(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
13
|
+
onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
14
|
Constants: {};
|
|
12
15
|
Errors: {
|
|
13
16
|
NotSupportedError: typeof NotSupportedError;
|
|
@@ -17,5 +20,5 @@ export declare interface FullscreenInstance {
|
|
|
17
20
|
export declare interface FullscreenEventPayload {
|
|
18
21
|
nativeEvent: Event;
|
|
19
22
|
element: Element;
|
|
20
|
-
|
|
23
|
+
isActive: boolean;
|
|
21
24
|
}
|
|
@@ -3,11 +3,14 @@ import { InvalidStateError } from "../../../errors/invalid-state-error";
|
|
|
3
3
|
export declare interface PipInstance {
|
|
4
4
|
get supported(): boolean;
|
|
5
5
|
get element(): HTMLVideoElement | null;
|
|
6
|
-
get
|
|
6
|
+
get isActive(): boolean;
|
|
7
7
|
request(target?: HTMLVideoElement): Promise<void>;
|
|
8
8
|
exit(): Promise<void>;
|
|
9
|
+
toggle(target?: HTMLVideoElement): Promise<void>;
|
|
9
10
|
onChange(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
|
+
onChange(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
10
12
|
onError(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
13
|
+
onError(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
14
|
Constants: {};
|
|
12
15
|
Errors: {
|
|
13
16
|
NotSupportedError: typeof NotSupportedError;
|
|
@@ -17,5 +20,5 @@ export declare interface PipInstance {
|
|
|
17
20
|
export declare interface PipEventPayload {
|
|
18
21
|
nativeEvent: Event;
|
|
19
22
|
element: HTMLVideoElement;
|
|
20
|
-
|
|
23
|
+
isActive: boolean;
|
|
21
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare interface SubscriptionManager<T, U> {
|
|
2
2
|
emit: (value: U) => void;
|
|
3
|
-
subscribe: (
|
|
3
|
+
subscribe: (listener: (value: U) => void, options?: AddEventListenerOptions) => () => void;
|
|
4
4
|
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { NotSupportedError } from "../../../errors/not-supported-error";
|
|
2
2
|
import { InvalidStateError } from "../../../errors/invalid-state-error";
|
|
3
3
|
export declare interface FullscreenInstance {
|
|
4
|
-
supported: boolean;
|
|
5
|
-
element: Element | null;
|
|
6
|
-
|
|
4
|
+
get supported(): boolean;
|
|
5
|
+
get element(): Element | null;
|
|
6
|
+
get isActive(): boolean;
|
|
7
7
|
request(target?: Element, options?: FullscreenOptions): Promise<void>;
|
|
8
|
+
toggle(target?: Element, options?: FullscreenOptions): Promise<void>;
|
|
8
9
|
exit(): Promise<void>;
|
|
9
10
|
onChange(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
|
+
onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
10
12
|
onError(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
13
|
+
onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
14
|
Constants: {};
|
|
12
15
|
Errors: {
|
|
13
16
|
NotSupportedError: typeof NotSupportedError;
|
|
@@ -17,5 +20,5 @@ export declare interface FullscreenInstance {
|
|
|
17
20
|
export declare interface FullscreenEventPayload {
|
|
18
21
|
nativeEvent: Event;
|
|
19
22
|
element: Element;
|
|
20
|
-
|
|
23
|
+
isActive: boolean;
|
|
21
24
|
}
|
|
@@ -3,11 +3,14 @@ import { InvalidStateError } from "../../../errors/invalid-state-error";
|
|
|
3
3
|
export declare interface PipInstance {
|
|
4
4
|
get supported(): boolean;
|
|
5
5
|
get element(): HTMLVideoElement | null;
|
|
6
|
-
get
|
|
6
|
+
get isActive(): boolean;
|
|
7
7
|
request(target?: HTMLVideoElement): Promise<void>;
|
|
8
8
|
exit(): Promise<void>;
|
|
9
|
+
toggle(target?: HTMLVideoElement): Promise<void>;
|
|
9
10
|
onChange(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
|
+
onChange(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
10
12
|
onError(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
13
|
+
onError(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
14
|
Constants: {};
|
|
12
15
|
Errors: {
|
|
13
16
|
NotSupportedError: typeof NotSupportedError;
|
|
@@ -17,5 +20,5 @@ export declare interface PipInstance {
|
|
|
17
20
|
export declare interface PipEventPayload {
|
|
18
21
|
nativeEvent: Event;
|
|
19
22
|
element: HTMLVideoElement;
|
|
20
|
-
|
|
23
|
+
isActive: boolean;
|
|
21
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare interface SubscriptionManager<T, U> {
|
|
2
2
|
emit: (value: U) => void;
|
|
3
|
-
subscribe: (
|
|
3
|
+
subscribe: (listener: (value: U) => void, options?: AddEventListenerOptions) => () => void;
|
|
4
4
|
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { NotSupportedError } from "../../../errors/not-supported-error";
|
|
2
2
|
import { InvalidStateError } from "../../../errors/invalid-state-error";
|
|
3
3
|
export declare interface FullscreenInstance {
|
|
4
|
-
supported: boolean;
|
|
5
|
-
element: Element | null;
|
|
6
|
-
|
|
4
|
+
get supported(): boolean;
|
|
5
|
+
get element(): Element | null;
|
|
6
|
+
get isActive(): boolean;
|
|
7
7
|
request(target?: Element, options?: FullscreenOptions): Promise<void>;
|
|
8
|
+
toggle(target?: Element, options?: FullscreenOptions): Promise<void>;
|
|
8
9
|
exit(): Promise<void>;
|
|
9
10
|
onChange(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
|
+
onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
10
12
|
onError(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
13
|
+
onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
14
|
Constants: {};
|
|
12
15
|
Errors: {
|
|
13
16
|
NotSupportedError: typeof NotSupportedError;
|
|
@@ -17,5 +20,5 @@ export declare interface FullscreenInstance {
|
|
|
17
20
|
export declare interface FullscreenEventPayload {
|
|
18
21
|
nativeEvent: Event;
|
|
19
22
|
element: Element;
|
|
20
|
-
|
|
23
|
+
isActive: boolean;
|
|
21
24
|
}
|
|
@@ -3,11 +3,14 @@ import { InvalidStateError } from "../../../errors/invalid-state-error";
|
|
|
3
3
|
export declare interface PipInstance {
|
|
4
4
|
get supported(): boolean;
|
|
5
5
|
get element(): HTMLVideoElement | null;
|
|
6
|
-
get
|
|
6
|
+
get isActive(): boolean;
|
|
7
7
|
request(target?: HTMLVideoElement): Promise<void>;
|
|
8
8
|
exit(): Promise<void>;
|
|
9
|
+
toggle(target?: HTMLVideoElement): Promise<void>;
|
|
9
10
|
onChange(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
|
+
onChange(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
10
12
|
onError(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
13
|
+
onError(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
14
|
Constants: {};
|
|
12
15
|
Errors: {
|
|
13
16
|
NotSupportedError: typeof NotSupportedError;
|
|
@@ -17,5 +20,5 @@ export declare interface PipInstance {
|
|
|
17
20
|
export declare interface PipEventPayload {
|
|
18
21
|
nativeEvent: Event;
|
|
19
22
|
element: HTMLVideoElement;
|
|
20
|
-
|
|
23
|
+
isActive: boolean;
|
|
21
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare interface SubscriptionManager<T, U> {
|
|
2
2
|
emit: (value: U) => void;
|
|
3
|
-
subscribe: (
|
|
3
|
+
subscribe: (listener: (value: U) => void, options?: AddEventListenerOptions) => () => void;
|
|
4
4
|
}
|
|
@@ -518,10 +518,15 @@ function parseFromHighEntropyValues() {
|
|
|
518
518
|
parsedFromHighEntropyValuesEngine.version = brandVersion;
|
|
519
519
|
}
|
|
520
520
|
if (typeof platformVersion === 'string') {
|
|
521
|
-
if (getParsedCache().os.name === OS.Windows)
|
|
522
|
-
|
|
523
|
-
|
|
521
|
+
if (getParsedCache().os.name === OS.Windows) {
|
|
522
|
+
if (parseInt(platformVersion.split('.')[0], 10) >= 13)
|
|
523
|
+
parsedFromHighEntropyValuesOS.version = '11';
|
|
524
|
+
else
|
|
525
|
+
parsedFromHighEntropyValuesOS.version = '10';
|
|
526
|
+
}
|
|
527
|
+
else {
|
|
524
528
|
parsedFromHighEntropyValuesOS.version = platformVersion;
|
|
529
|
+
}
|
|
525
530
|
}
|
|
526
531
|
if (typeof platform === 'string') {
|
|
527
532
|
if (/android/i.test(platform))
|
|
@@ -514,10 +514,15 @@ function parseFromHighEntropyValues() {
|
|
|
514
514
|
parsedFromHighEntropyValuesEngine.version = brandVersion;
|
|
515
515
|
}
|
|
516
516
|
if (typeof platformVersion === 'string') {
|
|
517
|
-
if (getParsedCache().os.name === OS.Windows)
|
|
518
|
-
|
|
519
|
-
|
|
517
|
+
if (getParsedCache().os.name === OS.Windows) {
|
|
518
|
+
if (parseInt(platformVersion.split('.')[0], 10) >= 13)
|
|
519
|
+
parsedFromHighEntropyValuesOS.version = '11';
|
|
520
|
+
else
|
|
521
|
+
parsedFromHighEntropyValuesOS.version = '10';
|
|
522
|
+
}
|
|
523
|
+
else {
|
|
520
524
|
parsedFromHighEntropyValuesOS.version = platformVersion;
|
|
525
|
+
}
|
|
521
526
|
}
|
|
522
527
|
if (typeof platform === 'string') {
|
|
523
528
|
if (/android/i.test(platform))
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { NotSupportedError } from "../../../errors/not-supported-error";
|
|
2
2
|
import { InvalidStateError } from "../../../errors/invalid-state-error";
|
|
3
3
|
export declare interface FullscreenInstance {
|
|
4
|
-
supported: boolean;
|
|
5
|
-
element: Element | null;
|
|
6
|
-
|
|
4
|
+
get supported(): boolean;
|
|
5
|
+
get element(): Element | null;
|
|
6
|
+
get isActive(): boolean;
|
|
7
7
|
request(target?: Element, options?: FullscreenOptions): Promise<void>;
|
|
8
|
+
toggle(target?: Element, options?: FullscreenOptions): Promise<void>;
|
|
8
9
|
exit(): Promise<void>;
|
|
9
10
|
onChange(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
|
+
onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
10
12
|
onError(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
13
|
+
onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
14
|
Constants: {};
|
|
12
15
|
Errors: {
|
|
13
16
|
NotSupportedError: typeof NotSupportedError;
|
|
@@ -17,5 +20,5 @@ export declare interface FullscreenInstance {
|
|
|
17
20
|
export declare interface FullscreenEventPayload {
|
|
18
21
|
nativeEvent: Event;
|
|
19
22
|
element: Element;
|
|
20
|
-
|
|
23
|
+
isActive: boolean;
|
|
21
24
|
}
|
|
@@ -3,11 +3,14 @@ import { InvalidStateError } from "../../../errors/invalid-state-error";
|
|
|
3
3
|
export declare interface PipInstance {
|
|
4
4
|
get supported(): boolean;
|
|
5
5
|
get element(): HTMLVideoElement | null;
|
|
6
|
-
get
|
|
6
|
+
get isActive(): boolean;
|
|
7
7
|
request(target?: HTMLVideoElement): Promise<void>;
|
|
8
8
|
exit(): Promise<void>;
|
|
9
|
+
toggle(target?: HTMLVideoElement): Promise<void>;
|
|
9
10
|
onChange(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
|
+
onChange(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
10
12
|
onError(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
13
|
+
onError(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
14
|
Constants: {};
|
|
12
15
|
Errors: {
|
|
13
16
|
NotSupportedError: typeof NotSupportedError;
|
|
@@ -17,5 +20,5 @@ export declare interface PipInstance {
|
|
|
17
20
|
export declare interface PipEventPayload {
|
|
18
21
|
nativeEvent: Event;
|
|
19
22
|
element: HTMLVideoElement;
|
|
20
|
-
|
|
23
|
+
isActive: boolean;
|
|
21
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare interface SubscriptionManager<T, U> {
|
|
2
2
|
emit: (value: U) => void;
|
|
3
|
-
subscribe: (
|
|
3
|
+
subscribe: (listener: (value: U) => void, options?: AddEventListenerOptions) => () => void;
|
|
4
4
|
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { NotSupportedError } from "../../../errors/not-supported-error";
|
|
2
2
|
import { InvalidStateError } from "../../../errors/invalid-state-error";
|
|
3
3
|
export declare interface FullscreenInstance {
|
|
4
|
-
supported: boolean;
|
|
5
|
-
element: Element | null;
|
|
6
|
-
|
|
4
|
+
get supported(): boolean;
|
|
5
|
+
get element(): Element | null;
|
|
6
|
+
get isActive(): boolean;
|
|
7
7
|
request(target?: Element, options?: FullscreenOptions): Promise<void>;
|
|
8
|
+
toggle(target?: Element, options?: FullscreenOptions): Promise<void>;
|
|
8
9
|
exit(): Promise<void>;
|
|
9
10
|
onChange(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
|
+
onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
10
12
|
onError(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
13
|
+
onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
14
|
Constants: {};
|
|
12
15
|
Errors: {
|
|
13
16
|
NotSupportedError: typeof NotSupportedError;
|
|
@@ -17,5 +20,5 @@ export declare interface FullscreenInstance {
|
|
|
17
20
|
export declare interface FullscreenEventPayload {
|
|
18
21
|
nativeEvent: Event;
|
|
19
22
|
element: Element;
|
|
20
|
-
|
|
23
|
+
isActive: boolean;
|
|
21
24
|
}
|
|
@@ -3,11 +3,14 @@ import { InvalidStateError } from "../../../errors/invalid-state-error";
|
|
|
3
3
|
export declare interface PipInstance {
|
|
4
4
|
get supported(): boolean;
|
|
5
5
|
get element(): HTMLVideoElement | null;
|
|
6
|
-
get
|
|
6
|
+
get isActive(): boolean;
|
|
7
7
|
request(target?: HTMLVideoElement): Promise<void>;
|
|
8
8
|
exit(): Promise<void>;
|
|
9
|
+
toggle(target?: HTMLVideoElement): Promise<void>;
|
|
9
10
|
onChange(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
|
+
onChange(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
10
12
|
onError(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
13
|
+
onError(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
11
14
|
Constants: {};
|
|
12
15
|
Errors: {
|
|
13
16
|
NotSupportedError: typeof NotSupportedError;
|
|
@@ -17,5 +20,5 @@ export declare interface PipInstance {
|
|
|
17
20
|
export declare interface PipEventPayload {
|
|
18
21
|
nativeEvent: Event;
|
|
19
22
|
element: HTMLVideoElement;
|
|
20
|
-
|
|
23
|
+
isActive: boolean;
|
|
21
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare interface SubscriptionManager<T, U> {
|
|
2
2
|
emit: (value: U) => void;
|
|
3
|
-
subscribe: (
|
|
3
|
+
subscribe: (listener: (value: U) => void, options?: AddEventListenerOptions) => () => void;
|
|
4
4
|
}
|