1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update transcoding for chrome

This commit is contained in:
Luke Pulverenti 2015-12-12 02:05:36 -05:00
parent a75e37be73
commit b95f079a92

View file

@ -129,6 +129,7 @@
var canPlayAc3 = supportedFormats.indexOf('ac3') != -1; var canPlayAc3 = supportedFormats.indexOf('ac3') != -1;
var canPlayAac = supportedFormats.indexOf('aac') != -1; var canPlayAac = supportedFormats.indexOf('aac') != -1;
var canPlayMp3 = supportedFormats.indexOf('mp3') != -1; var canPlayMp3 = supportedFormats.indexOf('mp3') != -1;
var canPlayMkv = supportedFormats.indexOf('mkv') != -1;
var profile = {}; var profile = {};
@ -147,7 +148,7 @@
}); });
} }
if (browserInfo.chrome) { if (canPlayMkv) {
profile.DirectPlayProfiles.push({ profile.DirectPlayProfiles.push({
Container: 'mkv,mov', Container: 'mkv,mov',
Type: 'Video', Type: 'Video',
@ -201,13 +202,15 @@
profile.TranscodingProfiles = []; profile.TranscodingProfiles = [];
//profile.TranscodingProfiles.push({ if (canPlayMkv) {
// Container: 'mkv', profile.TranscodingProfiles.push({
// Type: 'Video', Container: 'mkv',
// AudioCodec: 'aac' + (canPlayAc3 ? ',ac3' : ''), Type: 'Video',
// VideoCodec: 'h264', AudioCodec: 'aac' + (canPlayAc3 ? ',ac3' : ''),
// Context: 'Streaming' VideoCodec: 'h264',
//}); Context: 'Streaming'
});
}
if (self.canPlayHls()) { if (self.canPlayHls()) {
profile.TranscodingProfiles.push({ profile.TranscodingProfiles.push({
@ -480,12 +483,6 @@
profile.ResponseProfiles = []; profile.ResponseProfiles = [];
//profile.ResponseProfiles.push({
// Type: 'Video',
// Container: 'mkv',
// MimeType: 'video/mp4'
//});
profile.ResponseProfiles.push({ profile.ResponseProfiles.push({
Type: 'Video', Type: 'Video',
Container: 'm4v', Container: 'm4v',
@ -968,7 +965,9 @@
} else { } else {
// Reports of stuttering with h264 stream copy in IE // Reports of stuttering with h264 stream copy in IE
mediaUrl += '&EnableAutoStreamCopy=false'; if (mediaUrl.indexOf('.mkv') == -1) {
mediaUrl += '&EnableAutoStreamCopy=false';
}
startTimeTicksOffset = startPosition || 0; startTimeTicksOffset = startPosition || 0;
contentType = 'video/' + mediaSource.TranscodingContainer; contentType = 'video/' + mediaSource.TranscodingContainer;
@ -1878,6 +1877,10 @@
list.push('mp3'); list.push('mp3');
} }
if (browserInfo.chrome) {
list.push('mkv');
}
supportedFormats = list; supportedFormats = list;
return list; return list;
} }