diff --git a/encoding/multi-codec-streaming/js/demo.js b/encoding/multi-codec-streaming/js/demo.js index 079e0c37..56f76ea3 100644 --- a/encoding/multi-codec-streaming/js/demo.js +++ b/encoding/multi-codec-streaming/js/demo.js @@ -290,26 +290,34 @@ var getCodecImage = function (selectedCodec) { } }; -var getBrowserImage = function (selectedBrowser) { +function getBrowserImage(selectedBrowser) { switch (selectedBrowser) { case BROWSER.CHROME: - return ''; + return ''; case BROWSER.EDGE: - return ''; + return ''; case BROWSER.FIREFOX: - return ''; + return ''; case BROWSER.IE: - return ''; + return ''; case BROWSER.OPERA: - return ''; + return ''; case BROWSER.SAFARI: - return ''; + return ''; case BROWSER.UNKNOWN: default: - return ''; + return ''; } }; +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); @@ -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'; diff --git a/player/drm/index.html b/player/drm/index.html index e078e200..052716cb 100644 --- a/player/drm/index.html +++ b/player/drm/index.html @@ -89,7 +89,7 @@