3 Replies Latest reply: Apr 1, 2012 6:10 PM by lokhy2012 RSS

    StageWebView local video file <> NativeExtension to launch media player (Android)

    alad-1234

      Hello there!

       

      As discussed here

       

      http://forums.adobe.com/message/4090326

       

      it's very hard to load (for example) a local videofile saved on the device inside an HTML5 video-Tag.

      All the possible solutions I found and tried didn't work for me.

       

      Short description:

      - user can stream an mp4-video via http://....

      - if he wants, the user can download this video into the folder File.applicationStorageDirectory (also tried documentsDirectory, userDirectory)

      - user can then watch the video without internet connection

       

      When the users wants to start the video, the app checks if the video is available local.

       

      if yes:

      StageWebView is loaded with the code

      <html><head><title>Player</title></head><body><div style="position:relative;width:800px;margin:0 auto;">

      <video id="player" autobuffer controls height="400" width="800" onclick="this.play();">

      <source src="file:///data/data/air.com.test.testApp.debug/com.test.testApp.debug/Local%20Store/vi deo/video.mp4">

      </video>

      </div></body></html>

       

      => this is not working. Feels like the StageWebView can not access the file (permissions? wrong path?)

       

      if not:

      the http-Url is used as source for the video tag => this is working

       

       

      As a solution I'm thinking of starting the native video player to play the local file.

      navigateToURL doesn't work...

       

      Perhaps I need a native extension to start the player?

      Is there any solution out there?

       

      Thank you very much in advance!

      Regards!