locked
Problem trying to read video using HTML5 in webview

    Question

  • Hi,

    I'm trying to read a remote MP4 video file using HTML5 & WebView.

    I tried this code but nothing appear in the 

    string htmlFragment =
                   "<video width='320' height='240' autoplay> source src='http://test.com/formes.mp4' type='video/mp4'></video";

                this.myWebView.NavigateToString(htmlFragment);

    Can anyone help ?

    Thanks 



    • Edited by abdelmalek12 Wednesday, September 10, 2014 7:22 PM
    Wednesday, September 10, 2014 7:20 PM

Answers

  • Badly formed HTML.  This works:

    string htmlFragment = "<video width='320' height='240' autoplay source src='http://clips.vorwaerts-gmbh.de/VfE_html5.mp4' type='video/mp4'></video>";
    MyWebView.NavigateToString(htmlFragment);


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.


    Thursday, September 11, 2014 7:30 PM
    Moderator