Flowplayer · Javascript setup

Flowplayer installed into an empty container via JavaScript only.

No dependency on jQuery.

<head/>

For smoother HLS playback in modern browsers we load the hlsjs plugin.

<!-- Flowplayer library -->
<script src="//releases.flowplayer.org/7.2.1/flowplayer.min.js"></script>
<!-- Flowplayer hlsjs engine (light) -->
<script src="//releases.flowplayer.org/hlsjs/flowplayer.hlsjs.light.min.js"></script>

HTML

<body/>

<div id="player" class="fp-slim"></div>

HTML

<script>

flowplayer("#player", {
aspectRatio: "12:5",
clip: {
sources: [
{ type: "application/x-mpegurl", src: "//edge.flowplayer.org/bauhaus.m3u8" },
{ type: "video/mp4", src: "//edge.flowplayer.org/bauhaus.mp4" }
],
title: "Javascript setup"
}
});

JavaScript