iOS + VideoJS events + DOM Manipulation
So Mobile Safari doesn't like it when you do something like this:
<video controls class="video-js vjs-default-skin">
<source type="video/mp4" src="something.mp4">
</source>
</video>
<script type="text/javascript">
var v = document.getElementsByTagName('video')[0];
var player = _V_(v);
player.addEvent('play', function(evt) {
$('.video-js').css('display', 'block') // !!!
});
</script>
Works just fine in other Webkit browsers.
(full gist: https://gist.github.com/3837123 )
Written by Pierre Larochelle
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Video
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#