Skip to content

Commit cdefa87

Browse files
committed
Merge branch 'main' into refactor/audio-param-automation-events
2 parents 130c746 + d4a7026 commit cdefa87

275 files changed

Lines changed: 8566 additions & 6421 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<img src="./assets/react-native-audio-api-gh-cover.png?v0.0.1" alt="React Native Audio API" width="100%">
22

3+
[![Ad](https://swm-delivery.com/www/images/zone-gh-react-native-audio-api-1?n=1)](https://swm-delivery.com/www/delivery/ck.php?zoneid=zone-gh-react-native-audio-api-1&n=1)
4+
[![Ad](https://swm-delivery.com/www/images/zone-gh-react-native-audio-api-2?n=1)](https://swm-delivery.com/www/delivery/ck.php?zoneid=zone-gh-react-native-audio-api-2&n=1)
5+
[![Ad](https://swm-delivery.com/www/images/zone-gh-react-native-audio-api-3?n=1)](https://swm-delivery.com/www/delivery/ck.php?zoneid=zone-gh-react-native-audio-api-3&n=1)
6+
37
### High-performance audio engine for React Native based on web audio api specification
48

59
[![NPM latest](https://img.shields.io/npm/v/react-native-audio-api/latest)](https://www.npmjs.com/package/react-native-audio-api)

apps/common-app/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
"@react-navigation/native": "^7.1.22",
1212
"@react-navigation/native-stack": "^7.3.28",
1313
"@react-navigation/stack": "^7.4.10",
14-
"@shopify/react-native-skia": "2.5.0",
14+
"@shopify/react-native-skia": "2.6.2",
1515
"lucide-react-native": "^0.555.0",
1616
"react-native-audio-api": "workspace:*",
1717
"react-native-background-timer": "2.4.1",
18-
"react-native-gesture-handler": "2.30.0",
19-
"react-native-reanimated": "4.2.2",
18+
"react-native-gesture-handler": "2.31.1",
19+
"react-native-reanimated": "4.3.0",
2020
"react-native-safe-area-context": "5.7.0",
2121
"react-native-screens": "4.24.0",
22-
"react-native-svg": "15.15.3",
23-
"react-native-worklets": "0.7.4"
22+
"react-native-svg": "15.15.4",
23+
"react-native-worklets": "0.8.1"
2424
},
2525
"devDependencies": {
2626
"@babel/core": "^7.25.2",
@@ -29,10 +29,10 @@
2929
"@react-native-community/cli": "20.1.0",
3030
"@react-native-community/cli-platform-android": "20.1.0",
3131
"@react-native-community/cli-platform-ios": "20.1.0",
32-
"@react-native/babel-preset": "0.84.1",
33-
"@react-native/eslint-config": "0.84.1",
34-
"@react-native/metro-config": "0.84.1",
35-
"@react-native/typescript-config": "0.84.1",
32+
"@react-native/babel-preset": "0.85.0",
33+
"@react-native/eslint-config": "0.85.0",
34+
"@react-native/metro-config": "0.85.0",
35+
"@react-native/typescript-config": "0.85.0",
3636
"@types/jest": "^29.5.13",
3737
"@types/react": "^19.2.0",
3838
"@types/react-native-background-timer": "^2.0.2",
@@ -41,7 +41,7 @@
4141
"jest": "^29.6.3",
4242
"prettier": "^3.3.3",
4343
"react": "19.2.3",
44-
"react-native": "0.84.1",
44+
"react-native": "0.85.0",
4545
"react-test-renderer": "19.2.3",
4646
"typescript": "~5.8.3"
4747
}

apps/common-app/src/App.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,7 @@ const OtherScreen: FC = () => {
8989
return <Container headless />;
9090
};
9191

92-
const MainTabs = createBottomTabNavigator<MainStackProps>({
93-
screens: {
94-
Tests: TestsScreen,
95-
DemoApps: DemoAppsScreen,
96-
Other: OtherScreen,
97-
},
98-
});
92+
const MainTabs = createBottomTabNavigator<MainStackProps>();
9993

10094
const tabBarIcon = ({
10195
routeName,

apps/common-app/src/demos/Record/Record.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ const Record: FC = () => {
241241
}, [onPauseRecording, onResumeRecording]);
242242

243243
useEffect(() => {
244-
Recorder.enableFileOutput();
244+
Recorder.enableFileOutput({ rotateIntervalBytes: 1024 * 1024 });
245245

246246
return () => {
247247
Recorder.disableFileOutput();
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import React, { useRef } from 'react';
2+
import { Button, View } from 'react-native';
3+
import { Audio, AudioTagHandle } from 'react-native-audio-api/development/react';
4+
5+
import { Container } from '../../components';
6+
7+
// const DEMO_AUDIO_URL = 'https://filesamples.com/samples/audio/m4a/sample4.m4a';
8+
const DEMO_AUDIO_URL = 'https://filesamples.com/samples/audio/mp3/sample4.mp3';
9+
10+
const AudioTag: React.FC = () => {
11+
const audioRef = useRef<AudioTagHandle>(null);
12+
13+
// const handlePlay = () => {
14+
// audioRef.current?.play();
15+
// };
16+
17+
// const handlePause = () => {
18+
// audioRef.current?.pause();
19+
// };
20+
21+
// const handleSeekToTime = (time: number) => {
22+
// console.log('handleSeekToTime', time);
23+
// audioRef.current?.seekToTime(time);
24+
// };
25+
26+
// const handleSetVolume = (volume: number) => {
27+
// audioRef.current?.setVolume(volume);
28+
// };
29+
30+
// const handleSetMuted = (muted: boolean) => {
31+
// audioRef.current?.setMuted(muted);
32+
// };
33+
34+
return (
35+
<Container disablePadding>
36+
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
37+
<View style={{ width: '90%' }}>
38+
<Audio source={DEMO_AUDIO_URL} ref={audioRef} controls
39+
onLoadStart={() => console.log('onLoadStart')}
40+
onLoad={() => console.log('onLoad')}
41+
onError={(error) => console.log('onError', error)}
42+
onPositionChange={(seconds) =>
43+
console.log('onPositionChange', seconds)
44+
}
45+
onEnded={() => console.log('onEnded')}
46+
onPlay={() => console.log('onPlay')}
47+
onPause={() => console.log('onPause')}
48+
onVolumeChange={(volume) => console.log('onVolumeChange', volume)}
49+
/>
50+
</View>
51+
</View>
52+
</Container>
53+
);
54+
};
55+
56+
export default AudioTag;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './AudioTag';

apps/common-app/src/examples/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import PlaybackSpeed from './PlaybackSpeed/PlaybackSpeed';
1212
import Record from './Record/Record';
1313
import Streaming from './Streaming/Streaming';
1414
import Worklets from './Worklets/Worklets';
15+
import AudioStream from './AudioTag/AudioTag';
1516

1617
type NavigationParamList = {
1718
Oscillator: undefined;
@@ -26,6 +27,7 @@ type NavigationParamList = {
2627
Record: undefined;
2728
Worklets: undefined;
2829
Streamer: undefined;
30+
AudioTag: undefined;
2931
};
3032

3133
export type ExampleKey = keyof NavigationParamList;
@@ -110,4 +112,10 @@ export const Examples: Example[] = [
110112
Icon: icons.Radio,
111113
screen: Streaming,
112114
},
115+
{
116+
key: 'AudioTag',
117+
title: 'Audio Tag',
118+
Icon: icons.Tag,
119+
screen: AudioStream,
120+
}
113121
] as const;

apps/fabric-example/Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ gem 'bigdecimal'
1414
gem 'logger'
1515
gem 'benchmark'
1616
gem 'mutex_m'
17+
gem 'nkf'

apps/fabric-example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

apps/fabric-example/android/gradlew

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)