JSFiddle - React, Tailwind, and code Playground

by Jhorsman

HTML

<p>Example for <a href="https://gist.github.com/jhorsman/6725595">https://gist.github.com/jhorsman/6725595</a></p>

<div id="myPlayer" class="player">
  <script type="text/javascript" language="javascript" src="http://mmdemo.dist.sdlmedia.com/vms/distribution/embed/?o=2A704403-660B-4368-B110-1310E5C05B76"></script>
</div>

CSS

.player {
			background-color: #C0C0C0;
			width: 600px;
			height: 338px
		}

JavaScript

$(document).bind("MMPLAYERREADY", function() {	
			console.log("MMPLAYERREADY event fired");
			$("#myPlayer").bind("show-layer-endstate", function() {
				console.log("show-layer-endstate event fired");
				alert("Let us play again!");
				$("#myPlayer").children().last().trigger("play")
			});
		});