Skip to content

Commit

Permalink
Version 41:
Browse files Browse the repository at this point in the history
* Fixed demuxer error that could occur in Chrome when switching between video streams rapidly and using the HTML5 video player.
* Added ui3/licenses.txt file, providing a list of code libraries and their licenses.
* Misc bugfixes.
  • Loading branch information
bp2008 committed Jul 11, 2018
1 parent bb33f60 commit 879ae7c
Show file tree
Hide file tree
Showing 4 changed files with 196 additions and 23 deletions.
2 changes: 1 addition & 1 deletion ui3.htm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
};
</script>
<script type="text/javascript">
var ui_version = "40";
var ui_version = "41";
var bi_version = "%%VERSION%%";
var combined_version = ui_version + "-" + bi_version;
//if (!!navigator.userAgent.match(/ Android /))
Expand Down
1 change: 1 addition & 0 deletions ui3/libs-src/AVI.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// This class is a crude AVI encoder written for UI3. It requires the custom JavaScript "Queue" class to be defined.
// Available under the same license as UI3: GNU LESSER GENERAL PUBLIC LICENSE, Version 3
function AVIEncoder(videoFourCC, bi /* BitmapInfoHeader */, audioFourCC, wf /* WaveFormatEx header */)
{
var self = this;
Expand Down
163 changes: 163 additions & 0 deletions ui3/licenses.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
UI3 is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3

UI3 uses open-source code libraries, which may be available under different licenses found below:

Clappr
/*
Copyright (c) 2014, Globo.com Player authors. 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 Globo.com 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
OWNER 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.
*/

jQuery
/*!
* jQuery JavaScript Library v1.12.4
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2016-05-20T17:17Z
*/

jquery.cookie.js
/**
* jQuery Cookie plugin
*
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/

jquery.mousewheel.js
/*!
* jQuery Mousewheel 3.1.13
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*/

md5.js
http://www.myersdaily.org/joseph/javascript/md5-text.html

Dialog.js
/*
* Dialog - jQuery Plugin for creating simple dialog boxes
* MIT License - https://opensource.org/licenses/MIT
*/

toastr.min.js
The MIT License - https://github.com/CodeSeven/toastr/blob/master/LICENSE

jquery.contextmenu.js
(wdContextMenu) http://www.web-delicious.com/jquery-plugins/
GNU LESSER GENERAL PUBLIC LICENSE Version 3

zebra_datepicker.js
GNU LESSER GENERAL PUBLIC LICENSE Version 3

HistoryButtonOverride.js
public domain

jquery.customscroll.js
MIT License

point-in-polygon.js
/*
The MIT License (MIT)

Copyright (c) 2016 James Halliday

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

Object.keys polyfill
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys

jquery.longpress.js
Copyright (c) 2008-2013, Vaidik Kapoor (kapoor [*dot*] vaidik -[at]- gmail [*dot*] com)
MIT License - http://github.com/vaidik/jquery-longpress/

Queue.js
CC0 1.0 Universal
code.stephenmorley.org

WebGLCanvas.js
// Copyright (c) 2014 Sam Leitch. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//
// modified by Matthias Behrens (github.com/soliton4) for Broadway.js

clipboard.js
Licensed MIT © Zeno Rocha - https://zenorocha.github.io/clipboard.js

lightbox.min.js
MIT License - https://opensource.org/licenses/MIT

AVI.js
// Available under the same license as UI3: GNU LESSER GENERAL PUBLIC LICENSE, Version 3

jmuxer
The MIT License - https://github.com/samirkumardas/jmuxer/blob/master/LICENSE
53 changes: 31 additions & 22 deletions ui3/ui3.js
Original file line number Diff line number Diff line change
Expand Up @@ -11074,7 +11074,7 @@ function HTML5_MSE_Player($startingContainer, frameRendered, PlaybackReachedNatu
var onVideoError = function (e)
{
if (!inputRequiredOverlayIsActive)
playerErrorHandler(player.error.message);
playerErrorHandler(player.error.message + ": " + GetMediaErrorMessage(player.error.code));
}
var onPlayerPaused = function (e)
{
Expand Down Expand Up @@ -11131,7 +11131,8 @@ function HTML5_MSE_Player($startingContainer, frameRendered, PlaybackReachedNatu
}
this.Dispose = function ()
{
console.log("pnacl_player.Dispose()");
if (developerMode)
console.log("HTML5_MSE_Player.Dispose()");
var $parent = $("#videoElement_wrapper");
$parent.remove();
if (jmuxer)
Expand Down Expand Up @@ -11181,14 +11182,15 @@ function HTML5_MSE_Player($startingContainer, frameRendered, PlaybackReachedNatu
}
this.Flush = function ()
{
hasToldPlayerToPlay = false;
earlyFrames = new Queue();
mseReady = false;
if (jmuxer)
if (jmuxer && hasToldPlayerToPlay)
{
console.log("destroy jmuxer");
mseReady = false;
jmuxer.destroy();
jmuxer = null;
}
hasToldPlayerToPlay = false;
player.pause();
delayCompensation = new HTML5DelayCompensationHelper(player);
lastFrame = false;
Expand All @@ -11211,7 +11213,7 @@ function HTML5_MSE_Player($startingContainer, frameRendered, PlaybackReachedNatu
}
var StartPlayback = function ()
{
var playPromise = document.getElementById('html5MseVideoEle').play();
var playPromise = player.play();
if (playPromise && playPromise.catch)
playPromise.catch(function (ex)
{
Expand Down Expand Up @@ -11420,6 +11422,7 @@ function HTML5DelayCompensationHelper(player)
}
}
UpdateAggressionLevel();
setPlaybackRate(1);
}
///////////////////////////////////////////////////////////////
// Network Delay Calculator - An Imperfect Science ////////////
Expand Down Expand Up @@ -12260,21 +12263,7 @@ function BISoundEffect()
sb.Append("code ");
sb.Append(htmlEncode(error.code));
sb.Append(" (");
if (MediaError)
{
if (error.code == MediaError.MEDIA_ERR_ABORTED)
sb.Append("MEDIA_ERR_ABORTED");
else if (error.code == MediaError.MEDIA_ERR_NETWORK)
sb.Append("MEDIA_ERR_NETWORK");
else if (error.code == MediaError.MEDIA_ERR_DECODE)
sb.Append("MEDIA_ERR_DECODE");
else if (error.code == MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED)
sb.Append("MEDIA_ERR_SRC_NOT_SUPPORTED");
else
sb.Append("unknown error code");
}
else
sb.Append("unknown error code");
sb.Append(GetMediaErrorMessage(error.code));
sb.AppendLine(")");
sb.Append(htmlEncode(error.message));
}
Expand Down Expand Up @@ -16978,7 +16967,12 @@ function Toaster()
message = htmlEncode(message.message + ": " + message.stack);
}
else
bilog.info(type + " toast: ", message);
{
if (type === "error")
bilog.debug(type + " toast: ", message);
else
bilog.info(type + " toast: ", message);
}
var overrideOptions = {};

if (showTime)
Expand Down Expand Up @@ -20696,4 +20690,19 @@ function InsertSpacesInBinary(binaryString, maxLength)
output.push(binaryString[i]);
}
return output.join("");
}
function GetMediaErrorMessage(code)
{
if (MediaError)
{
if (code === MediaError.MEDIA_ERR_ABORTED)
return "MEDIA_ERR_ABORTED";
else if (code === MediaError.MEDIA_ERR_NETWORK)
return "MEDIA_ERR_NETWORK";
else if (code === MediaError.MEDIA_ERR_DECODE)
return "MEDIA_ERR_DECODE";
else if (code === MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED)
return "MEDIA_ERR_SRC_NOT_SUPPORTED";
}
return "unknown error code (" + code + ")";
}

0 comments on commit 879ae7c

Please sign in to comment.