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

chromecast icon update

This commit is contained in:
Luke Pulverenti 2014-04-01 00:16:35 -04:00
parent 573674becd
commit d1c351c88a
4 changed files with 55 additions and 37 deletions

View file

@ -730,7 +730,6 @@
if (this.hasReceivers) { if (this.hasReceivers) {
document.getElementById("btnCast").className = "btnCast btnDefaultCast";
document.getElementById("video-ccastButton").removeAttribute("style"); document.getElementById("video-ccastButton").removeAttribute("style");
this.initializeLocalPlayer(); this.initializeLocalPlayer();
} }

View file

@ -61,7 +61,7 @@
profile.TranscodingProfiles = (profile.TranscodingProfiles || []); profile.TranscodingProfiles = (profile.TranscodingProfiles || []);
profile.ContainerProfiles = (profile.ContainerProfiles || []); profile.ContainerProfiles = (profile.ContainerProfiles || []);
profile.CodecProfiles = (profile.CodecProfiles || []); profile.CodecProfiles = (profile.CodecProfiles || []);
profile.MediaProfiles = (profile.MediaProfiles || []); profile.ResponseProfiles = (profile.ResponseProfiles || []);
renderSubProfiles(page, profile); renderSubProfiles(page, profile);
} }
@ -72,7 +72,7 @@
renderTranscodingProfiles(page, profile.TranscodingProfiles); renderTranscodingProfiles(page, profile.TranscodingProfiles);
renderContainerProfiles(page, profile.ContainerProfiles); renderContainerProfiles(page, profile.ContainerProfiles);
renderCodecProfiles(page, profile.CodecProfiles); renderCodecProfiles(page, profile.CodecProfiles);
renderMediaProfiles(page, profile.MediaProfiles); renderResponseProfiles(page, profile.ResponseProfiles);
} }
function editDirectPlayProfile(page, directPlayProfile) { function editDirectPlayProfile(page, directPlayProfile) {
@ -239,6 +239,11 @@
$('#txtTranscodingContainer', popup).val(transcodingProfile.Container || ''); $('#txtTranscodingContainer', popup).val(transcodingProfile.Container || '');
$('#txtTranscodingAudioCodec', popup).val(transcodingProfile.AudioCodec || ''); $('#txtTranscodingAudioCodec', popup).val(transcodingProfile.AudioCodec || '');
$('#txtTranscodingVideoCodec', popup).val(transcodingProfile.VideoCodec || ''); $('#txtTranscodingVideoCodec', popup).val(transcodingProfile.VideoCodec || '');
$('#txtTranscodingVideoProfile', popup).val(transcodingProfile.VideoProfile || '');
$('#chkEnableMpegtsM2TsMode', popup).checked(transcodingProfile.EnableMpegtsM2TsMode).checkboxradio('refresh');
$('#chkEstimateContentLength', popup).checked(transcodingProfile.EstimateContentLength).checkboxradio('refresh');
$('#chkReportByteRangeRequests', popup).checked(transcodingProfile.TranscodeSeekInfo == 'Bytes').checkboxradio('refresh');
} }
function deleteTranscodingProfile(page, index) { function deleteTranscodingProfile(page, index) {
@ -256,6 +261,11 @@
currentSubProfile.AudioCodec = $('#txtTranscodingAudioCodec', page).val(); currentSubProfile.AudioCodec = $('#txtTranscodingAudioCodec', page).val();
currentSubProfile.VideoCodec = $('#txtTranscodingVideoCodec', page).val(); currentSubProfile.VideoCodec = $('#txtTranscodingVideoCodec', page).val();
currentSubProfile.VideoProfile = $('#txtTranscodingVideoProfile', page).val();
currentSubProfile.EnableMpegtsM2TsMode = $('#chkEnableMpegtsM2TsMode', page).checked();
currentSubProfile.EstimateContentLength = $('#chkEstimateContentLength', page).checked();
currentSubProfile.TranscodeSeekInfo = $('#chkReportByteRangeRequests', page).checked() ? 'Bytes' : 'Auto';
if (isSubProfileNew) { if (isSubProfileNew) {
currentProfile.TranscodingProfiles.push(currentSubProfile); currentProfile.TranscodingProfiles.push(currentSubProfile);
@ -386,7 +396,7 @@
} }
function renderMediaProfiles(page, profiles) { function renderResponseProfiles(page, profiles) {
var html = ''; var html = '';
@ -439,15 +449,15 @@
$('.btnDeleteProfile', elem).on('click', function () { $('.btnDeleteProfile', elem).on('click', function () {
var index = this.getAttribute('data-profileindex'); var index = this.getAttribute('data-profileindex');
deleteMediaProfile(page, index); deleteResponseProfile(page, index);
}); });
} }
function deleteMediaProfile(page, index) { function deleteResponseProfile(page, index) {
currentProfile.MediaProfiles.splice(index, 1); currentProfile.ResponseProfiles.splice(index, 1);
renderMediaProfiles(page, currentProfile.MediaProfiles); renderResponseProfiles(page, currentProfile.ResponseProfiles);
} }
@ -540,14 +550,25 @@
if (this.value == 'Video') { if (this.value == 'Video') {
$('#fldTranscodingVideoCodec', page).show(); $('#fldTranscodingVideoCodec', page).show();
$('#fldEnableMpegtsM2TsMode', page).show();
$('#fldVideoProfile', page).show();
} else { } else {
$('#fldTranscodingVideoCodec', page).hide(); $('#fldTranscodingVideoCodec', page).hide();
$('#fldEnableMpegtsM2TsMode', page).hide();
$('#fldVideoProfile', page).hide();
} }
if (this.value == 'Photo') { if (this.value == 'Photo') {
$('#fldTranscodingAudioCodec', page).hide(); $('#fldTranscodingAudioCodec', page).hide();
$('#fldEstimateContentLength', page).hide();
$('#fldReportByteRangeRequests', page).hide();
} else { } else {
$('#fldTranscodingAudioCodec', page).show(); $('#fldTranscodingAudioCodec', page).show();
$('#fldEstimateContentLength', page).show();
$('#fldReportByteRangeRequests', page).show();
} }
}); });

View file

@ -24,7 +24,7 @@
html += '<div class="viewMenuSecondary">'; html += '<div class="viewMenuSecondary">';
html += '<button id="btnCast" class="btnCast btnDisabledCast" type="button" data-role="none"></button>'; html += '<button id="btnCast" class="btnCast btnDefaultCast" type="button" data-role="none"></button>';
html += '<a class="viewMenuLink btnCurrentUser" href="#" onclick="Dashboard.showUserFlyout(this);">'; html += '<a class="viewMenuLink btnCurrentUser" href="#" onclick="Dashboard.showUserFlyout(this);">';
@ -179,8 +179,6 @@
var info = MediaController.getPlayerInfo(); var info = MediaController.getPlayerInfo();
if ($(".btnCast").hasClass("btnDisabledCast") == false) return; // No icon change if no CC is detected
if (info.isLocalPlayer) { if (info.isLocalPlayer) {
$('.btnCast').addClass('btnDefaultCast').removeClass('btnActiveCast'); $('.btnCast').addClass('btnDefaultCast').removeClass('btnActiveCast');

View file

@ -1379,7 +1379,7 @@ $(function () {
var footerElem = $('#footer', document.body); var footerElem = $('#footer', document.body);
footerElem.trigger('create'); footerElem.trigger('create');
$(window).on("beforeunload popstate", function () { $(window).on("beforeunload", function () {
// Close the connection gracefully when possible // Close the connection gracefully when possible
if (ApiClient.isWebSocketOpen() && !MediaPlayer.isPlaying()) { if (ApiClient.isWebSocketOpen() && !MediaPlayer.isPlaying()) {