I have a script that works perfectly in a webpage (to play a video) but it doesn’t work when seen in a smartphone. Can anyone help ?
Probably the way how videos are played in a webpage is different than when they are played in a smartphone ?
Here is the complete code for the popup that is running the video :
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<link href="//vjs.zencdn.net/4.11/video-js.css" rel="stylesheet">
<script src="//vjs.zencdn.net/4.11/video.js"></script>
</head>
<body>
<video id="video_53" class="video-js vjs-default-skin vjs-big-play-centered"
controls preload="none" width="600" height="300" poster="filei.php?img=1440519095-AIDACTIV-presentation-des-cours-MASTER-DYNAMIQUE-DEFINITIF-" data-setup='{"example_option":true}'>
<source src="filep.php?f=53&t=t&type=mp4&time=1443210646" type="video/mp4" />
<p class="vjs-no-js">Veuillez utiliser un navigateur moderne et mettre à jour pour pouvoir visualiser la vidéo</p>
</video>
<script>
jQuery( document ).ready(function() {
if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
jQuery('#video_53 video source').attr( {
src : 'filep.php?f=53&t=t&type=webm&time=1443210646',
type : 'video/webm',
});
}
});
</script></body>
</html>
The working code can be seen at http://www.aidactiv.com/. On the right column, we have two videos, one below another, that opens in a popup.
Probably it has something to do with the vjs.zencdn code or simply there an issue with the type of video (video/mp4 and video/webm here) for the smartphones ?
Thanks for any help.