Play and pause a Media Manager player
<!DOCTYPE html>
<!--
Using
- HTML5 video player
- play event
- pause event
Try this script on http://jsfiddle.net/3MjZu/1/
-->
<html>
<head>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
$(document).ready(function() {
$("#play").bind("click", function() {
$("#myPlayer").find(">:last-child").trigger("play")
console.log("play button click");
})
$("#pause").bind("click", function() {
$("#myPlayer").find(">:last-child").trigger("pause")
console.log("pause button click");
})
});
</script>
<style type="text/css">
.player {
background-color: #C0C0C0;
width: 600px;
height: 338px
}
</style>
</head>
<body>
<div id="myPlayer" class="player">
<script type="text/javascript" language="javascript" src="http://sdl-training.dist.sdlmedia.com/vms/distribution/embed/?o=2981B015-A171-4C6A-BEC6-9C0BC80B9F4E"></script>
</div>
<button id="play">Play</button>
<button id="pause">Pause</button>
</body>
</html>