mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
create separate media encoding project
This commit is contained in:
parent
c7582e0f7a
commit
14fa584289
5 changed files with 67 additions and 10 deletions
|
@ -23,6 +23,31 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<div data-role="controlgroup" data-type="horizontal" data-mini="true">
|
||||||
|
<input type="radio" name="radioProfileTab" class="radioProfileTab" id="radioInfo" value="tabInfo">
|
||||||
|
<label for="radioInfo">Info</label>
|
||||||
|
<input type="radio" name="radioProfileTab" class="radioProfileTab" id="radioIdentification" value="tabIdentification">
|
||||||
|
<label for="radioIdentification">Identification</label>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="profileTab tabInfo">
|
||||||
|
|
||||||
|
<fieldset data-role="controlgroup">
|
||||||
|
<legend>Supported Media Types:</legend>
|
||||||
|
<input type="checkbox" data-mini="true" id="chkAudio" data-value="Audio" class="chkMediaType" />
|
||||||
|
<label for="chkAudio">Audio</label>
|
||||||
|
|
||||||
|
<input type="checkbox" data-mini="true" id="chkPhoto" data-value="Photo" class="chkMediaType" />
|
||||||
|
<label for="chkPhoto">Photo</label>
|
||||||
|
|
||||||
|
<input type="checkbox" data-mini="true" id="chkVideo" data-value="Video" class="chkMediaType" />
|
||||||
|
<label for="chkVideo">Video</label>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
<div class="profileTab tabIdentification">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
<ul data-role="listview" class="ulForm">
|
<ul data-role="listview" class="ulForm">
|
||||||
<li>
|
<li>
|
||||||
<button class="btnSave" style="display: none;" type="submit" data-theme="b" data-icon="check" data-mini="true">
|
<button class="btnSave" style="display: none;" type="submit" data-theme="b" data-icon="check" data-mini="true">
|
||||||
|
|
|
@ -28,9 +28,13 @@
|
||||||
} else {
|
} else {
|
||||||
$('.btnSave', page).hide();
|
$('.btnSave', page).hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#txtName', page).val(profile.Name);
|
$('#txtName', page).val(profile.Name);
|
||||||
|
|
||||||
|
$('.chkMediaType', page).each(function () {
|
||||||
|
this.checked = (profile.SupportedMediaTypes || '').split(',').indexOf(this.getAttribute('data-value')) != -1;
|
||||||
|
|
||||||
|
}).checkboxradio('refresh');
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveProfile(page, profile) {
|
function saveProfile(page, profile) {
|
||||||
|
@ -78,12 +82,30 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('pageshow', "#dlnaProfilePage", function () {
|
$(document).on('pageinit', "#dlnaProfilePage", function () {
|
||||||
|
|
||||||
|
var page = this;
|
||||||
|
|
||||||
|
$('.radioProfileTab', page).on('change', function () {
|
||||||
|
|
||||||
|
$('.profileTab', page).hide();
|
||||||
|
$('.' + this.value, page).show();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}).on('pageshow', "#dlnaProfilePage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
loadProfile(page);
|
loadProfile(page);
|
||||||
|
|
||||||
|
}).on('pagebeforeshow', "#dlnaProfilePage", function () {
|
||||||
|
|
||||||
|
var page = this;
|
||||||
|
|
||||||
|
$('.radioSeriesTimerTab', page).checked(false).checkboxradio('refresh');
|
||||||
|
$('#radioInfo', page).checked(true).checkboxradio('refresh').trigger('change');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
window.DlnaProfilePage = {
|
window.DlnaProfilePage = {
|
||||||
|
|
|
@ -267,7 +267,7 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
$('.radioSeriesTimerTab', page).checked(false).checkboxradio('refresh');
|
$('.radioProfileTab', page).checked(false).checkboxradio('refresh');
|
||||||
$('#radioSettings', page).checked(true).checkboxradio('refresh').trigger('change');
|
$('#radioSettings', page).checked(true).checkboxradio('refresh').trigger('change');
|
||||||
|
|
||||||
reload(page);
|
reload(page);
|
||||||
|
|
|
@ -751,8 +751,6 @@
|
||||||
var seekParam = isStatic && startPosition ? '#t=' + (startPosition / 10000000) : '';
|
var seekParam = isStatic && startPosition ? '#t=' + (startPosition / 10000000) : '';
|
||||||
|
|
||||||
var mp4VideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.mp4', $.extend({}, baseParams, {
|
var mp4VideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.mp4', $.extend({}, baseParams, {
|
||||||
profile: 'baseline',
|
|
||||||
level: 3,
|
|
||||||
Static: isStatic,
|
Static: isStatic,
|
||||||
maxWidth: mp4Quality.maxWidth,
|
maxWidth: mp4Quality.maxWidth,
|
||||||
videoBitrate: mp4Quality.videoBitrate,
|
videoBitrate: mp4Quality.videoBitrate,
|
||||||
|
@ -773,8 +771,6 @@
|
||||||
})) + seekParam;
|
})) + seekParam;
|
||||||
|
|
||||||
var hlsVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.m3u8', $.extend({}, baseParams, {
|
var hlsVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.m3u8', $.extend({}, baseParams, {
|
||||||
profile: 'baseline',
|
|
||||||
level: 3,
|
|
||||||
timeStampOffsetMs: 0,
|
timeStampOffsetMs: 0,
|
||||||
maxWidth: m3U8Quality.maxWidth,
|
maxWidth: m3U8Quality.maxWidth,
|
||||||
videoBitrate: m3U8Quality.videoBitrate,
|
videoBitrate: m3U8Quality.videoBitrate,
|
||||||
|
|
|
@ -118,7 +118,6 @@
|
||||||
params = params || {};
|
params = params || {};
|
||||||
|
|
||||||
var currentSrc = element.currentSrc;
|
var currentSrc = element.currentSrc;
|
||||||
currentSrc = replaceQueryString(currentSrc, 'starttimeticks', ticks);
|
|
||||||
|
|
||||||
if (params.AudioStreamIndex != null) {
|
if (params.AudioStreamIndex != null) {
|
||||||
currentSrc = replaceQueryString(currentSrc, 'AudioStreamIndex', params.AudioStreamIndex);
|
currentSrc = replaceQueryString(currentSrc, 'AudioStreamIndex', params.AudioStreamIndex);
|
||||||
|
@ -142,10 +141,18 @@
|
||||||
currentSrc = replaceQueryString(currentSrc, 'AudioBitrate', finalParams.audioBitrate);
|
currentSrc = replaceQueryString(currentSrc, 'AudioBitrate', finalParams.audioBitrate);
|
||||||
currentSrc = replaceQueryString(currentSrc, 'Static', finalParams.isStatic);
|
currentSrc = replaceQueryString(currentSrc, 'Static', finalParams.isStatic);
|
||||||
|
|
||||||
|
currentSrc = replaceQueryString(currentSrc, 'AudioCodec', finalParams.audioCodec);
|
||||||
|
currentSrc = replaceQueryString(currentSrc, 'VideoCodec', finalParams.videoCodec);
|
||||||
|
|
||||||
|
currentSrc = replaceQueryString(currentSrc, 'profile', finalParams.profile || '');
|
||||||
|
currentSrc = replaceQueryString(currentSrc, 'level', finalParams.level || '');
|
||||||
|
|
||||||
if (finalParams.isStatic) {
|
if (finalParams.isStatic) {
|
||||||
currentSrc = currentSrc.replace('.webm', '.mp4').replace('.m3u8', '.mp4');
|
currentSrc = currentSrc.replace('.webm', '.mp4').replace('.m3u8', '.mp4');
|
||||||
|
currentSrc = replaceQueryString(currentSrc, 'starttimeticks', '');
|
||||||
} else {
|
} else {
|
||||||
currentSrc = currentSrc.replace('.mp4', transcodingExtension);
|
currentSrc = currentSrc.replace('.mp4', transcodingExtension).replace('.m4v', transcodingExtension);
|
||||||
|
currentSrc = replaceQueryString(currentSrc, 'starttimeticks', ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
clearProgressInterval();
|
clearProgressInterval();
|
||||||
|
@ -260,7 +267,7 @@
|
||||||
|
|
||||||
var videoBitrate = bitrate - audioBitrate;
|
var videoBitrate = bitrate - audioBitrate;
|
||||||
|
|
||||||
return {
|
var params = {
|
||||||
isStatic: canPlayDirect,
|
isStatic: canPlayDirect,
|
||||||
maxWidth: maxWidth,
|
maxWidth: maxWidth,
|
||||||
audioCodec: transcodingExtension == '.webm' ? 'vorbis' : 'aac',
|
audioCodec: transcodingExtension == '.webm' ? 'vorbis' : 'aac',
|
||||||
|
@ -268,6 +275,13 @@
|
||||||
audioBitrate: audioBitrate,
|
audioBitrate: audioBitrate,
|
||||||
videoBitrate: videoBitrate
|
videoBitrate: videoBitrate
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (params.videoCodec == 'h264') {
|
||||||
|
params.profile = 'baseline';
|
||||||
|
params.level = '3';
|
||||||
|
}
|
||||||
|
|
||||||
|
return params;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.canPlay = function (item, user) {
|
self.canPlay = function (item, user) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue