Skip to content

Commit

Permalink
Merge pull request #220 from lovegaoshi/dev
Browse files Browse the repository at this point in the history
feat: data saver
  • Loading branch information
lovegaoshi authored Oct 28, 2023
2 parents d85bfa6 + 182aa9d commit a9e429d
Show file tree
Hide file tree
Showing 28 changed files with 325 additions and 290 deletions.
2 changes: 1 addition & 1 deletion MusicFreePlugins
38 changes: 23 additions & 15 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PODS:
- ExpoModulesCore
- EXFont (11.4.0):
- ExpoModulesCore
- Expo (49.0.15):
- Expo (49.0.16):
- ExpoModulesCore
- ExpoClipboard (4.3.1):
- ExpoModulesCore
Expand Down Expand Up @@ -123,6 +123,9 @@ PODS:
- lottie-ios (~> 4.3.0)
- React-Core
- OpenSSL-Universal (1.1.1100)
- PromisesObjC (2.3.1)
- PromisesSwift (2.3.1):
- PromisesObjC (= 2.3.1)
- Protobuf (3.22.1)
- RCT-Folly (2021.07.22.00):
- boost
Expand Down Expand Up @@ -447,13 +450,14 @@ PODS:
- react-native-svga-player (1.1.0):
- React
- SVGAPlayer
- react-native-track-player (4.0.0-rc09):
- react-native-track-player (4.0.0):
- React-Core
- SwiftAudioEx (= 1.0.0-rc.10)
- react-native-video (5.2.1):
- SwiftAudioEx (= 1.0.0)
- react-native-video (6.0.0-alpha.8):
- React-Core
- react-native-video/Video (= 5.2.1)
- react-native-video/Video (5.2.1):
- react-native-video/Video (= 6.0.0-alpha.8)
- react-native-video/Video (6.0.0-alpha.8):
- PromisesSwift
- React-Core
- react-native-webview (13.6.2):
- React-Core
Expand Down Expand Up @@ -573,9 +577,9 @@ PODS:
- React-Core
- SDWebImage (~> 5.11.1)
- SDWebImageWebPCoder (~> 0.8.4)
- RNFlashList (1.6.1):
- RNFlashList (1.6.2):
- React-Core
- RNGestureHandler (2.13.3):
- RNGestureHandler (2.13.4):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- RNReanimated (3.5.4):
Expand Down Expand Up @@ -634,7 +638,7 @@ PODS:
- SVGAPlayer/ProtoFiles
- SVGAPlayer/ProtoFiles (2.5.7):
- Protobuf (~> 3.4)
- SwiftAudioEx (1.0.0-rc.10)
- SwiftAudioEx (1.0.0)
- Yoga (1.14.0)
- YogaKit (1.18.1):
- Yoga (~> 1.14)
Expand Down Expand Up @@ -757,6 +761,8 @@ SPEC REPOS:
- libwebp
- lottie-ios
- OpenSSL-Universal
- PromisesObjC
- PromisesSwift
- Protobuf
- SDWebImage
- SDWebImageWebPCoder
Expand Down Expand Up @@ -924,7 +930,7 @@ SPEC CHECKSUMS:
EXConstants: ce5bbea779da8031ac818c36bea41b10e14d04e1
EXFileSystem: 2b826a3bf1071a4b80a8457e97124783d1ac860e
EXFont: 738c44c390953ebcbab075a4848bfbef025fd9ee
Expo: 4ddd44075a2e7c7c63a0f5b1e05223be74d48bc6
Expo: fcfd60c1ed6806dee5103b210335ae0c72f675ed
ExpoClipboard: 695f274f8e028cd113837f917da40c76850877eb
ExpoKeepAwake: be4cbd52d9b177cde0fd66daa1913afa3161fc1d
ExpoModulesCore: 51cb2e7ab4c8da14be3f40b66d54c1781002e99d
Expand All @@ -949,6 +955,8 @@ SPEC CHECKSUMS:
lottie-ios: 25e7b2675dad5c3ddad369ac9baab03560c5bfdd
lottie-react-native: c9f1db4f4124dcce9f8159e65d8dc6e8bcb11fb4
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
PromisesSwift: 28dca69a9c40779916ac2d6985a0192a5cb4a265
Protobuf: d7f7c8329edf5eb8af65547a8ba3e9c1cee927d5
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
RCTRequired: 28469809442eb4eb5528462705f7d852948c8a74
Expand All @@ -975,8 +983,8 @@ SPEC CHECKSUMS:
react-native-pager-view: 02a5c4962530f7efc10dd51ee9cdabeff5e6c631
react-native-safe-area-context: 238cd8b619e05cb904ccad97ef42e84d1b5ae6ec
react-native-svga-player: f1c7faf0864b22437b9b7cc7d7aa202d56f3906c
react-native-track-player: 904ab55cdc68ebfb398df287bc46f195327f69c8
react-native-video: c26780b224543c62d5e1b2a7244a5cd1b50e8253
react-native-track-player: ec01d92e7c66d6383926e6028f4f233c7a831062
react-native-video: 86950ad481cec184d7c9420ec3bca0c27904bbcd
react-native-webview: 8fc09f66a1a5b16bbe37c3878fda27d5982bb776
React-NativeModulesApple: 02e35e9a51e10c6422f04f5e4076a7c02243fff2
React-perflogger: e3596db7e753f51766bceadc061936ef1472edc3
Expand All @@ -997,8 +1005,8 @@ SPEC CHECKSUMS:
ReactCommon: dd03c17275c200496f346af93a7b94c53f3093a4
RNCAsyncStorage: c913ede1fa163a71cea118ed4670bbaaa4b511bb
RNFastImage: 5c9c9fed9c076e521b3f509fe79e790418a544e8
RNFlashList: 236646d48f224a034f35baa0242e1b77db063b1e
RNGestureHandler: fa40ab6b6cafaa7609294d31f8e8fbbd0cce8ea6
RNFlashList: 1983f915ae34e9253e413f31387959590d102f5e
RNGestureHandler: 6e46dde1f87e5f018a54fe5d40cd0e0b942b49ee
RNReanimated: ab2e96c6d5591c3dfbb38a464f54c8d17fb34a87
RNScreens: b21dc57dfa2b710c30ec600786a3fc223b1b92e7
RNShareMenu: cb9dac548c8bf147d06f0bf07296ad51ea9f5fc3
Expand All @@ -1010,7 +1018,7 @@ SPEC CHECKSUMS:
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef
SVGAPlayer: 318b85a78b61292d6ae9dfcd651f3f0d1cdadd86
SwiftAudioEx: 8cc0c9e67a8d3222fc0f2b3064404f86e341192a
SwiftAudioEx: 6f511018b7a0fdfd14ed1bb4081f953588245cc0
Yoga: b76f1acfda8212aa16b7e26bcce3983230c82603
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

Expand Down
35 changes: 16 additions & 19 deletions ios/example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* exampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = exampleTests.m; sourceTree = "<group>"; };
138345A294D5D87DC84127A5 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-azusa-player-mobile-exampleTests/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07F961A680F5B00A75B9A /* AzusaPlayer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AzusaPlayer.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = example/AppDelegate.h; sourceTree = "<group>"; };
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = example/AppDelegate.mm; sourceTree = "<group>"; };
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = example/Images.xcassets; sourceTree = "<group>"; };
Expand Down Expand Up @@ -178,7 +178,7 @@
83CBBA001A601CBA00E9B192 /* Products */ = {
isa = PBXGroup;
children = (
13B07F961A680F5B00A75B9A /* example.app */,
13B07F961A680F5B00A75B9A /* AzusaPlayer.app */,
00E356EE1AD99517003FC87E /* exampleTests.xctest */,
);
name = Products;
Expand Down Expand Up @@ -246,7 +246,7 @@
);
name = "azusa-player-mobile";
productName = example;
productReference = 13B07F961A680F5B00A75B9A /* example.app */;
productReference = 13B07F961A680F5B00A75B9A /* AzusaPlayer.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
Expand All @@ -259,10 +259,11 @@
TargetAttributes = {
00E356ED1AD99517003FC87E = {
CreatedOnToolsVersion = 6.2;
LastSwiftMigration = "";
TestTargetID = 13B07F861A680F5B00A75B9A;
};
13B07F861A680F5B00A75B9A = {
LastSwiftMigration = 1250;
LastSwiftMigration = "";
};
};
};
Expand Down Expand Up @@ -549,7 +550,7 @@
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/example";
};
name = Debug;
Expand All @@ -576,7 +577,7 @@
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/example";
};
name = Release;
Expand All @@ -592,6 +593,7 @@
DEVELOPMENT_TEAM = 7U2TUNKNQX;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = example/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.music";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -605,10 +607,10 @@
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = com.noxplay.noxplayer;
PRODUCT_NAME = example;
PRODUCT_NAME = AzusaPlayer;
SWIFT_OBJC_BRIDGING_HEADER = "example-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
Expand All @@ -623,6 +625,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 7U2TUNKNQX;
INFOPLIST_FILE = example/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.music";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -636,9 +639,9 @@
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.noxplay.noxplayer;
PRODUCT_NAME = example;
PRODUCT_NAME = AzusaPlayer;
SWIFT_OBJC_BRIDGING_HEADER = "example-Bridging-Header.h";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
Expand Down Expand Up @@ -707,10 +710,7 @@
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
OTHER_LDFLAGS = "$(inherited) ";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_VERSION = 4.0;
Expand Down Expand Up @@ -776,10 +776,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
OTHER_LDFLAGS = "$(inherited) ";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_VERSION = 4.0;
Expand Down
2 changes: 2 additions & 0 deletions ios/example/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
<array>
<string>armv7</string>
</array>
<key>UIStatusBarHidden</key>
<true/>
<key>UIStatusBarStyle</key>
<string></string>
<key>UISupportedInterfaceOrientations</key>
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"start": "react-native start",
"test": "jest",
"lint": "gts lint",
"fresh": "rm -rf node_modules ; cd .. && yarn build ; cd example && yarn install",
"fresh": "rm -rf node_modules ; yarn; git submodule update --recursive --remote",
"types": "tsc --noEmit true",
"ci:lint": "eslint src --max-warnings=0",
"ci:format": "prettier --check src",
Expand All @@ -21,7 +21,7 @@
"prepare": "yarn run compile",
"pretest": "yarn run compile",
"prettify": "prettier --write ./src",
"ios:build": "yarn; cd ios; rm Podfile.lock; pod pod install --repo-update; cd .."
"ios:build": "yarn; cd ios; rm Podfile.lock; pod install --repo-update; cd .."
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.18.1",
Expand All @@ -45,28 +45,30 @@
"deepmerge": "^4.3.1",
"dropbox": "git+https://[email protected]/lovegaoshi/dropbox-sdk-js.git",
"expo": "^49.0.0",
"expo-av": "~13.4.1",
"expo-clipboard": "~4.3.1",
"expo-image": "^1.5.1",
"expo-keep-awake": "~12.3.0",
"expo-secure-store": "~12.3.1",
"fflate": "^0.7.4",
"ffmpeg-kit-react-native": "^5.1.0",
"he": "^1.2.0",
"i18next": "^22.4.15",
"i18next": "^23.6.0",
"libmuse": "git+https://github.com/lovegaoshi/muse.git#apm-release",
"lottie-react-native": "^6.2.0",
"lru-cache": "7.14.0",
"md5": "^2.3.0",
"metro": "^0.79.1",
"qs": "^6.11.2",
"react": "18.2.0",
"react-i18next": "^12.2.2",
"react-i18next": "^13.3.1",
"react-native": "0.72.6",
"react-native-app-auth": "^7.0.0",
"react-native-background-timer": "git+https://github.com/lovegaoshi/react-native-background-timer.git",
"react-native-blob-jsi-helper": "git+https://github.com/lovegaoshi/react-native-blob-jsi-helper.git",
"react-native-blob-util": "^0.18.3",
"react-native-countdown-circle-timer": "^3.2.1",
"react-native-draggable-flatlist": "^4.0.1",
"react-native-fast-image": "^8.6.3",
"react-native-gesture-handler": "^2.9.0",
"react-native-get-random-values": "^1.9.0",
"react-native-lyric": "git+https://github.com/lovegaoshi/react-native-lyric.git",
Expand All @@ -84,7 +86,6 @@
"react-native-track-player": "git+https://[email protected]/lovegaoshi/react-native-track-player.git#APM",
"react-native-url-polyfill": "^1.3.0",
"react-native-vector-icons": "^9.2.0",
"react-native-video": "^5.2.1",
"react-native-webview": "^13.3.0",
"react-native-windows": "^0.72.14",
"react-use": "^17.4.0",
Expand Down
10 changes: 10 additions & 0 deletions react-native.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
project: {
android: {
unstable_reactLegacyComponentNames: ['FastImageView', 'RCTVideo'],
},
ios: {
unstable_reactLegacyComponentNames: [],
},
},
};
8 changes: 2 additions & 6 deletions src/components/background/AppOpenSplash.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Dimensions } from 'react-native';
import Image from 'react-native-fast-image';
import { Image } from 'expo-image';

import { randomChoice } from '@utils/Utils';

Expand All @@ -17,11 +17,7 @@ const style = {
};

const AppOpenSplash = () => (
<Image
source={randomSplashes()}
style={style}
resizeMode={Image.resizeMode.contain}
/>
<Image source={randomSplashes()} style={style} resizeMode={'contain'} />
);

export default AppOpenSplash;
10 changes: 5 additions & 5 deletions src/components/background/MainBackground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
StyleSheet,
Platform,
} from 'react-native';
// import { Video, ResizeMode } from 'expo-av';
import Video from 'react-native-video';
import { Video, ResizeMode } from 'expo-av';
// import Video from 'react-native-video';
import { useNoxSetting } from '@hooks/useSetting';
import { fetchVideoPlayUrlPromise } from '@utils/mediafetch/bilivideo';
import { customReqHeader } from '@utils/BiliFetch';
Expand Down Expand Up @@ -105,17 +105,17 @@ const MainBackground = (props: { children: React.JSX.Element }) => {
}}
style={{ width: '100%', height: '100%', position: 'absolute' }}
onError={logger.error}
/**
isLooping
resizeMode={ResizeMode.COVER}
shouldPlay={true}
isMuted={true}
*
*/
/**
repeat
muted
resizeMode="cover"
preventsDisplaySleepDuringVideoPlayback={false}
*
*/
/>
<View
style={[
Expand Down
2 changes: 1 addition & 1 deletion src/components/bottomtab/NoxBottomTab.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect } from 'react';
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { IconButton } from 'react-native-paper';
import { useNavigation, ParamListBase } from '@react-navigation/native';
Expand Down
Loading

1 comment on commit a9e429d

@vercel
Copy link

@vercel vercel bot commented on a9e429d Oct 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.