@react-native-ohos/audio-toolkit 2.1.0-rc.2 → 2.1.0
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.
|
@@ -152,10 +152,10 @@ export class RCTAudioPlayerTurboModule extends TurboModule {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
onBackground(): void {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
155
|
+
this.ctx.rnInstance.subscribeToLifecycleEvents('BACKGROUND', () => {
|
|
156
|
+
logger.debug(`app state is BACKGROUND`);
|
|
157
|
+
this.pauseOnBackground();
|
|
158
|
+
});
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
pauseOnBackground(): void {
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-ohos/audio-toolkit",
|
|
3
|
-
"version": "2.1.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Cross-platform audio library for React Native",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "typings/index.d.ts",
|
|
@@ -45,4 +45,4 @@
|
|
|
45
45
|
"@rnoh/react-native-harmony-cli": "npm:@react-native-oh/react-native-harmony-cli@^0.0.27",
|
|
46
46
|
"@types/react-native": "^0.70.14"
|
|
47
47
|
}
|
|
48
|
-
}
|
|
48
|
+
}
|