$(".video-player").each(function (videoIndex) {
var videoId = $(this).attr("id");
video(videoId).ready(function() {
this.on("play", function(e) {
$(".video-player").each(function (index) {
if (videoIndex !== index) {
this.player.pause();
}
});
});
});
});