Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@awesome-cordova-plugins/media seems not to work at all #4746

Open
1 task done
sun-ergo-s opened this issue Mar 5, 2024 · 1 comment
Open
1 task done

@awesome-cordova-plugins/media seems not to work at all #4746

sun-ergo-s opened this issue Mar 5, 2024 · 1 comment

Comments

@sun-ergo-s
Copy link

I'm submitting a ...

  • 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
@todorus
Copy link

todorus commented Apr 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants