Skip to content

Latest commit

 

History

History
48 lines (41 loc) · 1.1 KB

action-after-video-completed.md

File metadata and controls

48 lines (41 loc) · 1.1 KB

Custom action after video is completed

Embed library at head

<script type="text/javascript" src="https://playout.3qsdn.com/player/js/sdnplayer.js"></script>

Embed player

<h1>Video #1</h1>
<p>Some Text</p>
<!-- Player Container #1 -->
<div id="player1" style="width:100%;height:360px;"></div>
<script type="text/javscript">
   var js3qVideoPlayer;
    (function () {
        var _js3qi = setInterval(function () {
            if (typeof js3q != 'undefined') {
                clearInterval(_js3qi);
                js3qVideoPlayer = new js3q({
                    'data-id': '5c3b0910-8850-11e7-9273-002590c750be',
                    'container': 'player1',
                    'jscallback' : 'myPlayerBridge' // Name your Bridge here
                });
                js3qVideoPlayer.init();
            }
        }, 10);
    })();
</script>

JavaScript

<script type="text/javascript">
function myPlayerBridge(player, event, data) {
    switch(event) {
        case "complete":
            // do something
        break;
    }
}
</script>

Back to index.