saltfish 0.3.60 → 0.3.61
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/managers/StorageManager.d.ts +0 -16
- package/dist/managers/StorageManager.d.ts.map +1 -1
- package/dist/player.js +2 -2
- package/dist/player.min.js +2 -2
- package/dist/saltfish-playlist-player.es.js +9 -47
- package/dist/saltfish-playlist-player.umd.js +1 -1
- package/dist/utils/deviceDetection.d.ts +0 -9
- package/dist/utils/deviceDetection.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1155,17 +1155,6 @@ const _StorageManager = class _StorageManager {
|
|
|
1155
1155
|
this.safeClearItem(STORAGE_KEYS.ANONYMOUS_USER);
|
|
1156
1156
|
}
|
|
1157
1157
|
// =============================================================================
|
|
1158
|
-
// Anonymous User ID Methods
|
|
1159
|
-
// =============================================================================
|
|
1160
|
-
/**
|
|
1161
|
-
* Get anonymous user ID from the anonymous user data object
|
|
1162
|
-
* This reads from the same key as getAnonymousUserData() for consistency
|
|
1163
|
-
*/
|
|
1164
|
-
getAnonymousUserId() {
|
|
1165
|
-
const data = this.getAnonymousUserData();
|
|
1166
|
-
return (data == null ? void 0 : data.userId) || null;
|
|
1167
|
-
}
|
|
1168
|
-
// =============================================================================
|
|
1169
1158
|
// Utility Methods
|
|
1170
1159
|
// =============================================================================
|
|
1171
1160
|
/**
|
|
@@ -1176,33 +1165,6 @@ const _StorageManager = class _StorageManager {
|
|
|
1176
1165
|
this.clearSession();
|
|
1177
1166
|
this.clearAnonymousUserData();
|
|
1178
1167
|
}
|
|
1179
|
-
/**
|
|
1180
|
-
* Get storage availability status
|
|
1181
|
-
*/
|
|
1182
|
-
isStorageAvailable() {
|
|
1183
|
-
return this.isLocalStorageAvailable;
|
|
1184
|
-
}
|
|
1185
|
-
/**
|
|
1186
|
-
* Get storage usage information (if available)
|
|
1187
|
-
*/
|
|
1188
|
-
getStorageInfo() {
|
|
1189
|
-
const keys = [];
|
|
1190
|
-
if (this.isLocalStorageAvailable) {
|
|
1191
|
-
try {
|
|
1192
|
-
for (let i = 0; i < localStorage.length; i++) {
|
|
1193
|
-
const key = localStorage.key(i);
|
|
1194
|
-
if (key && key.startsWith("saltfish_")) {
|
|
1195
|
-
keys.push(key);
|
|
1196
|
-
}
|
|
1197
|
-
}
|
|
1198
|
-
} catch (error2) {
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
|
-
return {
|
|
1202
|
-
available: this.isLocalStorageAvailable,
|
|
1203
|
-
keys
|
|
1204
|
-
};
|
|
1205
|
-
}
|
|
1206
1168
|
};
|
|
1207
1169
|
__publicField(_StorageManager, "instance", null);
|
|
1208
1170
|
let StorageManager = _StorageManager;
|
|
@@ -4283,7 +4245,7 @@ class DeviceDetector {
|
|
|
4283
4245
|
return this.cachedDeviceInfo;
|
|
4284
4246
|
}
|
|
4285
4247
|
const userAgent = typeof navigator !== "undefined" ? navigator.userAgent : "";
|
|
4286
|
-
const
|
|
4248
|
+
const isTouchDevice = this.detectTouchSupport();
|
|
4287
4249
|
const { width, height } = this.getScreenDimensions();
|
|
4288
4250
|
const mobileRegex = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|mobile|CriOS/i;
|
|
4289
4251
|
const tabletRegex = /iPad|Android(?!.*Mobile)|Tablet|tablet/i;
|
|
@@ -4292,14 +4254,14 @@ class DeviceDetector {
|
|
|
4292
4254
|
const screenSize = this.getScreenSize(width, height);
|
|
4293
4255
|
const isMobileByScreen = screenSize === "small" && Math.min(width, height) < 768;
|
|
4294
4256
|
const isTabletByScreen = screenSize === "medium" && !isMobileByScreen;
|
|
4295
|
-
const
|
|
4296
|
-
const
|
|
4297
|
-
const
|
|
4257
|
+
const isMobile = isMobileUserAgent || isMobileByScreen && isTouchDevice;
|
|
4258
|
+
const isTablet = isTabletUserAgent || isTabletByScreen && isTouchDevice && !isMobile;
|
|
4259
|
+
const isDesktop = !isMobile && !isTablet;
|
|
4298
4260
|
const deviceInfo = {
|
|
4299
|
-
isMobile
|
|
4300
|
-
isTablet
|
|
4301
|
-
isDesktop
|
|
4302
|
-
isTouchDevice
|
|
4261
|
+
isMobile,
|
|
4262
|
+
isTablet,
|
|
4263
|
+
isDesktop,
|
|
4264
|
+
isTouchDevice,
|
|
4303
4265
|
screenSize,
|
|
4304
4266
|
orientation: this.detectOrientation(),
|
|
4305
4267
|
userAgent
|
|
@@ -12306,7 +12268,7 @@ const SaltfishPlayer$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
12306
12268
|
__proto__: null,
|
|
12307
12269
|
SaltfishPlayer
|
|
12308
12270
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
12309
|
-
const version = "0.3.
|
|
12271
|
+
const version = "0.3.61";
|
|
12310
12272
|
const packageJson = {
|
|
12311
12273
|
version
|
|
12312
12274
|
};
|