Skip to content

Commit

Permalink
Version 233:
Browse files Browse the repository at this point in the history
* Automatic H.264 player selection logic should no longer choose HTML5 on iOS 16.4 or newer.  Current behavior is to try the HTML5 player again when iOS 17 comes out.
  • Loading branch information
bp2008 committed Apr 15, 2023
1 parent 1b72eec commit fdf9b8f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui3.htm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
};
</script>
<script type="text/javascript">
var ui_version = "232";
var ui_version = "233";
var bi_version = "%%VERSION%%";
var appPath_raw = "%%VIRTDIR%%";
var local_bi_session = "%%SESSION%%";
Expand Down
22 changes: 21 additions & 1 deletion ui3/ui3.js
Original file line number Diff line number Diff line change
Expand Up @@ -15565,7 +15565,8 @@ function FetchH264VideoModule()
{
// This is the automatic player selection algorithm:
var isAndroidFF = BrowserIsAndroid() && BrowserIsFirefox();
if (mse_mp4_h264_supported && !isAndroidFF)
var isIOS16_4_ornewer = GetIOSVersion()[0] === 16 && GetIOSVersion()[1] >= 4;
if (mse_mp4_h264_supported && !isAndroidFF && !isIOS16_4_ornewer)
{
isInitialized = false;
Initialize(H264PlayerOptions.HTML5);
Expand Down Expand Up @@ -33336,6 +33337,25 @@ function BrowserIsIOSChrome()
{
return BrowserIsIOS() && !!navigator.userAgent.match(/ Safari\//) && !!navigator.userAgent.match(/ CriOS\//);
}
/**
* Returns an array of 3 integers indicating the iOS version (e.g. [16, 4, 1] or [0, 0, 0] if not positively identified as iOS).
*/
function GetIOSVersion()
{
if (BrowserIsIOS())
{
try
{
var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
return [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
}
catch (ex)
{
console.error("GetIOSVersion() failed to identify iOS version. Method will return [0,0,0].", ex);
}
}
return [0, 0, 0];
}
function BrowserIsAndroid()
{
return !!navigator.userAgent.match(/ Android /) || !!navigator.userAgent.match(/\(Android \d+;/);
Expand Down

0 comments on commit fdf9b8f

Please sign in to comment.