Skip navigation
alad-1234
Currently Being Moderated

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

Jan 8, 2012 3:16 AM

Tags: #file #video #android #local #html5 #tag #native_extension

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.de bug/Local%20Store/video/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!

 
Replies
  • Currently Being Moderated
    Feb 21, 2012 11:48 AM   in reply to alad-1234

    I am in the same boat you are alad, a solution to this would be awesome. Interesting that local video in iOS with webView works so easy.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 1, 2012 6:10 PM   in reply to alad-1234

    Hi alad.

     

    Nice that you`ve figured it out, however i still have problems to make it work.

    Can you share some code you`ve developed (html page, loading instructions including paths, and paths of video)

     

    Cheers

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points