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

mediaelement not working with APK files built with Cordova #2195

Closed
elshorbagy opened this issue May 5, 2017 · 12 comments
Closed

mediaelement not working with APK files built with Cordova #2195

elshorbagy opened this issue May 5, 2017 · 12 comments

Comments

@elshorbagy
Copy link

Hello,

I'm using mediaelement.js with Cordova App to play youtube and dailymotions videos in one player. It works fine in the android browser but not working when I build the apk file. Are they compatible ?

Thank you

@rafa8626
Copy link
Contributor

rafa8626 commented May 5, 2017

To be honest I'm not sure about it. I haven't used Cordova. I'd think that it is since the library is built now in pure Javascript. But again I'm not an expert on that area.

@rafa8626
Copy link
Contributor

rafa8626 commented May 9, 2017

Do you have any updates on this? Can you get any errors/hints from APK?

@elshorbagy
Copy link
Author

I tried to log any errors but I got nothings. But I still believe that there is some kind of conflict because I put the mediaelement player on a separated file on my website, added iframe to my HTML5 mobile application and I played the video correctly. It is important to me that you could solve this problem and I will send you any errors or updates I have.

@rafa8626
Copy link
Contributor

rafa8626 commented May 9, 2017

Thanks. Until you provide me any hints to where to look I can't do anything. I don't have the environment to attempt to reproduce this. Can you provide your APK or something that I can check on Android, please?

@rafa8626
Copy link
Contributor

rafa8626 commented May 9, 2017

And also, which version/device of Android are you using for this?

@rafa8626
Copy link
Contributor

rafa8626 commented May 9, 2017

Wait what if you add the YouTube API and Dailymotion libraries for your app? The reason I'm asking this is because the player attempts to load the libraries on-demand (meaning, it injects a script tag to load the new libraries). But I don't know if that's valid on a situation like yours. So I'd include https://api.dmcdn.net/all.js and https://www.youtube.com/player_api in the <head> tag in your page and let me know if it works. Let me know if that works for you

@elshorbagy
Copy link
Author

Sorry, I cannot because it is a client app not mine. But you can create a sample application on this website https://monaca.io/ and create an APK in few minutes. I'm testing on Lenovo A6000 Android 5. There are some old posts talking about the same problem.
http://stackoverflow.com/questions/30483187/is-mediaelement-js-compatible-with-phonegap

http://stackoverflow.com/questions/16000231/mediaelementjs-and-phonegap

I will try your solution, and I will tell you if it works

@rafa8626
Copy link
Contributor

rafa8626 commented May 9, 2017

Thanks I'll try to check this as well on my side. Let me know if the above worked for you

@elshorbagy
Copy link
Author

I tried the APK with http video not from youtube and not worked too

@rafa8626
Copy link
Contributor

Can you share here the markup you used so I can imitate exactly what you are experiencing please? Then I'll try to convert it to apk and check what's going on

@rafa8626
Copy link
Contributor

Just FYI, I tried to use Monaca and created and APK and viewed through ARC Welder extension, and worked for me. Couldn't see the video but I got the audio. Using that extension in a non-Chrome OS device could be buggy, but everything worked. So whatever your issue is, I assume it must be some configuration I'm not aware of.

Attaching screenshots.
screen shot 2017-05-10 at 1 10 25 am
screen shot 2017-05-10 at 1 10 36 am
screen shot 2017-05-10 at 1 10 50 am

@elshorbagy
Copy link
Author

Thank you, I will check the configurations

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