awesome-cordova-plugins
awesome-cordova-plugins copied to clipboard
@awesome-cordova-plugins/media seems not to work at all
I'm submitting a ...
- [x] bug report
Current behavior:
I'm creating a Media using external url but play()
function doesn't work and can't get any information from the events. I'm testing it on my external physical Android 14 device.
Expected behavior:
Load the external URL and play music.
Related code:
import { Media, MediaObject } from '@awesome-cordova-plugins/media'
function handleAudio(){
const file: MediaObject = Media.create("https://example.com/audio.mp3");
file.onStatusUpdate.subscribe(status => alert(status));
file.onSuccess.subscribe(() => alert('Action is successful'));
file.onError.subscribe(error => alert(error));
file.play()
}
Other information:
Ionic info:
Ionic:
Ionic CLI : 7.2.0 (C:\Users\Michal\AppData\Roaming\nvm\v20.10.0\node_modules\@ionic\cli)
Ionic Framework : @ionic/vue 7.7.3
Capacitor:
Capacitor CLI : 5.7.1
@capacitor/android : 5.7.1
@capacitor/core : 5.7.1
@capacitor/ios : 5.7.1
Utility:
cordova-res : 0.15.4
native-run : 2.0.1
System:
NodeJS : v20.10.0 (C:\Program Files\nodejs\node.exe)
npm : 10.2.3
OS : Windows 10
I see the same behavior on an iOS device. The logs also show the error Native: tried accessing the Media plugin but it's not installed
, when trying to play any media.
Also, when I run npx cap sync
it lists that it finds several Capacitor plugins, but Media is not on that list.
There has been no recent activity and this issue has been marked inactive.