@capgo/capacitor-native-audio 8.4.30 → 8.4.32
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/README.md
CHANGED
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
# Native audio
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Play sound effects, music and streams with native audio engines in your Capacitor app: low latency playback, background audio, lock screen controls and HLS streams on iOS and Android.
|
|
4
|
+
|
|
5
|
+
<a href="https://capgo.app/?ref=plugin_native_audio"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-native-audio" alt="Capgo - Instant updates for Capacitor" /></a>
|
|
4
6
|
|
|
5
7
|
<div align="center">
|
|
6
|
-
<
|
|
7
|
-
<h2><a href="https://capgo.app/
|
|
8
|
+
<p><b>Capgo</b>: push fixes to your Capacitor users in minutes, build signed iOS and Android apps without a Mac, and roll back in one click.</p>
|
|
9
|
+
<h2><a href="https://capgo.app/register/?ref=plugin_native_audio">➡️ Get started for free</a></h2>
|
|
10
|
+
<p>14-day unlimited free trial. No credit card required</p>
|
|
11
|
+
<p><a href="https://capgo.app/consulting/?ref=plugin_native_audio">Missing a feature? We'll build the plugin for you 💪</a></p>
|
|
8
12
|
</div>
|
|
9
13
|
|
|
14
|
+
<p align="center">
|
|
15
|
+
<img src="https://raw.githubusercontent.com/Cap-go/capacitor-native-audio/main/assets/github-social-preview.png" alt="@capgo/capacitor-native-audio for Capacitor apps" width="300" />
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
## Key features
|
|
19
|
+
|
|
20
|
+
- **Preload and play**: `preload()`, `play()`, `playOnce()`, `pause()`, `resume()`, `loop()` and `stop()`.
|
|
21
|
+
- **Sources**: local files, `file://` paths, remote `https://` URLs and M3U8 HLS streams.
|
|
22
|
+
- **Controls**: `setVolume()`, `setRate()`, `setCurrentTime()`, `getCurrentTime()` and `getDuration()`.
|
|
23
|
+
- **Background and focus**: `configure()` sets audio focus, background playback and Now Playing controls on iOS and Android.
|
|
24
|
+
- **Events**: `complete` and `currentTime` listeners, plus `playbackState` on iOS and Android.
|
|
25
|
+
- **Platforms**: iOS, Android and Web. iOS uses AVFoundation, Android uses Media3 ExoPlayer. Web supports most playback calls, but not `configure()` or the `playbackState` event.
|
|
26
|
+
|
|
10
27
|
<h3 align="center">Native Audio</h3>
|
|
11
28
|
<p align="center">
|
|
12
29
|
<strong>
|
package/android/build.gradle
CHANGED
|
@@ -78,7 +78,7 @@ dependencies {
|
|
|
78
78
|
implementation 'androidx.media3:media3-exoplayer-hls:1.11.1'
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
implementation 'androidx.media3:media3-session:1.11.
|
|
81
|
+
implementation 'androidx.media3:media3-session:1.11.1'
|
|
82
82
|
implementation 'androidx.media3:media3-transformer:1.10.1'
|
|
83
83
|
implementation 'androidx.media3:media3-ui:1.10.1'
|
|
84
84
|
implementation 'androidx.media3:media3-database:1.11.1'
|
|
@@ -18,7 +18,7 @@ private enum PlaybackStateValue: String {
|
|
|
18
18
|
@objc(NativeAudio)
|
|
19
19
|
// swiftlint:disable:next type_body_length
|
|
20
20
|
public class NativeAudio: CAPPlugin, AVAudioPlayerDelegate, CAPBridgedPlugin {
|
|
21
|
-
private let pluginVersion: String = "8.4.
|
|
21
|
+
private let pluginVersion: String = "8.4.32"
|
|
22
22
|
public let identifier = "NativeAudio"
|
|
23
23
|
public let jsName = "NativeAudio"
|
|
24
24
|
public let pluginMethods: [CAPPluginMethod] = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-native-audio",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.32",
|
|
4
4
|
"description": "A native plugin for native audio engine",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"main": "dist/plugin.cjs.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"test:ios": "cd ios && xcodebuild test -workspace Plugin.xcworkspace -scheme Plugin -destination 'platform=iOS Simulator,name=iPhone 16' && cd ..",
|
|
45
45
|
"lint": "bun run eslint && bun run prettier -- --check && bun run swiftlint -- lint",
|
|
46
46
|
"fmt": "bun run eslint -- --fix && bun run prettier -- --write && bun run swiftlint -- --fix --format",
|
|
47
|
-
"eslint": "eslint .
|
|
47
|
+
"eslint": "eslint .",
|
|
48
48
|
"prettier": "prettier-pretty-check \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
|
49
49
|
"swiftlint": "node-swiftlint",
|
|
50
50
|
"docgen": "docgen --api NativeAudio --output-readme README.md --output-json dist/docs.json",
|
|
@@ -69,12 +69,11 @@
|
|
|
69
69
|
"@capacitor/core": "^8.0.0",
|
|
70
70
|
"@capacitor/docgen": "^0.3.1",
|
|
71
71
|
"@capacitor/ios": "^8.0.0",
|
|
72
|
-
"@ionic/eslint-config": "^0.
|
|
72
|
+
"@ionic/eslint-config": "^0.5.0",
|
|
73
73
|
"@ionic/prettier-config": "^4.0.0",
|
|
74
74
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
75
75
|
"@types/node": "^24.10.1",
|
|
76
|
-
"eslint": "^
|
|
77
|
-
"eslint-plugin-import": "^2.31.0",
|
|
76
|
+
"eslint": "^10.0.0",
|
|
78
77
|
"husky": "^9.1.7",
|
|
79
78
|
"prettier": "^3.6.2",
|
|
80
79
|
"prettier-plugin-java": "^2.7.7",
|
|
@@ -89,9 +88,6 @@
|
|
|
89
88
|
},
|
|
90
89
|
"prettier": "@ionic/prettier-config",
|
|
91
90
|
"swiftlint": "@ionic/swiftlint-config",
|
|
92
|
-
"eslintConfig": {
|
|
93
|
-
"extends": "@ionic/eslint-config/recommended"
|
|
94
|
-
},
|
|
95
91
|
"capacitor": {
|
|
96
92
|
"ios": {
|
|
97
93
|
"src": "ios"
|