Embed: dynamically load player js only if required

This commit is contained in:
Cat 2017-03-20 10:45:01 +01:00 committed by Thulinma
parent 43d8da036a
commit 8143d6af05
21 changed files with 532 additions and 39724 deletions

View file

@ -348,7 +348,9 @@ add_executable(MistOutHTTP
generated/videojs.js.h
generated/img.js.h
generated/playerdash.js.h
generated/playerdashlic.js.h
generated/playervideo.js.h
generated/playerhlsvideo.js.h
generated/core.js.h
generated/mist.css.h
)
@ -450,13 +452,21 @@ add_custom_command(OUTPUT generated/img.js.h
COMMAND ./sourcery ${SOURCE_DIR}/embed/wrappers/img.js img_js generated/img.js.h
DEPENDS sourcery ${SOURCE_DIR}/embed/wrappers/img.js
)
add_custom_command(OUTPUT generated/playerdashlic.js.h
COMMAND ./sourcery ${SOURCE_DIR}/embed/players/dash.js.license.js playerdashlic_js generated/playerdashlic.js.h
DEPENDS sourcery ${SOURCE_DIR}/embed/players/dash.js.license.js
)
add_custom_command(OUTPUT generated/playerdash.js.h
COMMAND ./sourcery ${SOURCE_DIR}/embed/players/dash.js playerdash_js generated/playerdash.js.h
DEPENDS sourcery ${SOURCE_DIR}/embed/players/dash.js
COMMAND ./sourcery ${SOURCE_DIR}/embed/players/dash.all.min.js playerdash_js generated/playerdash.js.h
DEPENDS sourcery ${SOURCE_DIR}/embed/players/dash.all.min.js
)
add_custom_command(OUTPUT generated/playervideo.js.h
COMMAND ./sourcery ${SOURCE_DIR}/embed/players/videojs.js playervideo_js generated/playervideo.js.h
DEPENDS sourcery ${SOURCE_DIR}/embed/players/videojs.js
COMMAND ./sourcery ${SOURCE_DIR}/embed/players/video.min.js playervideo_js generated/playervideo.js.h
DEPENDS sourcery ${SOURCE_DIR}/embed/players/video.min.js
)
add_custom_command(OUTPUT generated/playerhlsvideo.js.h
COMMAND ./sourcery ${SOURCE_DIR}/embed/players/videojs-contrib-hls.min.js playerhlsvideo_js generated/playerhlsvideo.js.h
DEPENDS sourcery ${SOURCE_DIR}/embed/players/videojs-contrib-hls.min.js
)
add_custom_command(OUTPUT generated/core.js.h
COMMAND ./sourcery ${SOURCE_DIR}/embed/core.js core_js generated/core.js.h
@ -470,9 +480,9 @@ add_custom_command(OUTPUT generated/mist.css.h
########################################
# Local Settings Page #
########################################
set(lspSOURCES
${SOURCE_DIR}/lsp/plugins/jquery.js
${SOURCE_DIR}/lsp/plugins/jquery.flot.min.js
set(lspSOURCES
${SOURCE_DIR}/lsp/plugins/jquery.js
${SOURCE_DIR}/lsp/plugins/jquery.flot.min.js
${SOURCE_DIR}/lsp/plugins/jquery.flot.time.min.js
${SOURCE_DIR}/lsp/plugins/jquery.qrcode.min.js
${SOURCE_DIR}/lsp/minified.js

View file

@ -27,12 +27,12 @@ MistPlayer.prototype.sendEvent = function(type,message,target) {
return true;
}
MistPlayer.prototype.addlog = function(msg) {
this.sendEvent('log',msg,this.element);
this.sendEvent('log',msg,(this.element ? this.element: this.target));
}
MistPlayer.prototype.adderror = function(msg) {
this.sendEvent('error',msg,this.element);
this.sendEvent('error',msg,(this.element ? this.element: this.target));
}
MistPlayer.prototype.build = function () {
MistPlayer.prototype.build = function (options,callback) {
this.addlog('Error in player implementation');
var err = document.createElement('div');
var msgnode = document.createTextNode(msg);
@ -673,7 +673,12 @@ MistPlayer.prototype.askNextCombo = function(msg){
err.style.width = '100%';
err.style['margin-left'] = 0;
this.target.appendChild(err);
this.element.style.opacity = '0.2';
if (this.element) {
this.element.style.opacity = '0.2';
if (this.element.parentElement != this.target) {
err.style.position = '';
}
}
//if there is a next source/player, show a button to activate it
var opts = this.mistplaySettings.options;
@ -788,14 +793,16 @@ MistPlayer.prototype.report = function(msg) {
}
MistPlayer.prototype.unload = function(){
this.addlog('Unloading..');
if (('pause' in this) && (this.pause)) { this.pause(); }
if ('updateSrc' in this) {
this.updateSrc('');
this.element.load(); //dont use this.load() to avoid interrupting play/pause
if (this.element) {
if (('pause' in this) && (this.pause)) { this.pause(); }
if ('updateSrc' in this) {
this.updateSrc('');
this.element.load(); //dont use this.load() to avoid interrupting play/pause
}
this.element.innerHTML = '';
}
this.timer.clear();
this.target.innerHTML = '';
this.element.innerHTML = '';
};
function mistCheck(streaminfo,options,embedLog) {
@ -1187,6 +1194,142 @@ function mistPlay(streamName,options) {
}
}
function onplayerbuilt(element) {
options.target.appendChild(element);
element.setAttribute('data-player',mistPlayer);
element.setAttribute('data-mime',source.type);
player.report({
type: 'init',
info: 'Player built'
});
if (player.setTracks(false)) {
player.onready(function(){
//player.setTracks(usetracks);
if ('setTracks' in options) { player.setTracks(options.setTracks); }
});
}
//monitor for errors
element.sendPingTimeout = setInterval(function(){
if (player.paused) { return; }
player.report({
type: 'playback',
info: 'ping'
});
},150e3);
element.addEventListener('error',function(e){
player.askNextCombo('The player has thrown an error');
var r = {
type: 'playback',
error: 'The player has thrown an error'
};
if ('readyState' in player.element) {
r.readyState = player.element.readyState;
}
if ('networkState' in player.element) {
r.networkState = player.element.networkState;
}
if (('error' in player.element) && (player.element.error) && ('code' in player.element.error)) {
r.code = player.element.error.code;
}
player.report(r);
});
element.checkStalledTimeout = false;
var stalled = function(e){
if (element.checkStalledTimeout) { return; }
var curpos = player.element.currentTime;
if (curpos == 0) { return; }
element.checkStalledTimeout = player.timer.add(function(){
if ((player.paused) || (curpos != player.element.currentTime)) { return; }
player.askNextCombo('Playback has stalled');
player.report({
'type': 'playback',
'warn': 'Playback was stalled for > 30 sec'
});
},30e3);
};
element.addEventListener('stalled',stalled,true);
element.addEventListener('waiting',stalled,true);
if (playerOpts.live) {
element.checkProgressTimeout = false;
var progress = function(e){
if (element.checkStalledTimeout) {
player.timer.remove(element.checkStalledTimeout);
element.checkStalledTimeout = false;
player.cancelAskNextCombo();
}
};
//element.addEventListener('progress',progress,true); //sometimes, there is progress but no playback
element.addEventListener('playing',progress,true);
element.addEventListener('play',function(){
player.paused = false;
if ((!element.checkProgressTimeout) && (player.element) && ('currentTime' in player.element)) {
//check if the progress made is equal to the time spent
var lasttime = player.element.currentTime;
element.checkProgressTimeout = player.timer.add(function(){
var newtime = player.element.currentTime;
var progress = newtime - lasttime;
lasttime = newtime;
if (progress < 0) { return; } //its probably a looping VOD or we've just seeked
if (progress == 0) {
var msg = 'There should be playback but nothing was played';
var r = {
type: 'playback',
warn: msg
};
player.addlog(msg);
if ('readyState' in player.element) {
r.readyState = player.element.readyState;
}
if ('networkState' in player.element) {
r.networkState = player.element.networkState;
}
if (('error' in player.element) && (player.element.error) && ('code' in player.element.error)) {
r.code = player.element.error.code;
}
player.report(r);
player.askNextCombo('No playback');
return;
}
player.cancelAskNextCombo();
if (progress < 20) {
var msg = 'It seems playback is lagging (progressed '+Math.round(progress*100)/100+'/30s)'
player.addlog(msg);
player.report({
type: 'playback',
warn: msg
});
return;
}
},30e3,true);
}
},true);
element.addEventListener('pause',function(){
player.paused = true;
if (element.checkProgressTimeout) {
player.timer.remove(element.checkProgressTimeout);
element.checkProgressTimeout = false;
}
},true);
}
if (player.resize) {
//monitor for resizes and fire if needed
window.addEventListener('resize',function(){
player.resize(calcSize());
});
}
for (var i in player.onreadylist) {
player.onreadylist[i]();
}
protoplay.sendEvent('initialized','',options.target);
if (options.callback) { options.callback(player); }
}
//build the player
player.mistplaySettings = {
streamname: streamName,
@ -1198,11 +1341,10 @@ function mistPlay(streamName,options) {
};
player.options = playerOpts;
try {
var element = player.build(playerOpts);
var element = player.build(playerOpts,onplayerbuilt);
}
catch (e) {
//show the next player/reload buttons if there is an error in the player build code
options.target.appendChild(player.element);
player.askNextCombo('Error while building player: '+e.stack);
throw e;
player.report({
@ -1211,139 +1353,6 @@ function mistPlay(streamName,options) {
});
return;
}
options.target.appendChild(element);
element.setAttribute('data-player',mistPlayer);
element.setAttribute('data-mime',source.type);
player.report({
type: 'init',
info: 'Player built'
});
if (player.setTracks(false)) {
player.onready(function(){
//player.setTracks(usetracks);
if ('setTracks' in options) { player.setTracks(options.setTracks); }
});
}
//monitor for errors
element.sendPingTimeout = setInterval(function(){
if (player.paused) { return; }
player.report({
type: 'playback',
info: 'ping'
});
},150e3);
element.addEventListener('error',function(e){
player.askNextCombo('The player has thrown an error');
var r = {
type: 'playback',
error: 'The player has thrown an error'
};
if ('readyState' in player.element) {
r.readyState = player.element.readyState;
}
if ('networkState' in player.element) {
r.networkState = player.element.networkState;
}
if (('error' in player.element) && (player.element.error) && ('code' in player.element.error)) {
r.code = player.element.error.code;
}
player.report(r);
});
element.checkStalledTimeout = false;
var stalled = function(e){
if (element.checkStalledTimeout) { return; }
var curpos = player.element.currentTime;
if (curpos == 0) { return; }
element.checkStalledTimeout = player.timer.add(function(){
if ((player.paused) || (curpos != player.element.currentTime)) { return; }
player.askNextCombo('Playback has stalled');
player.report({
'type': 'playback',
'warn': 'Playback was stalled for > 30 sec'
});
},30e3);
};
element.addEventListener('stalled',stalled,true);
element.addEventListener('waiting',stalled,true);
if (playerOpts.live) {
element.checkProgressTimeout = false;
var progress = function(e){
if (element.checkStalledTimeout) {
player.timer.remove(element.checkStalledTimeout);
element.checkStalledTimeout = false;
player.cancelAskNextCombo();
}
};
//element.addEventListener('progress',progress,true); //sometimes, there is progress but no playback
element.addEventListener('playing',progress,true);
element.addEventListener('play',function(){
player.paused = false;
if ((!element.checkProgressTimeout) && (player.element) && ('currentTime' in player.element)) {
//check if the progress made is equal to the time spent
var lasttime = player.element.currentTime;
element.checkProgressTimeout = player.timer.add(function(){
var newtime = player.element.currentTime;
var progress = newtime - lasttime;
lasttime = newtime;
if (progress < 0) { return; } //its probably a looping VOD or we've just seeked
if (progress == 0) {
var msg = 'There should be playback but nothing was played';
var r = {
type: 'playback',
warn: msg
};
player.addlog(msg);
if ('readyState' in player.element) {
r.readyState = player.element.readyState;
}
if ('networkState' in player.element) {
r.networkState = player.element.networkState;
}
if (('error' in player.element) && (player.element.error) && ('code' in player.element.error)) {
r.code = player.element.error.code;
}
player.report(r);
player.askNextCombo('No playback');
return;
}
player.cancelAskNextCombo();
if (progress < 20) {
var msg = 'It seems playback is lagging (progressed '+Math.round(progress*100)/100+'/30s)'
player.addlog(msg);
player.report({
type: 'playback',
warn: msg
});
return;
}
},30e3,true);
}
},true);
element.addEventListener('pause',function(){
player.paused = true;
if (element.checkProgressTimeout) {
player.timer.remove(element.checkProgressTimeout);
element.checkProgressTimeout = false;
}
},true);
}
if (player.resize) {
//monitor for resizes and fire if needed
window.addEventListener('resize',function(){
player.resize(calcSize());
});
}
for (var i in player.onreadylist) {
player.onreadylist[i]();
}
protoplay.sendEvent('initialized','',options.target);
if (options.callback) { options.callback(player); }
}
else {
if (streaminfo.error) {

14
embed/players/dash.all.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,15 @@
/**
dash.js BSD License Agreement
The copyright in this software is being made available under the BSD License, included below. This software may be subject to other third party and contributor rights, including patent rights, and no such rights are granted under this license.
Copyright (c) 2015, Dash Industry Forum. **All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the Dash Industry Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ?AS IS? AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

View file

@ -1,902 +0,0 @@
<!DOCTYPE html>
<html lang="en" class=" is-copy-enabled is-u2f-enabled">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#">
<meta charset='utf-8'>
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/frameworks-a56791f00ea569012c620526e115f9be8d519034262393f82c045116a52b0817.css" integrity="sha256-pWeR8A6laQEsYgUm4RX5vo1RkDQmI5P4LARRFqUrCBc=" media="all" rel="stylesheet" />
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/github-5deed352941c0958fa4fa1d6f62607987d97095b986d6994657867ea4d843cbd.css" integrity="sha256-Xe7TUpQcCVj6T6HW9iYHmH2XCVuYbWmUZXhn6k2EPL0=" media="all" rel="stylesheet" />
<link as="script" href="https://assets-cdn.github.com/assets/frameworks-149d9338c2665172870825c78fa48fdcca4d431d067cbf5fda7120d9e39cc738.js" rel="preload" />
<link as="script" href="https://assets-cdn.github.com/assets/github-109daf4a404ee43b316c94cbb025dd5c390990eacc3b1d807ec6e1150039af02.js" rel="preload" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Language" content="en">
<meta name="viewport" content="width=device-width">
<title>dash.js/LICENSE.md at development · Dash-Industry-Forum/dash.js</title>
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
<meta property="fb:app_id" content="1401488693436528">
<meta content="https://avatars3.githubusercontent.com/u/2762280?v=3&amp;s=400" name="twitter:image:src" /><meta content="@github" name="twitter:site" /><meta content="summary" name="twitter:card" /><meta content="Dash-Industry-Forum/dash.js" name="twitter:title" /><meta content="dash.js - A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers." name="twitter:description" />
<meta content="https://avatars3.githubusercontent.com/u/2762280?v=3&amp;s=400" property="og:image" /><meta content="GitHub" property="og:site_name" /><meta content="object" property="og:type" /><meta content="Dash-Industry-Forum/dash.js" property="og:title" /><meta content="https://github.com/Dash-Industry-Forum/dash.js" property="og:url" /><meta content="dash.js - A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers." property="og:description" />
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
<link rel="assets" href="https://assets-cdn.github.com/">
<link rel="web-socket" href="wss://live.github.com/_sockets/Mjk4MDcwNTphZTZkYTAwNTEzNGY3MDQ0NjZiNzcwOTYwMzlmM2JmNjo3YmM0Y2RkNTYzOTVjOWZlOTUxOTM0NDU5MzNkZjM0MmIxYzhjOTk5OGY1MWZkZThjNTk3ZTg2ODljMDE3MmFl--dfbe7e220e7abcec65b5a48721918ce1ab85a3c6">
<meta name="pjax-timeout" content="1000">
<link rel="sudo-modal" href="/sessions/sudo_modal">
<meta name="msapplication-TileImage" content="/windows-tile.png">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="selected-link" value="repo_source" data-pjax-transient>
<meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
<meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
<meta name="google-analytics" content="UA-3769691-2">
<meta content="collector.githubapp.com" name="octolytics-host" /><meta content="github" name="octolytics-app-id" /><meta content="5C44947A:2B25:14702F7A:578354FD" name="octolytics-dimension-request_id" /><meta content="2980705" name="octolytics-actor-id" /><meta content="thoronwen" name="octolytics-actor-login" /><meta content="9dae7495ad90123d0cea295f73d352139e0239dc9ba7463110880f318df82c83" name="octolytics-actor-hash" />
<meta content="/&lt;user-name&gt;/&lt;repo-name&gt;/blob/show" data-pjax-transient="true" name="analytics-location" />
<meta class="js-ga-set" name="dimension1" content="Logged In">
<meta name="hostname" content="github.com">
<meta name="user-login" content="thoronwen">
<meta name="expected-hostname" content="github.com">
<meta name="js-proxy-site-detection-payload" content="YWMzZjEyOWU1ZjQxNTA3ZTU0ODFjZjQ3N2Y1N2IxNTBiYzYyYTA5YjBjZjg3OGViYjlkZWZjN2NiZDBjZmE0OHx7InJlbW90ZV9hZGRyZXNzIjoiOTIuNjguMTQ4LjEyMiIsInJlcXVlc3RfaWQiOiI1QzQ0OTQ3QToyQjI1OjE0NzAyRjdBOjU3ODM1NEZEIiwidGltZXN0YW1wIjoxNDY4MjI0NzY2fQ==">
<link rel="mask-icon" href="https://assets-cdn.github.com/pinned-octocat.svg" color="#4078c0">
<link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
<meta name="html-safe-nonce" content="9d724374e791efca9d9e0daa13addd3144fb9062">
<meta content="e31b8b36558bb93709d07c04a8282c2434e31128" name="form-nonce" />
<meta http-equiv="x-pjax-version" content="6b9c431dbe5856e2eed898e3470e5eb3">
<meta name="description" content="dash.js - A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.">
<meta name="go-import" content="github.com/Dash-Industry-Forum/dash.js git https://github.com/Dash-Industry-Forum/dash.js.git">
<meta content="2762280" name="octolytics-dimension-user_id" /><meta content="Dash-Industry-Forum" name="octolytics-dimension-user_login" /><meta content="6621471" name="octolytics-dimension-repository_id" /><meta content="Dash-Industry-Forum/dash.js" name="octolytics-dimension-repository_nwo" /><meta content="true" name="octolytics-dimension-repository_public" /><meta content="false" name="octolytics-dimension-repository_is_fork" /><meta content="6621471" name="octolytics-dimension-repository_network_root_id" /><meta content="Dash-Industry-Forum/dash.js" name="octolytics-dimension-repository_network_root_nwo" />
<link href="https://github.com/Dash-Industry-Forum/dash.js/commits/development.atom" rel="alternate" title="Recent Commits to dash.js:development" type="application/atom+xml">
<link rel="canonical" href="https://github.com/Dash-Industry-Forum/dash.js/blob/development/LICENSE.md" data-pjax-transient>
</head>
<body class="logged-in env-production linux vis-public page-blob">
<div id="js-pjax-loader-bar" class="pjax-loader-bar"></div>
<a href="#start-of-content" tabindex="1" class="accessibility-aid js-skip-to-content">Skip to content</a>
<div class="header header-logged-in true" role="banner">
<div class="container clearfix">
<a class="header-logo-invertocat" href="https://github.com/" data-hotkey="g d" aria-label="Homepage" data-ga-click="Header, go to dashboard, icon:logo">
<svg aria-hidden="true" class="octicon octicon-mark-github" height="28" version="1.1" viewBox="0 0 16 16" width="28"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg>
</a>
<div class="header-search scoped-search site-scoped-search js-site-search" role="search">
<!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/Dash-Industry-Forum/dash.js/search" class="js-site-search-form" data-scoped-search-url="/Dash-Industry-Forum/dash.js/search" data-unscoped-search-url="/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
<label class="form-control header-search-wrapper js-chromeless-input-container">
<div class="header-search-scope">This repository</div>
<input type="text"
class="form-control header-search-input js-site-search-focus js-site-search-field is-clearable"
data-hotkey="s"
name="q"
placeholder="Search"
aria-label="Search this repository"
data-unscoped-placeholder="Search GitHub"
data-scoped-placeholder="Search"
tabindex="1"
autocapitalize="off">
</label>
</form></div>
<ul class="header-nav left" role="navigation">
<li class="header-nav-item">
<a href="/pulls" class="js-selected-navigation-item header-nav-link" data-ga-click="Header, click, Nav menu - item:pulls context:user" data-hotkey="g p" data-selected-links="/pulls /pulls/assigned /pulls/mentioned /pulls">
Pull requests
</a> </li>
<li class="header-nav-item">
<a href="/issues" class="js-selected-navigation-item header-nav-link" data-ga-click="Header, click, Nav menu - item:issues context:user" data-hotkey="g i" data-selected-links="/issues /issues/assigned /issues/mentioned /issues">
Issues
</a> </li>
<li class="header-nav-item">
<a class="header-nav-link" href="https://gist.github.com/" data-ga-click="Header, go to gist, text:gist">Gist</a>
</li>
</ul>
<ul class="header-nav user-nav right" id="user-links">
<li class="header-nav-item">
<a href="/notifications" aria-label="You have unread notifications" class="header-nav-link notification-indicator tooltipped tooltipped-s js-socket-channel js-notification-indicator" data-channel="tenant:1:notification-changed:2980705" data-ga-click="Header, go to notifications, icon:unread" data-hotkey="g n">
<span class="mail-status unread"></span>
<svg aria-hidden="true" class="octicon octicon-bell" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M14 12v1H0v-1l.73-.58c.77-.77.81-2.55 1.19-4.42C2.69 3.23 6 2 6 2c0-.55.45-1 1-1s1 .45 1 1c0 0 3.39 1.23 4.16 5 .38 1.88.42 3.66 1.19 4.42l.66.58H14zm-7 4c1.11 0 2-.89 2-2H5c0 1.11.89 2 2 2z"></path></svg>
</a>
</li>
<li class="header-nav-item dropdown js-menu-container">
<a class="header-nav-link tooltipped tooltipped-s js-menu-target" href="/new"
aria-label="Create new…"
data-ga-click="Header, create new, icon:add">
<svg aria-hidden="true" class="octicon octicon-plus left" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 9H7v5H5V9H0V7h5V2h2v5h5z"></path></svg>
<span class="dropdown-caret"></span>
</a>
<div class="dropdown-menu-content js-menu-content">
<ul class="dropdown-menu dropdown-menu-sw">
<a class="dropdown-item" href="/new" data-ga-click="Header, create new repository">
New repository
</a>
<a class="dropdown-item" href="/new/import" data-ga-click="Header, import a repository">
Import repository
</a>
<a class="dropdown-item" href="/organizations/new" data-ga-click="Header, create new organization">
New organization
</a>
<div class="dropdown-divider"></div>
<div class="dropdown-header">
<span title="Dash-Industry-Forum/dash.js">This repository</span>
</div>
<a class="dropdown-item" href="/Dash-Industry-Forum/dash.js/issues/new" data-ga-click="Header, create new issue">
New issue
</a>
</ul>
</div>
</li>
<li class="header-nav-item dropdown js-menu-container">
<a class="header-nav-link name tooltipped tooltipped-sw js-menu-target" href="/thoronwen"
aria-label="View profile and more"
data-ga-click="Header, show menu, icon:avatar">
<img alt="@thoronwen" class="avatar" height="20" src="https://avatars2.githubusercontent.com/u/2980705?v=3&amp;s=40" width="20" />
<span class="dropdown-caret"></span>
</a>
<div class="dropdown-menu-content js-menu-content">
<div class="dropdown-menu dropdown-menu-sw">
<div class="dropdown-header header-nav-current-user css-truncate">
Signed in as <strong class="css-truncate-target">thoronwen</strong>
</div>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="/thoronwen" data-ga-click="Header, go to profile, text:your profile">
Your profile
</a>
<a class="dropdown-item" href="/stars" data-ga-click="Header, go to starred repos, text:your stars">
Your stars
</a>
<a class="dropdown-item" href="/explore" data-ga-click="Header, go to explore, text:explore">
Explore
</a>
<a class="dropdown-item" href="/integrations" data-ga-click="Header, go to integrations, text:integrations">
Integrations
</a>
<a class="dropdown-item" href="https://help.github.com" data-ga-click="Header, go to help, text:help">
Help
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="/settings/profile" data-ga-click="Header, go to settings, icon:settings">
Settings
</a>
<!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/logout" class="logout-form" data-form-nonce="e31b8b36558bb93709d07c04a8282c2434e31128" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="HnZks7yM48r7+We6aFWR9F8uqBnEZDm3239GCmMBDhcgJcKQjTfjY4EynwssOH/JX19SG5CDKQN/UkpbkNpwgw==" /></div>
<button class="dropdown-item dropdown-signout" data-ga-click="Header, sign out, icon:logout">
Sign out
</button>
</form> </div>
</div>
</li>
</ul>
</div>
</div>
<div id="start-of-content" class="accessibility-aid"></div>
<div id="js-flash-container">
</div>
<div role="main" class="main-content">
<div itemscope itemtype="http://schema.org/SoftwareSourceCode">
<div id="js-repo-pjax-container" data-pjax-container>
<div class="pagehead repohead instapaper_ignore readability-menu experiment-repo-nav">
<div class="container repohead-details-container">
<ul class="pagehead-actions">
<li>
<!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/notifications/subscribe" class="js-social-container" data-autosubmit="true" data-form-nonce="e31b8b36558bb93709d07c04a8282c2434e31128" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="dyaT7hDPcpgNqbi0PGF35WwGx6Yrti4is82pVLEuH8kHuMSxLn+Q/C4PUT4i2/1V5VOOiQsPC0Qv64zDYBMwEQ==" /></div> <input class="form-control" id="repository_id" name="repository_id" type="hidden" value="6621471" />
<div class="select-menu js-menu-container js-select-menu">
<a href="/Dash-Industry-Forum/dash.js/subscription"
class="btn btn-sm btn-with-count select-menu-button js-menu-target" role="button" tabindex="0" aria-haspopup="true"
data-ga-click="Repository, click Watch settings, action:blob#show">
<span class="js-select-button">
<svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"></path></svg>
Watch
</span>
</a>
<a class="social-count js-social-count" href="/Dash-Industry-Forum/dash.js/watchers">
206
</a>
<div class="select-menu-modal-holder">
<div class="select-menu-modal subscription-menu-modal js-menu-content" aria-hidden="true">
<div class="select-menu-header js-navigation-enable" tabindex="-1">
<svg aria-label="Close" class="octicon octicon-x js-menu-close" height="16" role="img" version="1.1" viewBox="0 0 12 16" width="12"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
<span class="select-menu-title">Notifications</span>
</div>
<div class="select-menu-list js-navigation-container" role="menu">
<div class="select-menu-item js-navigation-item selected" role="menuitem" tabindex="0">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<div class="select-menu-item-text">
<input checked="checked" id="do_included" name="do" type="radio" value="included" />
<span class="select-menu-item-heading">Not watching</span>
<span class="description">Be notified when participating or @mentioned.</span>
<span class="js-select-button-text hidden-select-button-text">
<svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"></path></svg>
Watch
</span>
</div>
</div>
<div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<div class="select-menu-item-text">
<input id="do_subscribed" name="do" type="radio" value="subscribed" />
<span class="select-menu-item-heading">Watching</span>
<span class="description">Be notified of all conversations.</span>
<span class="js-select-button-text hidden-select-button-text">
<svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"></path></svg>
Unwatch
</span>
</div>
</div>
<div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<div class="select-menu-item-text">
<input id="do_ignore" name="do" type="radio" value="ignore" />
<span class="select-menu-item-heading">Ignoring</span>
<span class="description">Never be notified.</span>
<span class="js-select-button-text hidden-select-button-text">
<svg aria-hidden="true" class="octicon octicon-mute" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8 2.81v10.38c0 .67-.81 1-1.28.53L3 10H1c-.55 0-1-.45-1-1V7c0-.55.45-1 1-1h2l3.72-3.72C7.19 1.81 8 2.14 8 2.81zm7.53 3.22l-1.06-1.06-1.97 1.97-1.97-1.97-1.06 1.06L11.44 8 9.47 9.97l1.06 1.06 1.97-1.97 1.97 1.97 1.06-1.06L13.56 8l1.97-1.97z"></path></svg>
Stop ignoring
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</li>
<li>
<div class="js-toggler-container js-social-container starring-container ">
<!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/Dash-Industry-Forum/dash.js/unstar" class="starred" data-form-nonce="e31b8b36558bb93709d07c04a8282c2434e31128" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="b6D5S9lSA12ygF/oSCL24/lYMn/Q84qaiAIBEaufxBoCI1j8EdPKP25z+NWHRY7lhEmg8+R6kcj+X07nayVX3A==" /></div>
<button
class="btn btn-sm btn-with-count js-toggler-target"
aria-label="Unstar this repository" title="Unstar Dash-Industry-Forum/dash.js"
data-ga-click="Repository, click unstar button, action:blob#show; text:Unstar">
<svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"></path></svg>
Unstar
</button>
<a class="social-count js-social-count" href="/Dash-Industry-Forum/dash.js/stargazers">
1,253
</a>
</form>
<!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/Dash-Industry-Forum/dash.js/star" class="unstarred" data-form-nonce="e31b8b36558bb93709d07c04a8282c2434e31128" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="Y7mapw0zGwQxg3i6cCOK5gmYQnzvckuzkx935P6UWnb9R/BCrVuk+Uf9BkvXj+lz5ksTA4y88uKm+lwMtRGl9A==" /></div>
<button
class="btn btn-sm btn-with-count js-toggler-target"
aria-label="Star this repository" title="Star Dash-Industry-Forum/dash.js"
data-ga-click="Repository, click star button, action:blob#show; text:Star">
<svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"></path></svg>
Star
</button>
<a class="social-count js-social-count" href="/Dash-Industry-Forum/dash.js/stargazers">
1,253
</a>
</form> </div>
</li>
<li>
<a href="#fork-destination-box" class="btn btn-sm btn-with-count"
title="Fork your own copy of Dash-Industry-Forum/dash.js to your account"
aria-label="Fork your own copy of Dash-Industry-Forum/dash.js to your account"
rel="facebox"
data-ga-click="Repository, show fork modal, action:blob#show; text:Fork">
<svg aria-hidden="true" class="octicon octicon-repo-forked" height="16" version="1.1" viewBox="0 0 10 16" width="10"><path d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"></path></svg>
Fork
</a>
<div id="fork-destination-box" style="display: none;">
<h2 class="facebox-header" data-facebox-id="facebox-header">Where should we fork this repository?</h2>
<include-fragment src=""
class="js-fork-select-fragment fork-select-fragment"
data-url="/Dash-Industry-Forum/dash.js/fork?fragment=1">
<img alt="Loading" height="64" src="https://assets-cdn.github.com/images/spinners/octocat-spinner-128.gif" width="64" />
</include-fragment>
</div>
<a href="/Dash-Industry-Forum/dash.js/network" class="social-count">
589
</a>
</li>
</ul>
<h1 class="public ">
<svg aria-hidden="true" class="octicon octicon-repo" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"></path></svg>
<span class="author" itemprop="author"><a href="/Dash-Industry-Forum" class="url fn" rel="author">Dash-Industry-Forum</a></span><!--
--><span class="path-divider">/</span><!--
--><strong itemprop="name"><a href="/Dash-Industry-Forum/dash.js" data-pjax="#js-repo-pjax-container">dash.js</a></strong>
</h1>
</div>
<div class="container">
<nav class="reponav js-repo-nav js-sidenav-container-pjax"
itemscope
itemtype="http://schema.org/BreadcrumbList"
role="navigation"
data-pjax="#js-repo-pjax-container">
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a href="/Dash-Industry-Forum/dash.js" aria-selected="true" class="js-selected-navigation-item selected reponav-item" data-hotkey="g c" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches /Dash-Industry-Forum/dash.js" itemprop="url">
<svg aria-hidden="true" class="octicon octicon-code" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M9.5 3L8 4.5 11.5 8 8 11.5 9.5 13 14 8 9.5 3zm-5 0L0 8l4.5 5L6 11.5 2.5 8 6 4.5 4.5 3z"></path></svg>
<span itemprop="name">Code</span>
<meta itemprop="position" content="1">
</a> </span>
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a href="/Dash-Industry-Forum/dash.js/issues" class="js-selected-navigation-item reponav-item" data-hotkey="g i" data-selected-links="repo_issues repo_labels repo_milestones /Dash-Industry-Forum/dash.js/issues" itemprop="url">
<svg aria-hidden="true" class="octicon octicon-issue-opened" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg>
<span itemprop="name">Issues</span>
<span class="counter">122</span>
<meta itemprop="position" content="2">
</a> </span>
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a href="/Dash-Industry-Forum/dash.js/pulls" class="js-selected-navigation-item reponav-item" data-hotkey="g p" data-selected-links="repo_pulls /Dash-Industry-Forum/dash.js/pulls" itemprop="url">
<svg aria-hidden="true" class="octicon octicon-git-pull-request" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M11 11.28V5c-.03-.78-.34-1.47-.94-2.06C9.46 2.35 8.78 2.03 8 2H7V0L4 3l3 3V4h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28A1.993 1.993 0 0 0 10 15a1.993 1.993 0 0 0 1-3.72zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zM4 3c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v6.56A1.993 1.993 0 0 0 2 15a1.993 1.993 0 0 0 1-3.72V4.72c.59-.34 1-.98 1-1.72zm-.8 10c0 .66-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"></path></svg>
<span itemprop="name">Pull requests</span>
<span class="counter">3</span>
<meta itemprop="position" content="3">
</a> </span>
<a href="/Dash-Industry-Forum/dash.js/wiki" class="js-selected-navigation-item reponav-item" data-hotkey="g w" data-selected-links="repo_wiki /Dash-Industry-Forum/dash.js/wiki">
<svg aria-hidden="true" class="octicon octicon-book" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z"></path></svg>
Wiki
</a>
<a href="/Dash-Industry-Forum/dash.js/pulse" class="js-selected-navigation-item reponav-item" data-selected-links="pulse /Dash-Industry-Forum/dash.js/pulse">
<svg aria-hidden="true" class="octicon octicon-pulse" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M11.5 8L8.8 5.4 6.6 8.5 5.5 1.6 2.38 8H0v2h3.6l.9-1.8.9 5.4L9 8.5l1.6 1.5H14V8z"></path></svg>
Pulse
</a>
<a href="/Dash-Industry-Forum/dash.js/graphs" class="js-selected-navigation-item reponav-item" data-selected-links="repo_graphs repo_contributors /Dash-Industry-Forum/dash.js/graphs">
<svg aria-hidden="true" class="octicon octicon-graph" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M16 14v1H0V0h1v14h15zM5 13H3V8h2v5zm4 0H7V3h2v10zm4 0h-2V6h2v7z"></path></svg>
Graphs
</a>
</nav>
</div>
</div>
<div class="container new-discussion-timeline experiment-repo-nav">
<div class="repository-content">
<a href="/Dash-Industry-Forum/dash.js/blob/7a65bce3dc97c003dbe64012a7f567bb57c2f4b7/LICENSE.md" class="hidden js-permalink-shortcut" data-hotkey="y">Permalink</a>
<!-- blob contrib key: blob_contributors:v21:764190169e735619c08db6ec1167107a -->
<div class="file-navigation js-zeroclipboard-container">
<div class="select-menu branch-select-menu js-menu-container js-select-menu left">
<button class="btn btn-sm select-menu-button js-menu-target css-truncate" data-hotkey="w"
title="development"
type="button" aria-label="Switch branches or tags" tabindex="0" aria-haspopup="true">
<i>Branch:</i>
<span class="js-select-button css-truncate-target">development</span>
</button>
<div class="select-menu-modal-holder js-menu-content js-navigation-container" data-pjax aria-hidden="true">
<div class="select-menu-modal">
<div class="select-menu-header">
<svg aria-label="Close" class="octicon octicon-x js-menu-close" height="16" role="img" version="1.1" viewBox="0 0 12 16" width="12"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
<span class="select-menu-title">Switch branches/tags</span>
</div>
<div class="select-menu-filters">
<div class="select-menu-text-filter">
<input type="text" aria-label="Filter branches/tags" id="context-commitish-filter-field" class="form-control js-filterable-field js-navigation-enable" placeholder="Filter branches/tags">
</div>
<div class="select-menu-tabs">
<ul>
<li class="select-menu-tab">
<a href="#" data-tab-filter="branches" data-filter-placeholder="Filter branches/tags" class="js-select-menu-tab" role="tab">Branches</a>
</li>
<li class="select-menu-tab">
<a href="#" data-tab-filter="tags" data-filter-placeholder="Find a tag…" class="js-select-menu-tab" role="tab">Tags</a>
</li>
</ul>
</div>
</div>
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="branches" role="menu">
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/blob/Public_Release_v1.6.0/LICENSE.md"
data-name="Public_Release_v1.6.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text" title="Public_Release_v1.6.0">
Public_Release_v1.6.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open selected"
href="/Dash-Industry-Forum/dash.js/blob/development/LICENSE.md"
data-name="development"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text" title="development">
development
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/blob/gh-pages/LICENSE.md"
data-name="gh-pages"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text" title="gh-pages">
gh-pages
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/blob/master/LICENSE.md"
data-name="master"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text" title="master">
master
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/blob/revert-1387-fix-1362/LICENSE.md"
data-name="revert-1387-fix-1362"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text" title="revert-1387-fix-1362">
revert-1387-fix-1362
</span>
</a>
</div>
<div class="select-menu-no-results">Nothing to show</div>
</div>
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="tags">
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v2.2.0/LICENSE.md"
data-name="v2.2.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v2.2.0">
v2.2.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v2.1.1/LICENSE.md"
data-name="v2.1.1"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v2.1.1">
v2.1.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v2.1.0/LICENSE.md"
data-name="v2.1.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v2.1.0">
v2.1.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v2.0.0/LICENSE.md"
data-name="v2.0.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v2.0.0">
v2.0.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v1.6.0/LICENSE.md"
data-name="v1.6.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.6.0">
v1.6.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v1.5.1/LICENSE.md"
data-name="v1.5.1"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.5.1">
v1.5.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v1.5.0/LICENSE.md"
data-name="v1.5.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.5.0">
v1.5.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v1.4/LICENSE.md"
data-name="v1.4"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.4">
v1.4
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v1.3.0/LICENSE.md"
data-name="v1.3.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.3.0">
v1.3.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v1.2.0/LICENSE.md"
data-name="v1.2.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.2.0">
v1.2.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v1.1.2/LICENSE.md"
data-name="v1.1.2"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.1.2">
v1.1.2
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/v0.2.4/LICENSE.md"
data-name="v0.2.4"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v0.2.4">
v0.2.4
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/V0.1/LICENSE.md"
data-name="V0.1"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="V0.1">
V0.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/1.0.0/LICENSE.md"
data-name="1.0.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="1.0.0">
1.0.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/Dash-Industry-Forum/dash.js/tree/0.2.5/LICENSE.md"
data-name="0.2.5"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="0.2.5">
0.2.5
</span>
</a>
</div>
<div class="select-menu-no-results">Nothing to show</div>
</div>
</div>
</div>
</div>
<div class="btn-group right">
<a href="/Dash-Industry-Forum/dash.js/find/development"
class="js-pjax-capture-input btn btn-sm"
data-pjax
data-hotkey="t">
Find file
</a>
<button aria-label="Copy file path to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button">Copy path</button>
</div>
<div class="breadcrumb js-zeroclipboard-target">
<span class="repo-root js-repo-root"><span class="js-path-segment"><a href="/Dash-Industry-Forum/dash.js"><span>dash.js</span></a></span></span><span class="separator">/</span><strong class="final-path">LICENSE.md</strong>
</div>
</div>
<div class="commit-tease">
<span class="right">
<a class="commit-tease-sha" href="/Dash-Industry-Forum/dash.js/commit/e01ae7f9363253c2d29d8d636c92c338bd1c450b" data-pjax>
e01ae7f
</a>
<relative-time datetime="2015-01-20T19:38:53Z">Jan 20, 2015</relative-time>
</span>
<div>
<img alt="@AkamaiDASH" class="avatar" height="20" src="https://avatars0.githubusercontent.com/u/7864462?v=3&amp;s=40" width="20" />
<a href="/AkamaiDASH" class="user-mention" rel="contributor">AkamaiDASH</a>
<a href="/Dash-Industry-Forum/dash.js/commit/e01ae7f9363253c2d29d8d636c92c338bd1c450b" class="message" data-pjax="true" title="modified license.md">modified license.md</a>
</div>
<div class="commit-tease-contributors">
<button type="button" class="btn-link muted-link contributors-toggle" data-facebox="#blob_contributors_box">
<strong>1</strong>
contributor
</button>
</div>
<div id="blob_contributors_box" style="display:none">
<h2 class="facebox-header" data-facebox-id="facebox-header">Users who have contributed to this file</h2>
<ul class="facebox-user-list" data-facebox-id="facebox-description">
<li class="facebox-user-list-item">
<img alt="@AkamaiDASH" height="24" src="https://avatars2.githubusercontent.com/u/7864462?v=3&amp;s=48" width="24" />
<a href="/AkamaiDASH">AkamaiDASH</a>
</li>
</ul>
</div>
</div>
<div class="file">
<div class="file-header">
<div class="file-actions">
<div class="btn-group">
<a href="/Dash-Industry-Forum/dash.js/raw/development/LICENSE.md" class="btn btn-sm " id="raw-url">Raw</a>
<a href="/Dash-Industry-Forum/dash.js/blame/development/LICENSE.md" class="btn btn-sm js-update-url-with-hash">Blame</a>
<a href="/Dash-Industry-Forum/dash.js/commits/development/LICENSE.md" class="btn btn-sm " rel="nofollow">History</a>
</div>
<!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/Dash-Industry-Forum/dash.js/edit/development/LICENSE.md" class="inline-form js-update-url-with-hash" data-form-nonce="e31b8b36558bb93709d07c04a8282c2434e31128" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="rQy0aX/nhsMc/AQdK4Yc2vaT+cM+NWUCjNBPQkgI/D9N30aZ8bC02XdjhGWmRtcbGYw21KgsASThCoRWvhYdPg==" /></div>
<button class="btn-octicon tooltipped tooltipped-nw" type="submit"
aria-label="Fork this project and edit the file" data-hotkey="e" data-disable-with>
<svg aria-hidden="true" class="octicon octicon-pencil" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M0 12v3h3l8-8-3-3-8 8zm3 2H1v-2h1v1h1v1zm10.3-9.3L12 6 9 3l1.3-1.3a.996.996 0 0 1 1.41 0l1.59 1.59c.39.39.39 1.02 0 1.41z"></path></svg>
</button>
</form> <!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/Dash-Industry-Forum/dash.js/delete/development/LICENSE.md" class="inline-form" data-form-nonce="e31b8b36558bb93709d07c04a8282c2434e31128" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="pxfnBgN4PKYQqT0ZX3hy9FUxDAvLC4d4dNerfRk0zPIdAb0beNMQpFuhdlLBqhrdHMSy9IYnQmg02N0MSVigtg==" /></div>
<button class="btn-octicon btn-octicon-danger tooltipped tooltipped-nw" type="submit"
aria-label="Fork this project and delete the file" data-disable-with>
<svg aria-hidden="true" class="octicon octicon-trashcan" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M11 2H9c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1H2c-.55 0-1 .45-1 1v1c0 .55.45 1 1 1v9c0 .55.45 1 1 1h7c.55 0 1-.45 1-1V5c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm-1 12H3V5h1v8h1V5h1v8h1V5h1v8h1V5h1v9zm1-10H2V3h9v1z"></path></svg>
</button>
</form> </div>
<div class="file-info">
14 lines (9 sloc)
<span class="file-info-divider"></span>
1.74 KB
</div>
</div>
<div id="readme" class="readme blob instapaper_body">
<article class="markdown-body entry-content" itemprop="text"><h1><a id="user-content-dashjs-bsd-license-agreement" class="anchor" href="#dashjs-bsd-license-agreement" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>dash.js BSD License Agreement</h1>
<p>The copyright in this software is being made available under the BSD License, included below. This software may be subject to other third party and contributor rights, including patent rights, and no such rights are granted under this license.</p>
<p><strong>Copyright (c) 2015, Dash Industry Forum.
**All rights reserved.</strong></p>
<ul>
<li>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</li>
<li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li>
<li>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</li>
<li>Neither the name of the Dash Industry Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.</li>
</ul>
<p><strong>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</strong></p>
</article>
</div>
</div>
<button type="button" data-facebox="#jump-to-line" data-facebox-class="linejump" data-hotkey="l" class="hidden">Jump to Line</button>
<div id="jump-to-line" style="display:none">
<!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="" class="js-jump-to-line-form" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
<input class="form-control linejump-input js-jump-to-line-field" type="text" placeholder="Jump to line&hellip;" aria-label="Jump to line" autofocus>
<button type="submit" class="btn">Go</button>
</form></div>
</div>
<div class="modal-backdrop js-touch-events"></div>
</div>
</div>
</div>
</div>
<div class="container site-footer-container">
<div class="site-footer" role="contentinfo">
<ul class="site-footer-links right">
<li><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
<li><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
<li><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
<li><a href="https://shop.github.com" data-ga-click="Footer, go to shop, text:shop">Shop</a></li>
<li><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
<li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li>
</ul>
<a href="https://github.com" aria-label="Homepage" class="site-footer-mark" title="GitHub">
<svg aria-hidden="true" class="octicon octicon-mark-github" height="24" version="1.1" viewBox="0 0 16 16" width="24"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg>
</a>
<ul class="site-footer-links">
<li>&copy; 2016 <span title="0.12132s from github-fe157-cp1-prd.iad.github.net">GitHub</span>, Inc.</li>
<li><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li>
<li><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li>
<li><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li>
<li><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact</a></li>
<li><a href="https://help.github.com" data-ga-click="Footer, go to help, text:help">Help</a></li>
</ul>
</div>
</div>
<div id="ajax-error-message" class="ajax-error-message flash flash-error">
<svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"></path></svg>
<button type="button" class="flash-close js-flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
<svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
</button>
Something went wrong with that request. Please try again.
</div>
<script crossorigin="anonymous" integrity="sha256-FJ2TOMJmUXKHCCXHj6SP3MpNQx0GfL9f2nEg2eOcxzg=" src="https://assets-cdn.github.com/assets/frameworks-149d9338c2665172870825c78fa48fdcca4d431d067cbf5fda7120d9e39cc738.js"></script>
<script async="async" crossorigin="anonymous" integrity="sha256-EJ2vSkBO5DsxbJTLsCXdXDkJkOrMOx2AfsbhFQA5rwI=" src="https://assets-cdn.github.com/assets/github-109daf4a404ee43b316c94cbb025dd5c390990eacc3b1d807ec6e1150039af02.js"></script>
<div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner hidden">
<svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"></path></svg>
<span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
<span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
</div>
<div class="facebox" id="facebox" style="display:none;">
<div class="facebox-popup">
<div class="facebox-content" role="dialog" aria-labelledby="facebox-header" aria-describedby="facebox-description">
</div>
<button type="button" class="facebox-close js-facebox-close" aria-label="Close modal">
<svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
</button>
</div>
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
mistplayers.dashjs = {
name: 'Dash.js Player',
version: '1.1',
version: '1.2',
mimes: ['dash/video/mp4'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
@ -8,7 +8,7 @@ mistplayers.dashjs = {
},
isBrowserSupported: function (mimetype,source,options) {
if ((options.host.substr(0,7) == 'http://') && (source.url.substr(0,8) == 'https://')) { return false; }
return (('dashjs' in window) && ('MediaSource' in window) && (location.protocol != 'file:'));
return (('MediaSource' in window) && (location.protocol != 'file:'));
},
player: function(){}
};
@ -19,93 +19,113 @@ p.prototype.build = function (options,callback) {
cont.className = 'mistplayer';
var me = this;
var ele = this.getElement('video');
ele.className = '';
cont.appendChild(ele);
ele.width = options.width;
ele.height = options.height;
if (options.autoplay) {
ele.setAttribute('autoplay','');
}
if (options.loop) {
ele.setAttribute('loop','');
}
if (options.poster) {
ele.setAttribute('poster',options.poster);
}
if (options.controls) {
if (options.controls == 'stock') {
ele.setAttribute('controls','');
function onplayerload () {
var ele = me.getElement('video');
ele.className = '';
cont.appendChild(ele);
ele.width = options.width;
ele.height = options.height;
if (options.autoplay) {
ele.setAttribute('autoplay','');
}
else {
this.buildMistControls();
if (options.loop) {
ele.setAttribute('loop','');
}
}
ele.addEventListener('error',function(e){
var msg;
if ('message' in e) {
msg = e.message;
if (options.poster) {
ele.setAttribute('poster',options.poster);
}
else {
msg = 'readyState: ';
switch (me.element.readyState) {
case 0:
msg += 'HAVE_NOTHING';
break;
case 1:
msg += 'HAVE_METADATA';
break;
case 2:
msg += 'HAVE_CURRENT_DATA';
break;
case 3:
msg += 'HAVE_FUTURE_DATA';
break;
case 4:
msg += 'HAVE_ENOUGH_DATA';
break;
if (options.controls) {
if (options.controls == 'stock') {
ele.setAttribute('controls','');
}
msg += ' networkState: ';
switch (me.element.networkState) {
case 0:
msg += 'NETWORK_EMPTY';
break;
case 1:
msg += 'NETWORK_IDLE';
break;
case 2:
msg += 'NETWORK_LOADING';
break;
case 3:
msg += 'NETWORK_NO_SOURCE';
break;
else {
me.buildMistControls();
}
}
//prevent onerror loops
if (e.target == me.element) {
e.message = msg;
}
else {
me.adderror(msg);
}
});
var events = ['abort','canplay','canplaythrough','durationchange','emptied','ended','interruptbegin','interruptend','loadeddata','loadedmetadata','loadstart','pause','play','playing','ratechange','seeked','seeking','stalled','volumechange','waiting'];
for (var i in events) {
ele.addEventListener(events[i],function(e){
me.addlog('Player event fired: '+e.type);
ele.addEventListener('error',function(e){
var msg;
if ('message' in e) {
msg = e.message;
}
else {
msg = 'readyState: ';
switch (me.element.readyState) {
case 0:
msg += 'HAVE_NOTHING';
break;
case 1:
msg += 'HAVE_METADATA';
break;
case 2:
msg += 'HAVE_CURRENT_DATA';
break;
case 3:
msg += 'HAVE_FUTURE_DATA';
break;
case 4:
msg += 'HAVE_ENOUGH_DATA';
break;
}
msg += ' networkState: ';
switch (me.element.networkState) {
case 0:
msg += 'NETWORK_EMPTY';
break;
case 1:
msg += 'NETWORK_IDLE';
break;
case 2:
msg += 'NETWORK_LOADING';
break;
case 3:
msg += 'NETWORK_NO_SOURCE';
break;
}
}
//prevent onerror loops
if (e.target == me.element) {
e.message = msg;
}
else {
me.adderror(msg);
}
});
var events = ['abort','canplay','canplaythrough','durationchange','emptied','ended','interruptbegin','interruptend','loadeddata','loadedmetadata','loadstart','pause','play','playing','ratechange','seeked','seeking','stalled','volumechange','waiting'];
for (var i in events) {
ele.addEventListener(events[i],function(e){
me.addlog('Player event fired: '+e.type);
});
}
var player = dashjs.MediaPlayer().create();
player.getDebug().setLogToBrowserConsole(false);
player.initialize(ele,options.src,true);
me.dash = player;
me.src = options.src;
me.addlog('Built html');
callback(cont);
}
var player = dashjs.MediaPlayer().create();
player.getDebug().setLogToBrowserConsole(false);
player.initialize(ele,options.src,true);
this.dash = player;
this.src = options.src;
this.addlog('Built html');
return cont;
if ('dash' in window) {
onplayerload();
}
else {
//load the dashjs player
var scripttag = document.createElement('script');
scripttag.src = options.host+'/dashjs.js';
me.addlog('Retrieving dashjs player code from '+scripttag.src);
document.head.appendChild(scripttag);
scripttag.onerror = function(){
me.askNextCombo('Failed to load dashjs.js');
}
scripttag.onload = function(){
onplayerload();
}
}
}
p.prototype.play = function(){ return this.element.play(); };
p.prototype.pause = function(){ return this.element.pause(); };

View file

@ -1,6 +1,6 @@
mistplayers.flash_strobe = {
name: 'Strobe Flash Media Playback',
version: '1.0',
version: '1.1',
mimes: ['flash/10','flash/11','flash/7'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
@ -28,7 +28,7 @@ mistplayers.flash_strobe = {
};
var p = mistplayers.flash_strobe.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options) {
p.prototype.build = function (options,callback) {
function createParam(name,value) {
var p = document.createElement('param');
p.setAttribute('name',name);
@ -62,5 +62,5 @@ p.prototype.build = function (options) {
this.addlog('Built html');
return ele;
callback(ele);
}

View file

@ -1,6 +1,6 @@
mistplayers.html5 = {
name: 'HTML5 video player',
version: '1.0',
version: '1.1',
mimes: ['html5/application/vnd.apple.mpegurl','html5/video/mp4','html5/video/ogg','html5/video/webm','html5/audio/mp3','html5/audio/webm','html5/audio/ogg','html5/audio/wav'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
@ -32,7 +32,7 @@ mistplayers.html5 = {
};
var p = mistplayers.html5.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options) {
p.prototype.build = function (options,callback) {
var cont = document.createElement('div');
cont.className = 'mistplayer';
var me = this; //to allow nested functions to access the player class itself
@ -174,7 +174,7 @@ p.prototype.build = function (options) {
me.addlog('Player event fired: '+e.type);
});
}
return cont;
callback(cont);
}
p.prototype.play = function(){ return this.element.play(); };
p.prototype.pause = function(){ return this.element.pause(); };

View file

@ -1,6 +1,6 @@
mistplayers.img = {
name: 'HTML img tag',
version: '1.0',
version: '1.1',
mimes: ['html5/image/jpeg'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
@ -15,9 +15,9 @@ mistplayers.img = {
};
var p = mistplayers.img.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options) {
p.prototype.build = function (options,callback) {
var ele = this.getElement('img');
ele.src = options.src;
ele.style.display = 'block';
return ele;
callback(ele);
}

View file

@ -1,6 +1,6 @@
mistplayers.jwplayer = {
name: 'JWPlayer',
version: '0.1',
version: '0.2',
mimes: ['html5/video/mp4','html5/video/webm','dash/video/mp4','flash/10','flash/7','html5/application/vnd.apple.mpegurl','html5/audio/mp3','html5/audio/aac'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
@ -17,7 +17,7 @@ mistplayers.jwplayer = {
};
var p = mistplayers.jwplayer.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options) {
p.prototype.build = function (options,callback) {
var ele = this.getElement('div');
this.jw = jwplayer(ele).setup({
@ -30,7 +30,7 @@ p.prototype.build = function (options) {
});
this.addlog('Built html');
return ele;
callback(ele);
}
p.prototype.play = function(){ return this.jw.play(); };
p.prototype.pause = function(){ return this.jw.pause(); };

View file

@ -1,6 +1,6 @@
mistplayers.polytrope = {
name: 'Polytrope Flash Player',
version: '0.1',
version: '0.2',
mimes: ['flash/11','flash/10','flash/7'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
@ -27,7 +27,7 @@ mistplayers.polytrope = {
};
var p = mistplayers.polytrope.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options) {
p.prototype.build = function (options,callback) {
function createParam(name,value) {
var p = document.createElement('param');
p.setAttribute('name',name);
@ -97,5 +97,5 @@ p.prototype.build = function (options) {
ele.innerHTML = '<param name="wmode" value="opaque"> <param name="menu" value="false"> <param name="allowFullScreen" value="true"> <param name="allowFullScreenInteractive" value="true"> <param name="allowScriptAccess" value="always"> <param name="expressInstall" value="/shared/swf/expressInstall.swf"> <param name="flashvars" value="rtmp_url=rtmp://www.stickystage.com/play/&amp;stream_name=stickystage_archive+SrA-2016.07.08.23.54.08&amp;poster=http://stickystage.com/stickystage/users/SrA/archive/SrA-2016.07.08.23.54.08.jpg&amp;autoplay=true&amp;color_1=0x1d1d1d&amp;color_2=0xffffff&amp;buffer_time=0.1&amp;is_streaming_url=/api/user/is_streaming&amp;username=SrA&amp;mode=archive&amp;guid=4dc64c18-59af-91a2-d0c5-ab8df4f45c65"> <param name="movie" value="players/polytrope.swf">';
this.addlog('Built html');
return ele;
callback(ele);
}

View file

@ -1,6 +1,6 @@
mistplayers.silverlight = {
name: 'Silverlight',
version: '1.0',
version: '1.1',
mimes: ['silverlight'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
@ -25,7 +25,7 @@ mistplayers.silverlight = {
};
var p = mistplayers.silverlight.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options) {
p.prototype.build = function (options,callback) {
function createParam(name,value) {
var p = document.createElement('param');
p.setAttribute('name',name);
@ -52,5 +52,5 @@ p.prototype.build = function (options) {
img.setAttribute('style','border-style: none;')
this.addlog('Built html');
return ele;
callback(ele);
}

View file

@ -14,11 +14,11 @@ mistplayers.myplayer = {
};
var p = mistplayers.myplayer.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options) {
p.prototype.build = function (options,callback) {
var ele = this.element('object');
//TODO your code here
this.addlog('Built html');
return ele;
callback(ele);
}

View file

@ -1,6 +1,6 @@
mistplayers.theoplayer = {
name: 'TheoPlayer',
version: '0.1',
version: '0.2',
mimes: ['html5/application/vnd.apple.mpegurl','dash/video/mp4'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
@ -17,7 +17,7 @@ mistplayers.theoplayer = {
};
var p = mistplayers.theoplayer.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options) {
p.prototype.build = function (options,callback) {
var ele = this.getElement('video');
ele.src = options.src;
@ -40,7 +40,7 @@ p.prototype.build = function (options) {
this.theoplayer = theoplayer(ele);
this.addlog('Built html');
return ele;
callback(ele);
}
p.prototype.play = function(){ return this.theoplayer.play(); };
p.prototype.pause = function(){ return this.theoplayer.pause(); };

View file

@ -1,6 +1,6 @@
mistplayers.videojs = {
name: 'VideoJS player',
version: '1.0',
version: '1.1',
mimes: ['html5/video/mp4','html5/application/vnd.apple.mpegurl','html5/video/ogg','html5/video/webm'],
priority: Object.keys(mistplayers).length + 1,
isMimeSupported: function (mimetype) {
@ -22,12 +22,21 @@ mistplayers.videojs = {
//dont use HLS if there is an MP3 audio track, unless we're on apple or edge
if ((mimetype == 'html5/application/vnd.apple.mpegurl') && (['iPad','iPhone','iPod','MacIntel'].indexOf(navigator.platform) == -1) && (navigator.userAgent.indexOf('Edge') == -1)) {
var audio = false;
var nonmp3 = false;
for (var i in streaminfo.meta.tracks) {
var t = streaminfo.meta.tracks[i];
if (t.codec == 'MP3') {
return false;
if (t.type == 'audio') {
audio = true;
if (t.codec != 'MP3') {
nonmp3 = true;
}
}
}
if ((audio) && (!nonmp3)) {
if (logfunc) { logfunc('This source has audio, but only MP3, and this browser can\'t play MP3 via HLS'); }
return false;
}
}
@ -37,118 +46,139 @@ mistplayers.videojs = {
};
var p = mistplayers.videojs.player;
p.prototype = new MistPlayer();
p.prototype.build = function (options) {
var cont = document.createElement('div');
cont.className = 'mistplayer';
p.prototype.build = function (options,callback) {
var me = this; //to allow nested functions to access the player class itself
this.addlog('Building VideoJS player..');
var ele = this.getElement('video');
cont.appendChild(ele);
ele.className = '';
ele.crossOrigin = 'anonymous'; //required for subtitles
var shortmime = options.source.type.split('/');
shortmime.shift();
var source = document.createElement('source');
source.setAttribute('src',options.src);
this.source = source;
ele.appendChild(source);
source.type = shortmime.join('/');
this.addlog('Adding '+source.type+' source @ '+options.src);
if (source.type == 'application/vnd.apple.mpegurl') { source.type = 'application/x-mpegURL'; }
ele.className += ' video-js';
ele.width = options.width;
ele.height = options.height;
ele.style.width = options.width+'px';
ele.style.height = options.height+'px';
var vjsopts = {
preload: 'auto'
};
if (options.autoplay) { vjsopts.autoplay = true; }
if (options.loop) {
vjsopts.loop = true;
ele.loop = true;
}
if (options.poster) { vjsopts.poster = options.poster; }
if (options.controls) {
if ((options.controls == 'stock') || (!this.buildMistControls())) {
//MistControls have failed to build in the if condition
ele.setAttribute('controls',true);
function onplayerload () {
me.addlog('Building VideoJS player..');
var cont = document.createElement('div');
cont.className = 'mistplayer';
var ele = me.getElement('video');
cont.appendChild(ele);
ele.className = '';
ele.crossOrigin = 'anonymous'; //required for subtitles
var shortmime = options.source.type.split('/');
shortmime.shift();
var source = document.createElement('source');
source.setAttribute('src',options.src);
me.source = source;
ele.appendChild(source);
source.type = shortmime.join('/');
me.addlog('Adding '+source.type+' source @ '+options.src);
if (source.type == 'application/vnd.apple.mpegurl') { source.type = 'application/x-mpegURL'; }
ele.className += ' video-js';
ele.width = options.width;
ele.height = options.height;
ele.style.width = options.width+'px';
ele.style.height = options.height+'px';
var vjsopts = {
preload: 'auto'
};
if (options.autoplay) { vjsopts.autoplay = true; }
if (options.loop) {
vjsopts.loop = true;
ele.loop = true;
}
}
me.onready(function(){
me.videojs = videojs(ele,vjsopts,function(){
me.addlog('Videojs initialized');
});
});
this.addlog('Built html');
//forward events
ele.addEventListener('error',function(e){
var msg;
if ('message' in e) {
msg = e.message;
}
else {
msg = 'readyState: ';
switch (me.element.readyState) {
case 0:
msg += 'HAVE_NOTHING';
break;
case 1:
msg += 'HAVE_METADATA';
break;
case 2:
msg += 'HAVE_CURRENT_DATA';
break;
case 3:
msg += 'HAVE_FUTURE_DATA';
break;
case 4:
msg += 'HAVE_ENOUGH_DATA';
break;
}
msg += ' networkState: ';
switch (me.element.networkState) {
case 0:
msg += 'NETWORK_EMPTY';
break;
case 1:
msg += 'NETWORK_IDLE';
break;
case 2:
msg += 'NETWORK_LOADING';
break;
case 3:
msg += 'NETWORK_NO_SOURCE';
break;
if (options.poster) { vjsopts.poster = options.poster; }
if (options.controls) {
if ((options.controls == 'stock') || (!me.buildMistControls())) {
//MistControls have failed to build in the if condition
ele.setAttribute('controls',true);
}
}
//prevent onerror loops
if (e.target == me.element) {
e.message = msg;
}
else {
me.adderror(msg);
}
});
var events = ['abort','canplay','canplaythrough','durationchange','emptied','ended','interruptbegin','interruptend','loadeddata','loadedmetadata','loadstart','pause','play','playing','ratechange','seeked','seeking','stalled','volumechange','waiting','progress'];
for (var i in events) {
ele.addEventListener(events[i],function(e){
me.addlog('Player event fired: '+e.type);
me.onready(function(){
me.videojs = videojs(ele,vjsopts,function(){
me.addlog('Videojs initialized');
});
});
me.addlog('Built html');
//forward events
ele.addEventListener('error',function(e){
var msg;
if ('message' in e) {
msg = e.message;
}
else {
msg = 'readyState: ';
switch (me.element.readyState) {
case 0:
msg += 'HAVE_NOTHING';
break;
case 1:
msg += 'HAVE_METADATA';
break;
case 2:
msg += 'HAVE_CURRENT_DATA';
break;
case 3:
msg += 'HAVE_FUTURE_DATA';
break;
case 4:
msg += 'HAVE_ENOUGH_DATA';
break;
}
msg += ' networkState: ';
switch (me.element.networkState) {
case 0:
msg += 'NETWORK_EMPTY';
break;
case 1:
msg += 'NETWORK_IDLE';
break;
case 2:
msg += 'NETWORK_LOADING';
break;
case 3:
msg += 'NETWORK_NO_SOURCE';
break;
}
}
//prevent onerror loops
if (e.target == me.element) {
e.message = msg;
}
else {
me.adderror(msg);
}
});
var events = ['abort','canplay','canplaythrough','durationchange','emptied','ended','interruptbegin','interruptend','loadeddata','loadedmetadata','loadstart','pause','play','playing','ratechange','seeked','seeking','stalled','volumechange','waiting','progress'];
for (var i in events) {
ele.addEventListener(events[i],function(e){
me.addlog('Player event fired: '+e.type);
});
}
callback(cont);
}
return cont;
if ('videojs' in window) {
onplayerload();
}
else {
//load the videojs player
var scripttag = document.createElement('script');
scripttag.src = options.host+'/videojs.js';
me.addlog('Retrieving videojs player code from '+scripttag.src);
document.head.appendChild(scripttag);
scripttag.onerror = function(){
me.askNextCombo('Failed to load videojs.js');
}
scripttag.onload = function(){
onplayerload();
}
}
}
p.prototype.play = function(){ return this.element.play(); };
p.prototype.pause = function(){ return this.element.pause(); };
@ -177,13 +207,16 @@ if (document.fullscreenEnabled || document.webkitFullscreenEnabled || document.m
};
}
p.prototype.updateSrc = function(src){
if (src == '') {
this.videojs.dispose();
return;
if (videojs in this) {
if (src == '') {
this.videojs.dispose();
return;
}
this.videojs.src({
src: src,
type: this.source.type
});
return true;
}
this.videojs.src({
src: src,
type: this.source.type
});
return true;
return false;
};

View file

@ -74,6 +74,8 @@ namespace Mist {
capa["url_match"].append("/json_$.js");
capa["url_match"].append("/player.js");
capa["url_match"].append("/player.css");
capa["url_match"].append("/videojs.js");
capa["url_match"].append("/dashjs.js");
capa["url_match"].append("/embed_$.js");
capa["url_match"].append("/flashplayer.swf");
capa["url_match"].append("/oldflashplayer.swf");
@ -565,15 +567,11 @@ namespace Mist {
used = true;
}
if (it->asStringRef() == "dashjs"){
#include "playerdash.js.h"
response.append((char*)playerdash_js, (size_t)playerdash_js_len);
#include "dashjs.js.h"
response.append((char*)dash_js, (size_t)dash_js_len);
used = true;
}
if (it->asStringRef() == "videojs"){
#include "playervideo.js.h"
response.append((char*)playervideo_js, (size_t)playervideo_js_len);
#include "videojs.js.h"
response.append((char*)video_js, (size_t)video_js_len);
used = true;
@ -610,6 +608,50 @@ namespace Mist {
#include "mist.css.h"
response.append((char*)mist_css, (size_t)mist_css_len);
H.SetBody(response);
H.SendResponse("200", "OK", myConn);
H.Clean();
return;
}
if (H.url == "/videojs.js"){
std::string response;
H.Clean();
H.SetHeader("Server", "MistServer/" PACKAGE_VERSION);
H.setCORSHeaders();
H.SetHeader("Content-Type", "application/javascript");
if (method == "OPTIONS" || method == "HEAD"){
H.SendResponse("200", "OK", myConn);
H.Clean();
return;
}
#include "playervideo.js.h"
response.append((char*)playervideo_js, (size_t)playervideo_js_len);
#include "playerhlsvideo.js.h"
response.append((char*)playerhlsvideo_js, (size_t)playerhlsvideo_js_len);
H.SetBody(response);
H.SendResponse("200", "OK", myConn);
H.Clean();
return;
}
if (H.url == "/dashjs.js"){
std::string response;
H.Clean();
H.SetHeader("Server", "MistServer/" PACKAGE_VERSION);
H.setCORSHeaders();
H.SetHeader("Content-Type", "application/javascript");
if (method == "OPTIONS" || method == "HEAD"){
H.SendResponse("200", "OK", myConn);
H.Clean();
return;
}
#include "playerdashlic.js.h"
response.append((char*)playerdashlic_js, (size_t)playerdashlic_js_len);
#include "playerdash.js.h"
response.append((char*)playerdash_js, (size_t)playerdash_js_len);
H.SetBody(response);
H.SendResponse("200", "OK", myConn);
H.Clean();