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:
parent
a75e37be73
commit
b95f079a92
1 changed files with 18 additions and 15 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue