Portfolio
promise

Add videojs player html5 with javascript

November 18, 2015Category : Code/Web

index.php <div id=”video”><p> Restart or F5 browser to view this content.</p></div> <link href=”<?php echo get_template_directory_uri(); ?>/css/video-js.min.css” rel=”stylesheet”> <script src=”<?php echo get_template_directory_uri(); ?>/js/videojs.min.js”></script> <script src=”<?php echo get_template_directory_uri(); ?>/js/jquery.min.videojs.js”></script> <script type=’text/javascript’> var obj, source; obj = document.createElement(‘video’); $(obj).attr(‘id’, ‘example_video_test’); $(obj).attr(‘class’, ‘video-js vjs-default-skin’); $(obj).attr(‘controls’, ‘ ‘); $(obj).attr(‘poster’, ‘http://todaytv.club/movie_night_image.jpg’); $(obj).attr(‘preload’, ‘auto’); $(obj).attr(‘data-setup’, ‘{“inactivityTimeout”: 0}’); $(obj).attr(‘autoplay’, ‘true’); source = document.createElement(‘source’);..

Read more
01.
© Oliver / All rights reserved.
To top