jquery - Hiding <video> on iphone with bootstrap -
<video width="100%" height="100%" id="video" class="hidden-xs hidden-sm"> <source src="video.mp4" type="video/mp4"> </video> <div class="text-center"> <ul class="list-inline controls"> <li><a href="#" id="back"><img src="./css/images/back.png"></a></li> <li><a href="#" id="pause"><img src="./css/images/play.png"></a></li> <li><a href="#" id="stop"><img src="./css/images/stop.png"></a></li> <li><a href="#" id="forward"><img src="./css/images/forward.png"></a></li> </ul> </div> $('#pause').click(function(e) { e.preventdefault(); var myvideo = document.getelementbyid("video"); if (myvideo.paused) { $("#pause img").attr('src','./css/images/pause.png'); myvideo.play(); } else { $("#pause img").attr('src','./css/images/play.png'); myvideo.pause(); } });
i want show controls , keep video hidden on mobile hear audio of video.
it works on android devices, browsers, ipad, etc... problem iphone.
i don't know why can't keep video hidden on iphone, video hidden when page loaded when click play button video showed on black fullscreen guess native iphone.
any idea how fix this?
Comments
Post a Comment