Question

I'm trying to integrate video for mobile phones with HTML5. On iphone, OK, on Android it's slow but OK, and for windows phone, I have a bad error: invalid source . This is the code that don't work for Windows Phone:

<div align="center">
         <video autobuffer height="170" width="300" controls>
            <source src="http://dev.com/cloud.mp4" type="video/mp4">
            <source src="http://dev.com/cloud.webm" type="video/webm">
            <source src="http://dev.com/cloud.ogv" type="video/ogg">
         </video>
    </div>

I tried the code of W3Schools on the mobiles and it work on Windows Phone (This is the .mp4 that runs on WP) :

<div align="center">
         <video width="320" height="240" controls="">
            <source src="http://www.w3schools.com/html/movie.mp4" type="video/mp4">
            <source src="http://www.w3schools.com/html/movie.ogg" type="video/ogg">
        </video>
    </div> 

What is my mistake? If it is encodage, how Can I transform it and wich codec, ... HOW :-)

Thank you!

Was it helpful?

Solution

The video was well encoded. the problem was there was a wrong MIME typeon the server configuration. The MIME was .mp4 => "application/octet-stream", but here the WP doesn't understand this MIME, so I edit it to "video/mp4", and it works.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top