Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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?

— asked April 13th 2010 by Phi Chong
  • html5
  • uiwebview
  • video
  • webview
0 Comments

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"

    — answered April 15th 2010 by Kosso
    permalink
    0 Comments
  • Hello. We need to use absolute paths.

    — answered April 14th 2010 by Aleksandr Beshkenadze
    permalink
    0 Comments
  • Can you give an example?

    — answered April 14th 2010 by Phi Chong
    permalink
    0 Comments
  • 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)

    — answered April 14th 2010 by Kosso
    permalink
    0 Comments
  • 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.

    — answered April 14th 2010 by Phi Chong
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.