HTML 5 video tag in a webview - Relative & absolute urls to a lcoal file
I have webview laoding a local html file. When I specify a absolute url to a video file I can get it to stream. Howevr pointing to a local file using…
<video height="348" width="680" autoplay
src="app://video/myMovie.m4v"
>
</video>
Doesn't seem to do anything. I've also tried
app://Resources/video/myMovie.m4v
Does anyone know why?
5 Answers
-
Accepted Answer
Phi,
Does it have to be in a webView? You know you can create an embedded videoPlayer on the iPad? ;)
If your script is in the resources folder, then did you try just 'video/mymovie.m4v' ?
Also try adding the 'type' to the HTML5 video tag:
type="video/mp4"
-
Hello. We need to use absolute paths.
-
Can you give an example?
-
I think you should be able to just use :
/video/myMovie.m4v
And that should work fine if your video folder is in the Resources folder.
by the way, which platform are you trying to build for? iPhone? iPad? Android? Desktop?
you could also try app://com.yourco.yourapp/video/myMovie.m4v (i think)
-
kosso - That didn't work for me. I'm building for the iPad. I know what's happening with the new developers agreement but I still see appcelerator as a useful tool for rapid prototyping which is what I'm currently doing.