mirror of
https://gh-proxy.org/https://github.com/tiajinsha/JKVideo
synced 2026-07-08 07:28:37 +08:00
- 新增 sentry-react-native、react-native-video、react-native-static-server、expo-network、expo-intent-launcher、expo-clipboard、expo-file-system 的 web shim - 重写 react-native-pager-view shim,通过 useImperativeHandle 暴露 setPage 方法 - 修复 sentry-react-native shim 缺少 ErrorBoundary 导致的渲染崩溃 - 在 _layout.tsx 中加载 Ionicons 字体,修复 web 端字体 404 - 更新 metro.config.js 中 sentry shim 路径为 .tsx
11 lines
509 B
TypeScript
11 lines
509 B
TypeScript
/** Web shim for expo-network */
|
|
export enum NetworkStateType {
|
|
NONE = 0, UNKNOWN = 1, CELLULAR = 2, WIFI = 3, BLUETOOTH = 4,
|
|
ETHERNET = 5, WIMAX = 6, VPN = 7, OTHER = 8,
|
|
}
|
|
export async function getNetworkStateAsync() {
|
|
return { isConnected: navigator.onLine, isInternetReachable: navigator.onLine, type: NetworkStateType.UNKNOWN };
|
|
}
|
|
export async function getIpAddressAsync(): Promise<string> { return '0.0.0.0'; }
|
|
export async function isAirplaneModeEnabledAsync(): Promise<boolean> { return false; }
|