Skip to content

Commit

Permalink
Merge pull request #86 from bitmovin/develop
Browse files Browse the repository at this point in the history
SOL 2888 - merging changes from DEV
  • Loading branch information
thomhs22 authored Apr 25, 2022
2 parents 188fe27 + 3216a92 commit 2670ff6
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 20 deletions.
29 changes: 20 additions & 9 deletions encoding/multi-codec-streaming/js/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,26 +290,34 @@ var getCodecImage = function (selectedCodec) {
}
};

var getBrowserImage = function (selectedBrowser) {
function getBrowserImage(selectedBrowser) {
switch (selectedBrowser) {
case BROWSER.CHROME:
return '<i class="fa fa-chrome browser-icon" aria-hidden="true"></i>';
return '<i class="fa-brands fa-chrome" aria-hidden="true"></i>';
case BROWSER.EDGE:
return '<i class="fa fa-edge browser-icon" aria-hidden="true"></i>';
return '<i class="fa-brands fa-edge" aria-hidden="true"></i>';
case BROWSER.FIREFOX:
return '<i class="fa fa-firefox browser-icon" aria-hidden="true"></i>';
return '<i class="fa-brands fa-firefox" aria-hidden="true"></i>';
case BROWSER.IE:
return '<i class="fa fa-internet-explorer browser-icon" aria-hidden="true"></i>';
return '<i class="fa-brands fa-internet-explorer" aria-hidden="true"></i>';
case BROWSER.OPERA:
return '<i class="fa fa-opera browser-icon" aria-hidden="true"></i>';
return '<i class="fa-brands fa-opera" aria-hidden="true"></i>';
case BROWSER.SAFARI:
return '<i class="fa fa-safari browser-icon" aria-hidden="true"></i>';
return '<i class="fa-brands fa-safari" aria-hidden="true"></i>';
case BROWSER.UNKNOWN:
default:
return '<i class="fa fa-question browser-icon" aria-hidden="true"></i>';
return '<i class="fa-solid fa-circle-question" aria-hidden="true"></i>';
}
};

function isTypeSupported(mimeType)
{
if ('MediaSource' in window && MediaSource.isTypeSupported(mimeType)) {
return true;
}
return false;
}

function digitToTime(digit) {
var minutes = Math.floor(digit / 60);
var seconds = digit - (minutes * 60);
Expand Down Expand Up @@ -515,9 +523,12 @@ var multicodec = function () {
if (browser === BROWSER.CHROME || browser === BROWSER.FIREFOX) {
selectedCodec = CODEC.VP9;
source.dash = '//bitmovin-a.akamaihd.net/webpages/demos/content/multi-codec/vp9/stream.mpd';
} else if (browser === BROWSER.EDGE) {
} else if (browser === BROWSER.EDGE && isTypeSupported('video/mp4; codecs="hvc1"')) {
selectedCodec = CODEC.H265;
source.dash = '//bitmovin-a.akamaihd.net/webpages/demos/content/multi-codec/hevc/stream.mpd';
} else if (browser === BROWSER.EDGE && !isTypeSupported('video/mp4; codecs="hvc1"')) {
selectedCodec = CODEC.VP9;
source.dash = '//bitmovin-a.akamaihd.net/webpages/demos/content/multi-codec/vp9/stream.mpd';
} else if (browser === BROWSER.SAFARI) {
selectedCodec = CODEC.H265;
source.hls = '//bitmovin-a.akamaihd.net/webpages/demos/content/multi-codec/hevc/stream_fmp4.m3u8';
Expand Down
4 changes: 2 additions & 2 deletions player/drm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h4 class="sdk-wrapper-title">Try our SDKs</h4>
<div style="padding-bottom: 6px;">iOS/tvOS SDK</div>
<a target="_blank" onclick="amp.logSDKSourceCodeClicked('drm', 'ios')" href="https://github.com/bitmovin/bitmovin-player-ios-samples">
<div style="height: 28px;" class="btn btn-sm btn-outline-dark">
<i class="fa fa-lg fa-github"></i>
<i class="fa-brands fa-github"></i>
<span class="pl-1">Check out the SDK</span>
</div>
</a>
Expand All @@ -104,7 +104,7 @@ <h4 class="sdk-wrapper-title">Try our SDKs</h4>
<div style="padding-bottom: 6px;">Android SDK</div>
<a target="_blank" onclick="amp.logSDKSourceCodeClicked('drm', 'android')" href="https://github.com/bitmovin/bitmovin-player-android-samples">
<div style="height: 28px;" class="btn btn-sm btn-outline-dark">
<i class="fa fa-lg fa-github"></i>
<i class="fa-brands fa-github"></i>
<span class="pl-1">Check out the SDK</span>
</div>
</a>
Expand Down
14 changes: 7 additions & 7 deletions player/drm/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,20 @@
function getBrowserImage(selectedBrowser) {
switch (selectedBrowser) {
case BROWSER.CHROME:
return '<i class="fa fa-chrome browser-icon" aria-hidden="true"></i>';
return '<i class="fa-brands fa-chrome" aria-hidden="true"></i>';
case BROWSER.EDGE:
return '<i class="fa fa-edge browser-icon" aria-hidden="true"></i>';
return '<i class="fa-brands fa-edge" aria-hidden="true"></i>';
case BROWSER.FIREFOX:
return '<i class="fa fa-firefox browser-icon" aria-hidden="true"></i>';
return '<i class="fa-brands fa-firefox" aria-hidden="true"></i>';
case BROWSER.IE:
return '<i class="fa fa-internet-explorer browser-icon" aria-hidden="true"></i>';
return '<i class="fa-brands fa-internet-explorer" aria-hidden="true"></i>';
case BROWSER.OPERA:
return '<i class="fa fa-opera browser-icon" aria-hidden="true"></i>';
return '<i class="fa-brands fa-opera" aria-hidden="true"></i>';
case BROWSER.SAFARI:
return '<i class="fa fa-safari browser-icon" aria-hidden="true"></i>';
return '<i class="fa-brands fa-safari" aria-hidden="true"></i>';
case BROWSER.UNKNOWN:
default:
return '<i class="fa fa-question browser-icon" aria-hidden="true"></i>';
return '<i class="fa-solid fa-circle-question" aria-hidden="true"></i>';
}
}

Expand Down
4 changes: 2 additions & 2 deletions player/stream-test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h4 class="sdk-wrapper-title">Try our SDKs</h4>
<div style="padding-bottom: 6px;">iOS/tvOS SDK</div>
<a target="_blank" onclick="amp.logSDKSourceCodeClicked('stream-test', 'ios')" href="https://github.com/bitmovin/bitmovin-player-ios-samples">
<div style="height: 28px;" class="btn btn-sm btn-outline-dark">
<i class="fa fa-lg fa-github"></i>
<i class="fa-brands fa-github"></i>
<span class="pl-1">Check out the SDK</span>
</div>
</a>
Expand All @@ -119,7 +119,7 @@ <h4 class="sdk-wrapper-title">Try our SDKs</h4>
<div style="padding-bottom: 6px;">Android SDK</div>
<a target="_blank" onclick="amp.logSDKSourceCodeClicked('stream-test', 'android')" href="https://github.com/bitmovin/bitmovin-player-android-samples">
<div style="height: 28px;" class="btn btn-sm btn-outline-dark">
<i class="fa fa-lg fa-github"></i>
<i class="fa-brands fa-github"></i>
<span class="pl-1">Check out the SDK</span>
</div>
</a>
Expand Down

0 comments on commit 2670ff6

Please sign in to comment.