Control player over javascript

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/javascript">
   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'
                });
                js3qVideoPlayer.init();
            }
        }, 10);
    })();
</script>
<br><br>
<button onclick="javascript:play();">Play</button>
<button onclick="javascript:pause();">Pause</button>

JavaScript

<script type="text/javascript">
function play() {
    js3qVideoPlayer.play();
}

function pause() {
    js3qVideoPlayer.pause();
}
</script>

Back to index.