Developer API Functions

API Documentation

videoEnd
forces video end
api_play_currVideo
play current video
api_gotoNext
go to next video
api_gotoPrev

go to previous video

api_set_action_playlist_end

trigger a function when the playlsit has ended ie. document.getElementById(“id_sample”).api_set_action_playlist_end(yourfunction)

api_gotoItem

go to specific item ie. document.getElementById(“id_sample”).api_gotoItem(3) for third item

How to use api:

Let’s say you have a gallery with id sample_gal, then this is the code

<a href="#" onclick='document.getElementById("id_sample").api_gotoItem(3);'>here</a>

Video Player API

api_pauseMovie
pause video
api_playMovie
play video
api_action_set_video_play
trigger a function action when the video has started playing
api_action_set_video_end
trigger a function when video has ended
api_restart_video

restart video

api_handleResize

trigger a refresh resize

api_seek_to_perc

seek to percent of video – document.getElementById(“id_sample”).api_seek_to_perc(0.5) – seeks to half of video

How to use api:

pause video

Let’s say you have a player with id id_player, then this is the code

<a href="#" onclick='document.getElementById("id_player").api_pauseMovie();'>here</a>
set action on play

Let’s say you have a player with id id_player, then this is the code

<script>jQuery(document).ready(function($){
function yourfunc(){
alert('works');
}
setTimeout(function(){
document.getElementById("id_player").api_action_set_video_pause(yourfunc);
},1000);
});
</script>

Was this article helpful?

Related Articles

Leave A Comment?