update components

This commit is contained in:
Luke Pulverenti 2016-03-10 12:59:32 -05:00
parent 4f48507a2d
commit 4a87b99666
16 changed files with 428 additions and 50 deletions

View file

@ -16,12 +16,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.1.30",
"_release": "1.1.30",
"version": "1.1.31",
"_release": "1.1.31",
"_resolution": {
"type": "version",
"tag": "1.1.30",
"commit": "25a55da9b6507b8e0b81dbde2c69f21af98abce8"
"tag": "1.1.31",
"commit": "23e283143ce4f084d28a5af10048d53caa23e9be"
},
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "~1.1.5",

View file

@ -84,6 +84,62 @@ define(['browser'], function (browser) {
return false;
}
function testCanPlayMkv() {
// Unfortunately there's no real way to detect mkv support
if (browser.chrome) {
return true;
}
var userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf('samsungbrowser') != -1) {
return true;
}
return false;
}
function testCanPlayTs() {
// Unfortunately there's no real way to detect mkv support
var userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf('webos') != -1) {
return true;
}
if (userAgent.indexOf('samsungbrowser') != -1) {
return true;
}
return false;
}
function testCanPlayWmv() {
// Unfortunately there's no real way to detect mkv support
var userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf('webos') != -1) {
return true;
}
return false;
}
function testCanPlayM2ts() {
// Unfortunately there's no real way to detect mkv support
var userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf('webos') != -1) {
return true;
}
return false;
}
return function () {
var bitrateSetting = 100000000;
@ -91,8 +147,9 @@ define(['browser'], function (browser) {
var videoTestElement = document.createElement('video');
var canPlayWebm = videoTestElement.canPlayType('video/webm').replace(/no/, '');
// No real way to detect this, but it's too good to pass up
var canPlayMkv = browser.chrome;
var canPlayMkv = testCanPlayMkv();
var canPlayTs = testCanPlayTs();
var profile = {};
@ -121,8 +178,11 @@ define(['browser'], function (browser) {
}
}
}
if (canPlayMkv) {
var mp3Added = false;
if (canPlayMkv || canPlayTs) {
if (supportsMp3VideoAudio) {
mp3Added = true;
videoAudioCodecs.push('mp3');
hlsVideoAudioCodecs.push('mp3');
}
@ -131,11 +191,9 @@ define(['browser'], function (browser) {
videoAudioCodecs.push('aac');
hlsVideoAudioCodecs.push('aac');
}
if (!canPlayMkv) {
if (supportsMp3VideoAudio) {
videoAudioCodecs.push('mp3');
hlsVideoAudioCodecs.push('mp3');
}
if (!mp3Added && supportsMp3VideoAudio) {
videoAudioCodecs.push('mp3');
hlsVideoAudioCodecs.push('mp3');
}
if (canPlayH264()) {
@ -156,6 +214,32 @@ define(['browser'], function (browser) {
});
}
if (canPlayTs) {
profile.DirectPlayProfiles.push({
Container: 'ts,mpegts',
Type: 'Video',
VideoCodec: 'h264',
AudioCodec: videoAudioCodecs.join(',')
});
}
if (testCanPlayWmv()) {
profile.DirectPlayProfiles.push({
Container: 'wmv',
Type: 'Video',
VideoCodec: 'h264'
});
}
if (testCanPlayM2ts()) {
profile.DirectPlayProfiles.push({
Container: 'm2ts',
Type: 'Video',
VideoCodec: 'h264',
AudioCodec: videoAudioCodecs.join(',')
});
}
['opus', 'mp3', 'aac', 'flac', 'webma'].filter(canPlayAudioFormat).forEach(function (audioFormat) {
profile.DirectPlayProfiles.push({
@ -212,6 +296,17 @@ define(['browser'], function (browser) {
});
}
if (canPlayTs) {
profile.TranscodingProfiles.push({
Container: 'ts',
Type: 'Video',
AudioCodec: videoAudioCodecs.join(','),
VideoCodec: 'h264',
Context: 'Streaming',
CopyTimestamps: true
});
}
if (canPlayHls()) {
profile.TranscodingProfiles.push({
Container: 'ts',

View file

@ -264,7 +264,6 @@ define(['paperdialoghelper', 'inputManager', 'connectionManager', 'browser', 'cs
// If not resizing, get the original image
if (!options.maxWidth && !options.width && !options.maxHeight && !options.height) {
options.quality = 100;
options.format = 'jpg';
}
if (item.BackdropImageTags && item.BackdropImageTags.length) {