4
votes

I have video file located in my application isolated storage and would like to play it from html using video tag. Video player runs and then hangs on "loading..". Can someone manage to get video played using html5 video tag and isolated storage?

My observations and tests (HTC HD7, Mango Beta 2 - 7.10.7712.60).

  1. I can play this video file using MediaElement or MediaPlayerLauncher. So the file is correct.
  2. If I publish this file in internet and change reference to absolute (src="http://absoluteUri.mp4") video file is opened correctly. So it seems there is a problem with relative path and isolated storage.
  3. If i specify incorrect relative path I see another message so relative path in my experiments is correct.
  4. audio html5 tag works with isolated storage files very well; video - doesn't (freezes) but works correct if I reference to audio file in internet
  5. For "/folder/video.mp4" and "\folder\video.mp4" device opens different playback screens, but both freeze with 'loading' and 'opening' messages.
  6. There is MediaPlayerLauncher C# class that works with "folder/video.mp4" name (doesn't freeze)and does not work with leading slash in path - "/folder/video.mp4" - throws file not found; contrariwise tag can't find file w/o leading slash, even in root folder.
  7. Playback screens triggered by MediaPlayerLauncher and html tag look identical but in first case it works and in second it freezes.

EDIT: Application overview: the app is general Windows Phone Silverlight app with embedded WebBrowser control where html is hosted. Why I need this? - I'm working on cross-mobile platform where application is defined as html + js.

1
Why would you use HTML for playing a local (isolated) stored video? That doesn't make sense in my book.Claus Jørgensen
I'm working on cross-mobile platform where application is defined as html + js. PS I know several approaches to start playing video from native code, but I really need to done this from html and mobile browser.Sergei Grebnov
So it's a HTML5 app, and not a Silverlight app?Claus Jørgensen
It is general WP Silverlight app with embedded WebBrowser control where my html is hosted.Sergei Grebnov

1 Answers

1
votes

Erick Fleck covers this pretty good at the MSDN forums in this blog post - http://social.msdn.microsoft.com/forums/en-us/wpdevelop/thread/190abd75-3b45-4454-96ab-c32fb19c4664 . Looks like it comes down to 'where you store your content', so the other apps would have to adapt their structure if you want it to be truly xplat. Or you could do some 'adaptive urls'.