Hi,
I really hope you can help me with this as nothing seems to be working on android (4.0.4)
I tried using the HTML5 video tag which doesn't work, even if I include a command to start playing it manually via button.
I also tried http://simonmacdonald.blogspot.de/201...
https://github.com/jaeger25/Html5Video
Is working but it needs to be in the apk package so useless for me as my video is in the camera folder.
Any ideas how to play my video?
I really hope you can help me with this as nothing seems to be working on android (4.0.4)
I tried using the HTML5 video tag which doesn't work, even if I include a command to start playing it manually via button.
I also tried http://simonmacdonald.blogspot.de/201...
https://github.com/jaeger25/Html5Video
Is working but it needs to be in the apk package so useless for me as my video is in the camera folder.
Any ideas how to play my video?
- 3 Posts
- 1 Reply Like
Posted 7 years ago
- 1206 Posts
- 42 Reply Likes
Topic likely related to PhoneGap Framework or programming, rather then Build service. If you haven't receive anymore feedback from the community, kindly please post and continue to discuss at our framework forum or at stackoverflow
Framework Forum: https://groups.google.com/forum/?from...
Stackoverflow: http://stackoverflow.com/questions/ta...
PhoneGap Doc. http://docs.phonegap.com/en/2.9.0/cordova_media_media.md.html#Media
*To get the most out of framework support, consider our PhoneGap Paid Support option: http://phonegap.com/support/
Thanks
Framework Forum: https://groups.google.com/forum/?from...
Stackoverflow: http://stackoverflow.com/questions/ta...
PhoneGap Doc. http://docs.phonegap.com/en/2.9.0/cordova_media_media.md.html#Media
*To get the most out of framework support, consider our PhoneGap Paid Support option: http://phonegap.com/support/
Thanks
- 18 Posts
- 0 Reply Likes
Did anyone ever figure out how to do this, the local video playback with Android?
- 3 Posts
- 1 Reply Like
Kind of, for me it's working if you delete the line
on the HTML page you want to play the video with.
So whenever you are using a HTML video-tag on your page delete the import of "phonegap.js" and the video should be able to play!
<script src="phonegap.js"></script>
on the HTML page you want to play the video with.
So whenever you are using a HTML video-tag on your page delete the import of "phonegap.js" and the video should be able to play!
- 18 Posts
- 0 Reply Likes
How are you calling the local video? I'd really appreciate this if you could let me know.
- 39 Posts
- 0 Reply Likes
I'm using Video!
It's been 3 to 6 months of living hell and I'm probably not out of the woods yet.
Total disaster area (when talking compatibility across many devices).
I suggest you open links to YouTube instead (for now in a legacy reality).
Speaking particularly to Android and it's browsers.
Everything would have been fine if the player in Android I tested showed the darn buttons play of the controls in the corners correctly.
Other issues are things hard to recollect...
Loss of events when in full screen (as if it's a new element)? [Of course having no way to get Events to transfer in Dom is a major flaw, and likely part of that problem]
Not able to update sources properly (without replacing video tag basically or something like that to patch more failings).
the true videoWidth&videoHeight often wrong (in the later reload case) so total custom code needed to resize from the parent div to the window size in pixels from percentage (a recurring theme in responsive design these days [Text sizes, rounded shapes to name a few more torturous examples of html5 falling way short of modern needs {locked out of history is another major bitch}].)
I can't help you more then to say it's one of the most problematic (but important) areas I've discovered. Oh wait I can here...
Your probably missing the sources in triplicate. The 'video' tag will work though.
Also they will only work from a remote server no video from local files allowed for some reason I guess to keep the apps small.
<video id="yPlayer" class="yPlayer" poster="http://yDom.top/Vids/Vid-01.png" preload="preload" name="yPlayer" />
<source type="video/mp4" src="http://yDom.top/Vids/Vid-01.mp4" />
<source type="video/ogg" src="http://yDom.top/Vids/Vid-01.ogv" />
<source type="video/webm" src="http://yDom.top/Vids/Vid-01.webm" />
</video>
Your suppose to include a codec to in theory. Also onError etc. recommended.
It's been 3 to 6 months of living hell and I'm probably not out of the woods yet.
Total disaster area (when talking compatibility across many devices).
I suggest you open links to YouTube instead (for now in a legacy reality).
Speaking particularly to Android and it's browsers.
Everything would have been fine if the player in Android I tested showed the darn buttons play of the controls in the corners correctly.
Other issues are things hard to recollect...
Loss of events when in full screen (as if it's a new element)? [Of course having no way to get Events to transfer in Dom is a major flaw, and likely part of that problem]
Not able to update sources properly (without replacing video tag basically or something like that to patch more failings).
the true videoWidth&videoHeight often wrong (in the later reload case) so total custom code needed to resize from the parent div to the window size in pixels from percentage (a recurring theme in responsive design these days [Text sizes, rounded shapes to name a few more torturous examples of html5 falling way short of modern needs {locked out of history is another major bitch}].)
I can't help you more then to say it's one of the most problematic (but important) areas I've discovered. Oh wait I can here...
Your probably missing the sources in triplicate. The 'video' tag will work though.
Also they will only work from a remote server no video from local files allowed for some reason I guess to keep the apps small.
<video id="yPlayer" class="yPlayer" poster="http://yDom.top/Vids/Vid-01.png" preload="preload" name="yPlayer" />
<source type="video/mp4" src="http://yDom.top/Vids/Vid-01.mp4" />
<source type="video/ogg" src="http://yDom.top/Vids/Vid-01.ogv" />
<source type="video/webm" src="http://yDom.top/Vids/Vid-01.webm" />
</video>
Your suppose to include a codec to in theory. Also onError etc. recommended.
- 18 Posts
- 0 Reply Likes
I understand, it has been a living hell for me, too. What's worse is that I had local video working a few weeks ago, on both iOS and Android from the build service. It was great and I moved on to other functionality for the app. When I stumbled upon the video not working anymore I was aghast. This is truly terrible, like hitting a moving target with code. I know something changed in the build service, but I can't get anyone from Adobe to look at the issue.
Unfortunately, I simply *can't* point to youtube; My client needs the app to work without WiFi.
Unfortunately, I simply *can't* point to youtube; My client needs the app to work without WiFi.
- 3 Posts
- 1 Reply Like
For me
This links to the video "video.mp4" in the standard camera folder of Android (4.0.4), probably it's always the same for all versions!
You always need "file:///mnt/sdcard/" unless it's on an external SD-Card, which would be "file:///mnt/sdcard0/".
If you need to figure the path out check ES File Explorer File Manager with enabled expert settings
It may be also useful for you to test your HTML pages via copying the HTML file on the device and open it with your browser. This way you can check if the source is available.
For my tests Chrome was the best because it has more functionality than the default one. But that depends what you're doing....
At least it's possible to play .mp4 video files this way using HTML5
src="file:///mnt/sdcard/DCIM/Camera/video.mp4" worked out.
This links to the video "video.mp4" in the standard camera folder of Android (4.0.4), probably it's always the same for all versions!
You always need "file:///mnt/sdcard/" unless it's on an external SD-Card, which would be "file:///mnt/sdcard0/".
If you need to figure the path out check ES File Explorer File Manager with enabled expert settings
It may be also useful for you to test your HTML pages via copying the HTML file on the device and open it with your browser. This way you can check if the source is available.
For my tests Chrome was the best because it has more functionality than the default one. But that depends what you're doing....
At least it's possible to play .mp4 video files this way using HTML5
- 18 Posts
- 0 Reply Likes
Thanks so much, Jonas, for answering my questions. i really appreciate it.
So, your video is already on the device? I am trying to play one from within the app itself.
Thanks for the idea to copy the html file directly to the device! That's inspired.
So, your video is already on the device? I am trying to play one from within the app itself.
Thanks for the idea to copy the html file directly to the device! That's inspired.
- 39 Posts
- 0 Reply Likes
No within the confines of the dream of "one for all", it only takes one intern to drop the ball at one company responsible or any of many devices and/or previous version (an OS update or patch is basically too late) etc. or even if an architect makes one poor decision without thinking through the options and or superior solutions (and problems it will cause to limit anything).
Somewhere along the line I had to drop local video files because it wasn't supported ;-( I suspected a bug but there it is even if that's the case. One works http://www.external.tld , the other file:// didn't.
Maybe one day, maybe today, maybe for the better newer devices your going to have to confirm support for.
Well maybe I'll have to revisit that one again soon, but on PhoneGap your limited to 10MBs or so so there's little point anyway (and I suspected that was the thinking in the lack for support).
Hopefully the devices your going to support will work with file:// when there suppose to work with relative paths as far as I'm aware.
Another thought might be to use something like this...
var codeBase = window.location.href;
codeBase = codeBase.substring(0, codeBase.lastIndexOf("/") + 1);
to help find the correct video folder location. you can't do file://./Videos though, like I say I'll have to research it more again I guess. Then implement os specific issues also phonegap 3.0 maybe is patching somethings like that etc.
Somewhere along the line I had to drop local video files because it wasn't supported ;-( I suspected a bug but there it is even if that's the case. One works http://www.external.tld , the other file:// didn't.
Maybe one day, maybe today, maybe for the better newer devices your going to have to confirm support for.
Well maybe I'll have to revisit that one again soon, but on PhoneGap your limited to 10MBs or so so there's little point anyway (and I suspected that was the thinking in the lack for support).
Hopefully the devices your going to support will work with file:// when there suppose to work with relative paths as far as I'm aware.
Another thought might be to use something like this...
var codeBase = window.location.href;
codeBase = codeBase.substring(0, codeBase.lastIndexOf("/") + 1);
to help find the correct video folder location. you can't do file://./Videos though, like I say I'll have to research it more again I guess. Then implement os specific issues also phonegap 3.0 maybe is patching somethings like that etc.
- 39 Posts
- 0 Reply Likes
Okay well I've done extensive rebuilding even though there's no room in an app for video.
This is where the file codeBase appears but it spins on Android ICS when trying to play the video. Confirming the weak link, and that local video is not possible (unless you have it on only certain devices) Remember it works great from the remote server, if your clients Android clients are working that way then great!
Good Luck!
file:///data/data/com.domain.appname/hydra_app/Videos/VidAnim-01.ext
This is where the file codeBase appears but it spins on Android ICS when trying to play the video. Confirming the weak link, and that local video is not possible (unless you have it on only certain devices) Remember it works great from the remote server, if your clients Android clients are working that way then great!
Good Luck!
file:///data/data/com.domain.appname/hydra_app/Videos/VidAnim-01.ext
- 2 Posts
- 0 Reply Likes
Anyone got this solution working when locally building apps with Cordova and CLI? I have tried using external links instead of local files packaged with the app (I gave up).
It's a major pain in the
It's a major pain in the
- 2 Posts
- 0 Reply Likes
Amazing what some decent sleep can do. I used the answer given at this stackoverflow posting http://stackoverflow.com/questions/19... and it finally worked in my testing device. Emulator is a turd and not all that helpful.
- 5 Posts
- 0 Reply Likes
I tried it and it worked in Android 4.3 but failed in 4.4. Have you ever succeeded in 4.4? Or any advice regarding 4.4?
- 4116 Posts
- 192 Reply Likes
This conversation is no longer open for comments or replies.
This conversation is no longer open for comments or replies.
Related Categories
-
PhoneGap Framework
- 2926 Conversations
- 61 Followers
-
PhoneGap Build
- 15111 Conversations
- 275 Followers




