Dynamic player installation · Flowplayer
Same as this demo, but the player is created dynamically using JavaScript
<head/>
<script>
$(function () {
var dots = $('<div id="dots" class="flowplayer is-splash"/>'),
video = $("<video/>"),
playlist = $('<div class="fp-playlist"/>');
$(["mp4", "webm", "ogg"]).each(function (i, type) {
video.append($("<source/>").attr({
src: "http://stream.flowplayer.org/night1/640x360." +
(type !== "ogg" ? type : "ogv"),
type: "video/" + type
}));
});
$([1, 2, 3, 4]).each(function () {
playlist.append('<a href="http://stream.flowplayer.org/night'
+ this + '/640x360.mp4"></a>');
});
dots.append(video).append(playlist);
$("#player").append(dots);
dots.flowplayer({
ratio: 9/16
});
});
<body/>
<div id="player"></div>