html5 - Video embedded into HTML doesn't play -


i trying accomplish simple task; @ least think should not.

i trying embed video html , nothing try seems works. here code using it:

<video width="560" height="340" controls>     <source src="video/30.mp4" type='video/mp4; codecs="avc1.42e01e, mp4a.40.2"'>       <source src="video/30.ogv" type='video/ogg; codecs="theora, vorbis"'>      <object width="640" height="384" type="application/x-shockwave-flash"   data="video/player_flv_maxi.swf?image=placeholder.jpg&file=video/30.swf">     <param name="movie" value="video/player_flv_maxi.swf?image=placeholder.jpg&file=video/30.swf" />     </object> </video> 

i using resource try , accomplish this: http://www.webmonkey.com/2010/05/embed-videos-in-your-web-pages-using-html5/

i have tried: http://www.w3schools.com/html/html5_video.asp

and none of seem work. can please tell me why none of video formats have listed above play in google chrome? there wrong code?

your html fine , not problem. put test js bin , changed video urls (except flash fallback), , works fine me in chrome , firefox.

http://jsbin.com/musod/1/edit

without having actual site test, can suggest few possibilities:

  1. the video files not in right place on server, you're getting 404 or 503 errors on them.

  2. the video files not encoded correctly in way browser can play them. may case if wrong codec used or if bit rate way high (not super likely).

  3. the html got mangled somehow, if pasted hosting platform wordpress or expecting plain text minimal formatting html.

here steps can take diagnose problem. feel free report results in comments here if need further direction.

  1. check browser console error messages.

  2. paste full url of video file(s) right browser. should show if there's 404, 503 or other error that's causing files not load.

  3. check "network" panel in developer tools make sure have correct url , see if it's loading file.

  4. drag video file right browser , see if plays. show if there problem encoding. browser should able play video on own, without html.

  5. view html source of webpage confirm server delivering html wrote it. example, make sure hasn't converted "angle brackets" html entities or changed quotes "smart quotes".


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -