To use jquery image player, you need to make sure both the jquery image player and jQuery 1.7 or higher scripts are included.
<!-- Important jquery image player stylesheet --> <link rel="stylesheet" href="jquery-image-player-min.css"> <!-- jQuery 1.7+ --> <script src="jquery-1.9.1.min.js"></script> <!-- jQuery 1.8+ --> <script src="jquery-ui.min.js"></script> <!-- Include js plugin --> <script src="jquery-image-player-min.js"></script>
You need a special markup "data-duration". All you need is to wrap your li(jquery image player works with only li element) inside the container element. Any type of ID "uipg-video-player" is mandatory to apply proper styles that come from jquery-image-player-min.css file.
<div id="uipg-video-player"> <ul> <li data-duration="0">Your Content</li> <li data-duration="1000">Your Content</li> <li data-duration="1000">Your Content</li> <li data-duration="1000">Your Content</li> <li data-duration="1000">Your Content</li> <li data-duration="1000">Your Content</li> <li data-duration="1000">Your Content</li> </ul> </div>
Now call the jquery image player initializer function and its ready.
$(document).ready(function(){ $("#uipg-video-player").jsVideoPlayer(); });
Variable | Default | Type | Description |
---|---|---|---|
showTitle | true | boolean | This will display the icon of 'title' in the player control bar |
showCurrentTime | true | boolean | This will display the label of 'current time' in the player control bar |
showTotalTime | true | boolean | This will display the label of 'total time' in the player control bar |
showSliderTime | true | boolean | This will display the label of 'slider time' in the player control bar |
onFinishGotoStart | false | boolean | Once you finish playing the video it will redirect to start screen |
playerWidth | 900 | int | Here you can customize the 'width' of the player |
playerHeight | 385 | int | Here you can customize the 'height' of the player |