voltronik
Junior Member
Have a strange problem when embedding HTML5 video.
When i use the poster attribute, Safari (5.1 on Mac OS X 10.7.2) only loads the poster and doesn't load the movie but if i remove the poster attribute, it plays the movie fine.
Chrome however, plays it perfectly with or without the poster attribute.
I put the poster attribute in because Firefox should default to the fallback img but doesn't. It only falls back to the poster if the poster attribute is present.
My code looks like this:
The snippets of PHP are pulling the template directory from Wordpress btw.
I'm only including a mov file for the mo and will add an ogg file for Firefox and Opera when i have this bit sorted.
Does anyone know what might going on here? Why is so much not working?
Any help would be much appreciated!
Thanks,
-Jack
When i use the poster attribute, Safari (5.1 on Mac OS X 10.7.2) only loads the poster and doesn't load the movie but if i remove the poster attribute, it plays the movie fine.
Chrome however, plays it perfectly with or without the poster attribute.
I put the poster attribute in because Firefox should default to the fallback img but doesn't. It only falls back to the poster if the poster attribute is present.
My code looks like this:
HTML:
<div id="video">
<video autoplay="autoplay" poster="<?php echo get_template_directory_uri(); ?>/library/images/qt-small.jpg" width="890" height="335">
<source src="<?php echo get_template_directory_uri(); ?>/library/video/qt-small.mov" type="video/mp4">
<img src="<?php echo get_template_directory_uri(); ?>/library/images/qt-small.jpg" width="890" height="335" alt="qt-small" title="No video playback capabilities.">
</video>
</div>
The snippets of PHP are pulling the template directory from Wordpress btw.
I'm only including a mov file for the mo and will add an ogg file for Firefox and Opera when i have this bit sorted.
Does anyone know what might going on here? Why is so much not working?
Any help would be much appreciated!
Thanks,
-Jack