mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
replace sliders
This commit is contained in:
parent
09d4af3357
commit
1b74dbdfbf
13 changed files with 1359 additions and 1439 deletions
|
@ -1,9 +1,5 @@
|
|||
(function () {
|
||||
|
||||
function onClosed() {
|
||||
$(this).remove();
|
||||
$(document.body).removeClass('bodyWithPopupOpen');
|
||||
}
|
||||
function show(options) {
|
||||
|
||||
require(['paperbuttonstyle'], function () {
|
||||
|
@ -65,6 +61,11 @@
|
|||
html += '<paper-dialog-scrollable>';
|
||||
}
|
||||
|
||||
// If any items have an icon, give them all an icon just to make sure they're all lined up evenly
|
||||
var renderIcon = options.items.filter(function (o) {
|
||||
return o.ironIcon;
|
||||
}).length;
|
||||
|
||||
for (var i = 0, length = options.items.length; i < length; i++) {
|
||||
|
||||
var option = options.items[i];
|
||||
|
@ -74,6 +75,9 @@
|
|||
if (option.ironIcon) {
|
||||
html += '<iron-icon icon="' + option.ironIcon + '"></iron-icon>';
|
||||
}
|
||||
else if (renderIcon) {
|
||||
html += '<iron-icon></iron-icon>';
|
||||
}
|
||||
html += '<span>' + option.name + '</span>';
|
||||
html += '</paper-button>';
|
||||
}
|
||||
|
@ -98,7 +102,9 @@
|
|||
dlg.open();
|
||||
|
||||
// Has to be assigned a z-index after the call to .open()
|
||||
$(dlg).on('iron-overlay-closed', onClosed);
|
||||
$(dlg).on('iron-overlay-closed', function () {
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
$('.btnOption', dlg).on('click', function () {
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
var unmuteButton = null;
|
||||
var volumeSlider = null;
|
||||
var positionSlider;
|
||||
var isPositionSliderActive;
|
||||
var currentTimeElement;
|
||||
|
||||
self.currentSubtitleStreamIndex = null;
|
||||
|
@ -59,20 +58,14 @@
|
|||
return document.fullscreen || document.mozFullScreen || document.webkitIsFullScreen || document.msFullscreenElement ? true : false;
|
||||
};
|
||||
|
||||
function onFlyoutClose() {
|
||||
$('.itemVideo').css('visibility', 'visible');
|
||||
}
|
||||
|
||||
function onPopupOpen(elem) {
|
||||
elem.popup("open").parents(".ui-popup-container").css("margin-top", 30);
|
||||
|
||||
if ($.browser.safari) {
|
||||
//$('.itemVideo').css('visibility', 'hidden');
|
||||
}
|
||||
}
|
||||
|
||||
self.showChaptersFlyout = function () {
|
||||
|
||||
function onFlyoutClose() {
|
||||
$('.itemVideo').css('visibility', 'visible');
|
||||
}
|
||||
|
||||
require(['jqmicons']);
|
||||
|
||||
var html = getChaptersFlyoutHtml();
|
||||
|
||||
var elem = $('.videoChaptersPopup').html(html)
|
||||
|
@ -81,46 +74,187 @@
|
|||
.off('popupafterclose', onFlyoutClose)
|
||||
.on('popupafterclose', onFlyoutClose);
|
||||
|
||||
onPopupOpen(elem);
|
||||
elem.popup("open").parents(".ui-popup-container").css("margin-top", 30);
|
||||
};
|
||||
|
||||
self.showSubtitleMenu = function () {
|
||||
|
||||
var html = getSubtitleTracksHtml();
|
||||
var streams = self.currentMediaSource.MediaStreams.filter(function (currentStream) {
|
||||
return currentStream.Type == "Subtitle";
|
||||
});
|
||||
|
||||
var elem = $('.videoSubtitlePopup').html(html)
|
||||
.trigger('create')
|
||||
.popup("option", "positionTo", $('.videoSubtitleButton'))
|
||||
.off('popupafterclose', onFlyoutClose)
|
||||
.on('popupafterclose', onFlyoutClose);
|
||||
var currentIndex = self.currentSubtitleStreamIndex || -1;
|
||||
|
||||
onPopupOpen(elem);
|
||||
streams.unshift({
|
||||
Index: -1,
|
||||
Language: "Off"
|
||||
});
|
||||
|
||||
var menuItems = streams.map(function (stream) {
|
||||
|
||||
var attributes = [];
|
||||
|
||||
attributes.push(stream.Language || Globalize.translate('LabelUnknownLanguage'));
|
||||
|
||||
if (stream.Codec) {
|
||||
attributes.push(stream.Codec);
|
||||
}
|
||||
|
||||
var name = attributes.join(' - ');
|
||||
|
||||
if (stream.IsDefault) {
|
||||
name += ' (D)';
|
||||
}
|
||||
if (stream.IsForced) {
|
||||
name += ' (F)';
|
||||
}
|
||||
if (stream.External) {
|
||||
name += ' (EXT)';
|
||||
}
|
||||
|
||||
var opt = {
|
||||
name: name,
|
||||
id: stream.Index
|
||||
};
|
||||
|
||||
if (stream.Index == currentIndex) {
|
||||
opt.ironIcon = "check";
|
||||
}
|
||||
|
||||
return opt;
|
||||
});
|
||||
|
||||
require(['actionsheet'], function () {
|
||||
|
||||
ActionSheetElement.show({
|
||||
items: menuItems,
|
||||
positionTo: $('.videoSubtitleButton')[0],
|
||||
callback: function (id) {
|
||||
|
||||
var index = parseInt(id);
|
||||
if (index != currentIndex) {
|
||||
self.onSubtitleOptionSelected(index);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
self.showQualityFlyout = function () {
|
||||
|
||||
var html = getQualityFlyoutHtml();
|
||||
var currentSrc = self.getCurrentSrc(self.currentMediaRenderer).toLowerCase();
|
||||
var isStatic = currentSrc.indexOf('static=true') != -1;
|
||||
|
||||
var elem = $('.videoQualityPopup').html(html)
|
||||
.trigger('create')
|
||||
.popup("option", "positionTo", $('.videoQualityButton'))
|
||||
.off('popupafterclose', onFlyoutClose)
|
||||
.on('popupafterclose', onFlyoutClose);
|
||||
var videoStream = self.currentMediaSource.MediaStreams.filter(function (stream) {
|
||||
return stream.Type == "Video";
|
||||
})[0];
|
||||
var videoWidth = videoStream ? videoStream.Width : null;
|
||||
var videoHeight = videoStream ? videoStream.Height : null;
|
||||
|
||||
onPopupOpen(elem);
|
||||
var options = self.getVideoQualityOptions(videoWidth, videoHeight);
|
||||
|
||||
if (isStatic) {
|
||||
options[0].name = "Direct";
|
||||
}
|
||||
|
||||
var menuItems = options.map(function (o) {
|
||||
|
||||
var opt = {
|
||||
name: o.name,
|
||||
id: o.bitrate
|
||||
};
|
||||
|
||||
if (o.selected) {
|
||||
opt.ironIcon = "check";
|
||||
}
|
||||
|
||||
return opt;
|
||||
});
|
||||
|
||||
var selectedId = options.filter(function (o) {
|
||||
return o.selected;
|
||||
});
|
||||
selectedId = selectedId.length ? selectedId[0].bitrate : null;
|
||||
require(['actionsheet'], function () {
|
||||
|
||||
ActionSheetElement.show({
|
||||
items: menuItems,
|
||||
positionTo: $('.videoQualityButton')[0],
|
||||
callback: function (id) {
|
||||
|
||||
var bitrate = parseInt(id);
|
||||
if (bitrate != selectedId) {
|
||||
self.onQualityOptionSelected(bitrate);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
self.showAudioTracksFlyout = function () {
|
||||
|
||||
var html = getAudioTracksHtml();
|
||||
var options = self.currentMediaSource.MediaStreams.filter(function (currentStream) {
|
||||
return currentStream.Type == "Audio";
|
||||
});
|
||||
|
||||
var elem = $('.videoAudioPopup').html(html)
|
||||
.trigger('create')
|
||||
.popup("option", "positionTo", $('.videoAudioButton'))
|
||||
.off('popupafterclose', onFlyoutClose)
|
||||
.on('popupafterclose', onFlyoutClose);
|
||||
var currentIndex = getParameterByName('AudioStreamIndex', self.getCurrentSrc(self.currentMediaRenderer));
|
||||
|
||||
onPopupOpen(elem);
|
||||
var menuItems = options.map(function (stream) {
|
||||
|
||||
var attributes = [];
|
||||
|
||||
attributes.push(stream.Language || Globalize.translate('LabelUnknownLanguage'));
|
||||
|
||||
if (stream.Codec) {
|
||||
attributes.push(stream.Codec);
|
||||
}
|
||||
if (stream.Profile) {
|
||||
attributes.push(stream.Profile);
|
||||
}
|
||||
|
||||
if (stream.BitRate) {
|
||||
attributes.push((Math.floor(stream.BitRate / 1000)) + ' kbps');
|
||||
}
|
||||
|
||||
if (stream.Channels) {
|
||||
attributes.push(stream.Channels + ' ch');
|
||||
}
|
||||
|
||||
var name = attributes.join(' - ');
|
||||
|
||||
if (stream.IsDefault) {
|
||||
name += ' (D)';
|
||||
}
|
||||
|
||||
var opt = {
|
||||
name: name,
|
||||
id: stream.Index
|
||||
};
|
||||
|
||||
if (stream.Index == currentIndex) {
|
||||
opt.ironIcon = "check";
|
||||
}
|
||||
|
||||
return opt;
|
||||
});
|
||||
|
||||
require(['actionsheet'], function () {
|
||||
|
||||
ActionSheetElement.show({
|
||||
items: menuItems,
|
||||
positionTo: $('.videoAudioButton')[0],
|
||||
callback: function (id) {
|
||||
|
||||
var index = parseInt(id);
|
||||
if (index != currentIndex) {
|
||||
self.onAudioOptionSelected(index);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
self.setAudioStreamIndex = function (index) {
|
||||
|
@ -438,8 +572,6 @@
|
|||
|
||||
function onPositionSliderChange() {
|
||||
|
||||
isPositionSliderActive = false;
|
||||
|
||||
var newPercent = parseInt(this.value);
|
||||
|
||||
var newPositionTicks = (newPercent / 100) * self.currentMediaSource.RunTimeTicks;
|
||||
|
@ -457,92 +589,134 @@
|
|||
$('.videoChaptersPopup').popup('close');
|
||||
};
|
||||
|
||||
self.onAudioOptionSelected = function (elem) {
|
||||
self.onAudioOptionSelected = function (index) {
|
||||
|
||||
if (!$(elem).hasClass('selectedMediaPopupOption')) {
|
||||
var index = parseInt(elem.getAttribute('data-value'));
|
||||
|
||||
self.setAudioStreamIndex(index);
|
||||
}
|
||||
$('.videoAudioPopup').popup('close');
|
||||
self.setAudioStreamIndex(index);
|
||||
};
|
||||
|
||||
self.onSubtitleOptionSelected = function (elem) {
|
||||
self.onSubtitleOptionSelected = function (index) {
|
||||
|
||||
if (!$(elem).hasClass('selectedMediaPopupOption')) {
|
||||
var index = parseInt(elem.getAttribute('data-value'));
|
||||
|
||||
self.setSubtitleStreamIndex(index);
|
||||
}
|
||||
$('.videoSubtitlePopup').popup('close');
|
||||
self.setSubtitleStreamIndex(index);
|
||||
};
|
||||
|
||||
self.onQualityOptionSelected = function (elem) {
|
||||
self.onQualityOptionSelected = function (bitrate) {
|
||||
|
||||
if (!$(elem).hasClass('selectedMediaPopupOption')) {
|
||||
var bitrate = parseInt(elem.getAttribute('data-value'));
|
||||
AppSettings.maxStreamingBitrate(bitrate);
|
||||
|
||||
AppSettings.maxStreamingBitrate(bitrate);
|
||||
$('.videoQualityPopup').popup('close');
|
||||
|
||||
$('.videoQualityPopup').popup('close');
|
||||
|
||||
self.changeStream(self.getCurrentTicks(), {
|
||||
Bitrate: bitrate
|
||||
});
|
||||
}
|
||||
|
||||
$('.videoSubtitlePopup').popup('close');
|
||||
self.changeStream(self.getCurrentTicks(), {
|
||||
Bitrate: bitrate
|
||||
});
|
||||
};
|
||||
|
||||
$(Dashboard).on('footercreated', function () {
|
||||
function ensureVideoPlayerElements() {
|
||||
|
||||
var html = '<div id="mediaPlayer" data-theme="b" class="ui-bar-b" style="display: none;">';
|
||||
|
||||
html += '<div class="videoBackdrop">';
|
||||
html += '<div id="videoPlayer">';
|
||||
|
||||
html += '<div id="videoElement">';
|
||||
html += '<div id="play" class="status"></div>';
|
||||
html += '<div id="pause" class="status"></div>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="videoTopControls hiddenOnIdle">';
|
||||
html += '<div class="videoTopControlsLogo"></div>';
|
||||
html += '<div class="videoAdvancedControls">';
|
||||
|
||||
html += '<paper-icon-button icon="skip-previous" class="previousTrackButton mediaButton videoTrackControl" onclick="MediaPlayer.previousTrack();"></paper-icon-button>';
|
||||
html += '<paper-icon-button icon="skip-next" class="nextTrackButton mediaButton videoTrackControl" onclick="MediaPlayer.nextTrack();"></paper-icon-button>';
|
||||
|
||||
// Embedding onclicks due to issues not firing in cordova safari
|
||||
html += '<paper-icon-button icon="audiotrack" class="mediaButton videoAudioButton" onclick="MediaPlayer.showAudioTracksFlyout();"></paper-icon-button>';
|
||||
html += '<div data-role="popup" class="videoAudioPopup videoPlayerPopup" data-history="false" data-theme="b"></div>';
|
||||
|
||||
html += '<paper-icon-button icon="subtitles" class="mediaButton videoSubtitleButton" onclick="MediaPlayer.showSubtitleMenu();"></paper-icon-button>';
|
||||
html += '<div data-role="popup" class="videoSubtitlePopup videoPlayerPopup" data-history="false" data-theme="b"></div>';
|
||||
|
||||
html += '<paper-icon-button icon="videocam" class="mediaButton videoChaptersButton" onclick="MediaPlayer.showChaptersFlyout();"></paper-icon-button>';
|
||||
html += '<div data-role="popup" class="videoChaptersPopup videoPlayerPopup" data-history="false" data-theme="b"></div>';
|
||||
|
||||
html += '<paper-icon-button icon="settings" class="mediaButton videoQualityButton" onclick="MediaPlayer.showQualityFlyout();"></paper-icon-button>';
|
||||
|
||||
html += '<paper-icon-button icon="close" class="mediaButton" onclick="MediaPlayer.stop();"></paper-icon-button>';
|
||||
|
||||
html += '</div>'; // videoAdvancedControls
|
||||
html += '</div>'; // videoTopControls
|
||||
|
||||
// Create controls
|
||||
html += '<div class="videoControls hiddenOnIdle">';
|
||||
|
||||
html += '<div class="nowPlayingInfo hiddenOnIdle">';
|
||||
html += '<div class="nowPlayingImage"></div>';
|
||||
html += '<div class="nowPlayingTabs"></div>';
|
||||
html += '</div>'; // nowPlayingInfo
|
||||
|
||||
html += '<paper-icon-button icon="skip-previous" class="previousTrackButton mediaButton videoTrackControl" onclick="MediaPlayer.previousTrack();"></paper-icon-button>';
|
||||
|
||||
html += '<paper-icon-button id="video-playButton" icon="play-arrow" class="mediaButton unpauseButton" onclick="MediaPlayer.unpause();"></paper-icon-button>';
|
||||
html += '<paper-icon-button id="video-pauseButton" icon="pause" class="mediaButton pauseButton" onclick="MediaPlayer.pause();"></paper-icon-button>';
|
||||
|
||||
html += '<paper-icon-button icon="skip-next" class="nextTrackButton mediaButton videoTrackControl" onclick="MediaPlayer.nextTrack();"></paper-icon-button>';
|
||||
|
||||
html += '<paper-slider pin step=".1" min="0" max="100" value="0" class="videoPositionSlider" style="width:300px;vertical-align:middle;margin-left:-1em;"></paper-slider>';
|
||||
|
||||
html += '<div class="currentTime">--:--</div>';
|
||||
|
||||
html += '<paper-icon-button icon="volume-up" class="muteButton mediaButton" onclick="MediaPlayer.mute();"></paper-icon-button>';
|
||||
html += '<paper-icon-button icon="volume-off" class="unmuteButton mediaButton" onclick="MediaPlayer.unMute();"></paper-icon-button>';
|
||||
|
||||
html += '<paper-slider pin step="1" min="0" max="100" value="0" class="videoVolumeSlider" style="width:100px;vertical-align:middle;margin-left:-1em;"></paper-slider>';
|
||||
|
||||
html += '<paper-icon-button icon="fullscreen" class="mediaButton fullscreenButton" onclick="MediaPlayer.toggleFullscreen();" id="video-fullscreenButton"></paper-icon-button>';
|
||||
|
||||
html += '</div>'; // videoControls
|
||||
|
||||
html += '</div>'; // videoPlayer
|
||||
html += '</div>'; // videoBackdrop
|
||||
html += '</div>'; // mediaPlayer
|
||||
|
||||
$(document.body).append(html);
|
||||
|
||||
var mediaPlayerElem = $('#mediaPlayer', document.body);
|
||||
mediaPlayerElem.trigger('create');
|
||||
}
|
||||
|
||||
Dashboard.ready(function () {
|
||||
|
||||
ensureVideoPlayerElements();
|
||||
|
||||
var parent = $("#mediaPlayer");
|
||||
|
||||
muteButton = $('.muteButton', parent);
|
||||
unmuteButton = $('.unmuteButton', parent);
|
||||
currentTimeElement = $('.currentTime', parent);
|
||||
positionSlider = $(".positionSlider", parent).on('slidestart', function (e) {
|
||||
|
||||
isPositionSliderActive = true;
|
||||
positionSlider = $(".videoPositionSlider", parent).on('change', onPositionSliderChange)[0];
|
||||
|
||||
}).on('slidestop', onPositionSliderChange);
|
||||
positionSlider._setPinValue = function (value) {
|
||||
|
||||
volumeSlider = $('.volumeSlider', parent).on('slidestop', function () {
|
||||
if (!self.currentMediaSource || !self.currentMediaSource.RunTimeTicks) {
|
||||
this.pinValue = '--:--';
|
||||
return;
|
||||
}
|
||||
|
||||
var ticks = self.currentMediaSource.RunTimeTicks;
|
||||
ticks /= 100;
|
||||
ticks *= value;
|
||||
|
||||
this.pinValue = Dashboard.getDisplayTime(ticks);
|
||||
};
|
||||
|
||||
volumeSlider = $('.videoVolumeSlider', parent).on('change', function () {
|
||||
|
||||
var vol = this.value;
|
||||
|
||||
updateVolumeButtons(vol);
|
||||
self.setVolume(vol * 100);
|
||||
});
|
||||
|
||||
var trackChange = false;
|
||||
|
||||
var tooltip = $('<div id="slider-tooltip"></div>');
|
||||
|
||||
$(".videoControls .positionSliderContainer .slider").on("change", function (e) {
|
||||
if (!trackChange) return;
|
||||
|
||||
var pct = $(this).val();
|
||||
|
||||
var time = self.currentDurationTicks * (Number(pct) * .01);
|
||||
|
||||
var tooltext = Dashboard.getDisplayTime(time);
|
||||
|
||||
tooltip.text(tooltext);
|
||||
|
||||
Logger.log("slidin", pct, self.currentDurationTicks, time);
|
||||
|
||||
}).on("slidestart", function (e) {
|
||||
trackChange = true;
|
||||
|
||||
var handle = $(".videoControls .positionSliderContainer .ui-slider-handle");
|
||||
|
||||
handle.after(tooltip);
|
||||
}).on("slidestop", function (e) {
|
||||
trackChange = false;
|
||||
|
||||
tooltip.remove();
|
||||
});
|
||||
self.setVolume(vol);
|
||||
})[0];
|
||||
});
|
||||
|
||||
var idleHandlerTimeout;
|
||||
|
@ -684,240 +858,6 @@
|
|||
return html;
|
||||
}
|
||||
|
||||
function getAudioTracksHtml() {
|
||||
|
||||
var streams = self.currentMediaSource.MediaStreams.filter(function (currentStream) {
|
||||
return currentStream.Type == "Audio";
|
||||
});
|
||||
|
||||
var currentIndex = getParameterByName('AudioStreamIndex', self.getCurrentSrc(self.currentMediaRenderer));
|
||||
|
||||
var html = '';
|
||||
html += '<div class="videoPlayerPopupContent">';
|
||||
html += '<ul data-role="listview" data-inset="true"><li data-role="list-divider">' + Globalize.translate('HeaderAudioTracks') + '</li>';
|
||||
html += '</ul>';
|
||||
|
||||
html += '<div class="videoPlayerPopupScroller">';
|
||||
html += '<ul data-role="listview" data-inset="true">';
|
||||
|
||||
html += streams.map(function (stream) {
|
||||
|
||||
var cssClass = "mediaPopupOption";
|
||||
|
||||
var selected = stream.Index == currentIndex;
|
||||
|
||||
// Need to embed onclick handler due to delegation not working in iOS cordova
|
||||
var onclick = '';
|
||||
|
||||
if (selected) {
|
||||
cssClass += ' selectedMediaPopupOption';
|
||||
} else {
|
||||
onclick = ' onclick="MediaPlayer.onAudioOptionSelected(this);"';
|
||||
}
|
||||
|
||||
var optionHtml = '<li><a' + onclick + ' data-value="' + stream.Index + '" class="' + cssClass + '" href="#">';
|
||||
|
||||
optionHtml += '<p style="margin:0;">';
|
||||
|
||||
if (selected) {
|
||||
optionHtml += '<img src="css/images/checkmarkgreen.png" style="width:18px;border-radius:3px;margin-right:.5em;vertical-align:middle;" />';
|
||||
}
|
||||
|
||||
var textLines = [];
|
||||
textLines.push(stream.Language || Globalize.translate('LabelUnknownLanguage'));
|
||||
|
||||
var attributes = [];
|
||||
|
||||
if (stream.Codec) {
|
||||
attributes.push(stream.Codec);
|
||||
}
|
||||
if (stream.Profile) {
|
||||
attributes.push(stream.Profile);
|
||||
}
|
||||
|
||||
if (stream.BitRate) {
|
||||
attributes.push((Math.floor(stream.BitRate / 1000)) + ' kbps');
|
||||
}
|
||||
|
||||
if (stream.Channels) {
|
||||
attributes.push(stream.Channels + ' ch');
|
||||
}
|
||||
|
||||
if (stream.IsDefault) {
|
||||
attributes.push('(D)');
|
||||
}
|
||||
|
||||
if (attributes.length) {
|
||||
textLines.push(attributes.join(' • '));
|
||||
}
|
||||
|
||||
optionHtml += textLines.join('<br/>');
|
||||
|
||||
optionHtml += '</p>';
|
||||
|
||||
optionHtml += '</a></li>';
|
||||
|
||||
return optionHtml;
|
||||
|
||||
}).join('');
|
||||
|
||||
html += '</ul>';
|
||||
html += '</div>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function getSubtitleTracksHtml() {
|
||||
|
||||
var streams = self.currentMediaSource.MediaStreams.filter(function (currentStream) {
|
||||
return currentStream.Type == "Subtitle";
|
||||
});
|
||||
|
||||
var currentIndex = self.currentSubtitleStreamIndex || -1;
|
||||
|
||||
streams.unshift({
|
||||
Index: -1,
|
||||
Language: "Off"
|
||||
});
|
||||
|
||||
var html = '';
|
||||
html += '<div class="videoPlayerPopupContent">';
|
||||
html += '<ul data-role="listview" data-inset="true"><li data-role="list-divider">' + Globalize.translate('HeaderSubtitles') + '</li>';
|
||||
html += '</ul>';
|
||||
|
||||
html += '<div class="videoPlayerPopupScroller">';
|
||||
html += '<ul data-role="listview" data-inset="true">';
|
||||
|
||||
html += streams.map(function (stream) {
|
||||
|
||||
var cssClass = "mediaPopupOption";
|
||||
|
||||
var selected = stream.Index == currentIndex;
|
||||
|
||||
// Need to embed onclick handler due to delegation not working in iOS cordova
|
||||
var onclick = '';
|
||||
|
||||
if (selected) {
|
||||
cssClass += ' selectedMediaPopupOption';
|
||||
} else {
|
||||
onclick = ' onclick="MediaPlayer.onSubtitleOptionSelected(this);"';
|
||||
}
|
||||
|
||||
var optionHtml = '<li><a' + onclick + ' data-value="' + stream.Index + '" class="' + cssClass + '" href="#">';
|
||||
|
||||
optionHtml += '<p style="margin:0;">';
|
||||
|
||||
if (selected) {
|
||||
optionHtml += '<img src="css/images/checkmarkgreen.png" style="width:18px;border-radius:3px;margin-right:.5em;vertical-align:middle;" />';
|
||||
}
|
||||
|
||||
var textLines = [];
|
||||
textLines.push(stream.Language || Globalize.translate('LabelUnknownLanguage'));
|
||||
|
||||
if (stream.Codec) {
|
||||
textLines.push(stream.Codec);
|
||||
}
|
||||
|
||||
var attributes = [];
|
||||
|
||||
if (stream.IsDefault) {
|
||||
attributes.push('Default');
|
||||
}
|
||||
if (stream.IsForced) {
|
||||
attributes.push('Forced');
|
||||
}
|
||||
if (stream.IsExternal) {
|
||||
attributes.push('External');
|
||||
}
|
||||
|
||||
if (attributes.length) {
|
||||
textLines.push(attributes.join(' • '));
|
||||
}
|
||||
|
||||
optionHtml += textLines.join('<br/>');
|
||||
|
||||
optionHtml += '</p>';
|
||||
|
||||
optionHtml += '</a></li>';
|
||||
|
||||
return optionHtml;
|
||||
|
||||
}).join('');
|
||||
|
||||
html += '</ul>';
|
||||
html += '</div>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function getQualityFlyoutHtml() {
|
||||
|
||||
var currentSrc = self.getCurrentSrc(self.currentMediaRenderer).toLowerCase();
|
||||
var isStatic = currentSrc.indexOf('static=true') != -1;
|
||||
|
||||
var videoStream = self.currentMediaSource.MediaStreams.filter(function (stream) {
|
||||
return stream.Type == "Video";
|
||||
})[0];
|
||||
var videoWidth = videoStream ? videoStream.Width : null;
|
||||
var videoHeight = videoStream ? videoStream.Height : null;
|
||||
|
||||
var options = self.getVideoQualityOptions(videoWidth, videoHeight);
|
||||
|
||||
if (isStatic) {
|
||||
options[0].name = "Direct";
|
||||
}
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<div class="videoPlayerPopupContent">';
|
||||
html += '<ul data-role="listview" data-inset="true"><li data-role="list-divider">' + Globalize.translate('HeaderVideoQuality') + '</li>';
|
||||
html += '</ul>';
|
||||
|
||||
html += '<div class="videoPlayerPopupScroller">';
|
||||
html += '<ul data-role="listview" data-inset="true">';
|
||||
|
||||
html += options.map(function (option) {
|
||||
|
||||
var cssClass = "mediaPopupOption";
|
||||
// Need to embed onclick handler due to delegation not working in iOS cordova
|
||||
var onclick = '';
|
||||
|
||||
if (option.selected) {
|
||||
cssClass += ' selectedMediaPopupOption';
|
||||
} else {
|
||||
onclick = ' onclick="MediaPlayer.onQualityOptionSelected(this);"';
|
||||
}
|
||||
|
||||
var optionHtml = '<li><a' + onclick + ' data-value="' + option.bitrate + '" class="' + cssClass + '" href="#">';
|
||||
|
||||
optionHtml += '<p style="margin:0;">';
|
||||
|
||||
if (option.selected) {
|
||||
optionHtml += '<img src="css/images/checkmarkgreen.png" style="width:18px;border-radius:3px;margin-right:.5em;vertical-align:middle;" />';
|
||||
}
|
||||
|
||||
optionHtml += option.name;
|
||||
|
||||
optionHtml += '</p>';
|
||||
|
||||
optionHtml += '</a></li>';
|
||||
|
||||
return optionHtml;
|
||||
|
||||
}).join('');
|
||||
|
||||
html += '</ul>';
|
||||
html += '</div>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function bindEventsForPlayback() {
|
||||
|
||||
var hideElementsOnIdle = true;
|
||||
|
@ -1117,11 +1057,11 @@
|
|||
}
|
||||
|
||||
if (AppInfo.hasPhysicalVolumeButtons) {
|
||||
$('.volumeSliderContainer', videoControls).addClass('hide');
|
||||
$(volumeSlider).visible(false);
|
||||
$('.muteButton', videoControls).addClass('hide');
|
||||
$('.unmuteButton', videoControls).addClass('hide');
|
||||
} else {
|
||||
$('.volumeSliderContainer', videoControls).removeClass('hide');
|
||||
$(volumeSlider).visible(true);
|
||||
$('.muteButton', videoControls).removeClass('hide');
|
||||
$('.unmuteButton', videoControls).removeClass('hide');
|
||||
}
|
||||
|
@ -1138,7 +1078,7 @@
|
|||
|
||||
mediaRenderer.volume(initialVolume);
|
||||
|
||||
volumeSlider.val(initialVolume).slider('refresh');
|
||||
volumeSlider.value = initialVolume * 100;
|
||||
updateVolumeButtons(initialVolume);
|
||||
|
||||
$(mediaRenderer).on("volumechange.mediaplayerevent", function (e) {
|
||||
|
@ -1173,7 +1113,7 @@
|
|||
|
||||
}).on("timeupdate.mediaplayerevent", function () {
|
||||
|
||||
if (!isPositionSliderActive) {
|
||||
if (!positionSlider.dragging) {
|
||||
|
||||
self.setCurrentTime(self.getCurrentTicks(this), positionSlider, currentTimeElement);
|
||||
}
|
||||
|
@ -1226,7 +1166,7 @@
|
|||
|
||||
self.currentSubtitleStreamIndex = mediaSource.DefaultSubtitleStreamIndex;
|
||||
|
||||
$('body').addClass('bodyWithPopupOpen');
|
||||
$(document.body).addClass('bodyWithPopupOpen');
|
||||
|
||||
self.currentMediaRenderer = mediaRenderer;
|
||||
self.currentDurationTicks = self.currentMediaSource.RunTimeTicks;
|
||||
|
|
|
@ -599,13 +599,14 @@
|
|||
var percent = ticks / self.currentDurationTicks;
|
||||
percent *= 100;
|
||||
|
||||
positionSlider.val(percent).slider('enable').slider('refresh');
|
||||
positionSlider.disabled = false;
|
||||
positionSlider.value = percent;
|
||||
}
|
||||
} else {
|
||||
|
||||
if (positionSlider) {
|
||||
|
||||
positionSlider.slider('disable').slider('refresh');
|
||||
positionSlider.disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1552,7 +1553,7 @@
|
|||
|
||||
Logger.log('playback stopped');
|
||||
|
||||
$('body').removeClass('bodyWithPopupOpen');
|
||||
$(document.body).removeClass('bodyWithPopupOpen');
|
||||
|
||||
var mediaRenderer = this;
|
||||
|
||||
|
|
|
@ -9,12 +9,9 @@
|
|||
var unmuteButton;
|
||||
var muteButton;
|
||||
var volumeSlider;
|
||||
var volumeSliderContainer;
|
||||
var isVolumeSliderActive;
|
||||
var unpauseButton;
|
||||
var pauseButton;
|
||||
var positionSlider;
|
||||
var isPositionSliderActive;
|
||||
|
||||
var lastPlayerState;
|
||||
|
||||
|
@ -25,12 +22,17 @@
|
|||
// add return false because on iOS clicking the bar often ends up clicking the content underneath.
|
||||
html += '<div class="nowPlayingBar" style="display:none;">';
|
||||
|
||||
html += '<div class="nowPlayingBarPositionContainer">';
|
||||
html += '<paper-slider pin step=".1" min="0" max="100" value="0" class="nowPlayingBarPositionSlider"></paper-slider>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="nowPlayingBarInfoContainer">';
|
||||
html += '<div class="nowPlayingImage"></div>';
|
||||
html += '<div class="nowPlayingText"></div>';
|
||||
html += '<div class="nowPlayingBarText"></div>';
|
||||
html += '</div>';
|
||||
|
||||
// The onclicks are needed due to the return false above
|
||||
html += '<paper-icon-button icon="tablet-android" onclick="Dashboard.navigate(\'nowplaying.html\', false);" class="mediaButton remoteControlButton"></paper-icon-button>';
|
||||
html += '<paper-icon-button icon="view-list" onclick="Dashboard.navigate(\'nowplaying.html?tab=Playlist\', false);" class="mediaButton playlistButton"></paper-icon-button>';
|
||||
html += '<div class="nowPlayingBarCenter">';
|
||||
|
||||
html += '<paper-icon-button icon="skip-previous" class="previousTrackButton mediaButton"></paper-icon-button>';
|
||||
|
||||
|
@ -41,23 +43,26 @@
|
|||
|
||||
html += '<paper-icon-button icon="skip-next" class="nextTrackButton mediaButton"></paper-icon-button>';
|
||||
|
||||
html += '<div id="mediaElement"></div>';
|
||||
|
||||
html += '<div class="positionSliderContainer sliderContainer">';
|
||||
html += '<input type="range" class="mediaSlider positionSlider slider" step=".001" min="0" max="100" value="0" style="display:none;" data-mini="true" data-theme="a" data-highlight="true" />';
|
||||
html += '<div class="nowPlayingBarCurrentTime"></div>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="currentTime"></div>';
|
||||
html += '<div class="nowPlayingBarRight">';
|
||||
|
||||
html += '<paper-icon-button icon="volume-up" class="muteButton mediaButton"></paper-icon-button>';
|
||||
html += '<paper-icon-button icon="volume-off" class="unmuteButton mediaButton"></paper-icon-button>';
|
||||
|
||||
html += '<div class="volumeSliderContainer sliderContainer">';
|
||||
html += '<input type="range" class="mediaSlider volumeSlider slider" step=".05" min="0" max="100" value="0" style="display:none;" data-mini="true" data-theme="a" data-highlight="true" />';
|
||||
html += '</div>';
|
||||
html += '<paper-slider pin step="1" min="0" max="100" value="0" class="nowPlayingBarVolumeSlider" style="width:100px;vertical-align:middle;"></paper-slider>';
|
||||
|
||||
html += '<div class="nowPlayingBarUserDataButtons">';
|
||||
html += '</div>';
|
||||
|
||||
html += '<paper-icon-button icon="play-arrow" class="mediaButton unpauseButton"></paper-icon-button>';
|
||||
html += '<paper-icon-button icon="pause" class="mediaButton pauseButton"></paper-icon-button>';
|
||||
html += '<paper-icon-button icon="tablet-android" onclick="Dashboard.navigate(\'nowplaying.html\', false);" class="mediaButton remoteControlButton"></paper-icon-button>';
|
||||
html += '<paper-icon-button icon="queue-music" onclick="Dashboard.navigate(\'nowplaying.html?tab=Playlist\', false);" class="mediaButton playlistButton"></paper-icon-button>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
return html;
|
||||
|
@ -65,9 +70,9 @@
|
|||
|
||||
function bindEvents(elem) {
|
||||
|
||||
currentTimeElement = $('.currentTime', elem);
|
||||
currentTimeElement = $('.nowPlayingBarCurrentTime', elem);
|
||||
nowPlayingImageElement = $('.nowPlayingImage', elem);
|
||||
nowPlayingTextElement = $('.nowPlayingText', elem);
|
||||
nowPlayingTextElement = $('.nowPlayingBarText', elem);
|
||||
nowPlayingUserData = $('.nowPlayingBarUserDataButtons', elem);
|
||||
|
||||
$(elem).on('swipeup', function () {
|
||||
|
@ -123,28 +128,15 @@
|
|||
}
|
||||
});
|
||||
|
||||
volumeSlider = $('.volumeSlider', elem).on('slidestart', function () {
|
||||
|
||||
isVolumeSliderActive = true;
|
||||
|
||||
}).on('slidestop', function () {
|
||||
|
||||
isVolumeSliderActive = false;
|
||||
volumeSlider = $('.nowPlayingBarVolumeSlider', elem).on('change', function () {
|
||||
|
||||
if (currentPlayer) {
|
||||
currentPlayer.setVolume(this.value);
|
||||
}
|
||||
});
|
||||
|
||||
volumeSliderContainer = $('.volumeSliderContainer', elem);
|
||||
})[0];
|
||||
|
||||
positionSlider = $('.positionSlider', elem).on('slidestart', function () {
|
||||
|
||||
isPositionSliderActive = true;
|
||||
|
||||
}).on('slidestop', function () {
|
||||
|
||||
isPositionSliderActive = false;
|
||||
positionSlider = $('.nowPlayingBarPositionSlider', elem).on('change', function () {
|
||||
|
||||
if (currentPlayer && lastPlayerState) {
|
||||
|
||||
|
@ -153,7 +145,24 @@
|
|||
|
||||
currentPlayer.seek(Math.floor(newPositionTicks));
|
||||
}
|
||||
});
|
||||
|
||||
})[0];
|
||||
|
||||
positionSlider._setPinValue = function (value) {
|
||||
|
||||
var state = lastPlayerState;
|
||||
|
||||
if (!state || !state.NowPlayingItem || !state.NowPlayingItem.RunTimeTicks) {
|
||||
this.pinValue = '--:--';
|
||||
return;
|
||||
}
|
||||
|
||||
var ticks = state.NowPlayingItem.RunTimeTicks;
|
||||
ticks /= 100;
|
||||
ticks *= value;
|
||||
|
||||
this.pinValue = Dashboard.getDisplayTime(ticks);
|
||||
};
|
||||
}
|
||||
|
||||
function getNowPlayingBar() {
|
||||
|
@ -212,27 +221,21 @@
|
|||
updatePlayerVolumeState(state, playerInfo);
|
||||
|
||||
var nowPlayingItem = state.NowPlayingItem || {};
|
||||
if (!isPositionSliderActive) {
|
||||
if (!positionSlider.dragging) {
|
||||
|
||||
if (nowPlayingItem && nowPlayingItem.RunTimeTicks) {
|
||||
|
||||
var pct = playState.PositionTicks / nowPlayingItem.RunTimeTicks;
|
||||
pct *= 100;
|
||||
|
||||
positionSlider.val(pct);
|
||||
positionSlider.value = pct;
|
||||
|
||||
} else {
|
||||
|
||||
positionSlider.val(0);
|
||||
positionSlider.value = 0;
|
||||
}
|
||||
|
||||
if (playState.CanSeek) {
|
||||
positionSlider.slider("enable");
|
||||
} else {
|
||||
positionSlider.slider("disable");
|
||||
}
|
||||
|
||||
positionSlider.slider('refresh');
|
||||
positionSlider.disabled = !playState.CanSeek;
|
||||
}
|
||||
|
||||
var timeText = Dashboard.getDisplayTime(playState.PositionTicks);
|
||||
|
@ -263,12 +266,6 @@
|
|||
var showUnmuteButton = true;
|
||||
var showVolumeSlider = true;
|
||||
|
||||
//if (supportedCommands.indexOf('SetVolume') == -1) {
|
||||
// volumeSlider.prop('disabled', 'disabled');
|
||||
//} else {
|
||||
// volumeSlider.prop('disabled', '');
|
||||
//}
|
||||
|
||||
if (supportedCommands.indexOf('Mute') == -1) {
|
||||
showMuteButton = false;
|
||||
}
|
||||
|
@ -307,17 +304,11 @@
|
|||
hideButton(unmuteButton);
|
||||
}
|
||||
|
||||
if (showVolumeSlider) {
|
||||
volumeSliderContainer.show();
|
||||
} else {
|
||||
volumeSliderContainer.hide();
|
||||
}
|
||||
$(volumeSlider).visible(showVolumeSlider);
|
||||
|
||||
if (!isVolumeSliderActive) {
|
||||
volumeSlider.val(playState.VolumeLevel || 0);
|
||||
if (!volumeSlider.dragging) {
|
||||
volumeSlider.value = playState.VolumeLevel || 0;
|
||||
}
|
||||
|
||||
volumeSlider.slider('refresh');
|
||||
}
|
||||
|
||||
var currentImgUrl;
|
||||
|
@ -338,7 +329,7 @@
|
|||
nowPlayingTextElement.html(nameHtml);
|
||||
|
||||
var url;
|
||||
var imgHeight = 60;
|
||||
var imgHeight = 90;
|
||||
|
||||
var nowPlayingItem = state.NowPlayingItem;
|
||||
|
||||
|
@ -386,9 +377,6 @@
|
|||
|
||||
var imgHtml = '<img src="' + url + '" />';
|
||||
|
||||
if (state.NowPlayingItem.Id) {
|
||||
imgHtml = '<a href="' + LibraryBrowser.getHref(state.NowPlayingItem) + '">' + imgHtml + '</a>';
|
||||
}
|
||||
nowPlayingImageElement.html(imgHtml);
|
||||
|
||||
if (nowPlayingItem.Id) {
|
||||
|
|
|
@ -1844,80 +1844,6 @@ var AppInfo = {};
|
|||
initFastClick();
|
||||
}
|
||||
|
||||
var videoPlayerHtml = '<div id="mediaPlayer" data-theme="b" class="ui-bar-b" style="display: none;">';
|
||||
|
||||
videoPlayerHtml += '<div class="videoBackdrop">';
|
||||
videoPlayerHtml += '<div id="videoPlayer">';
|
||||
|
||||
videoPlayerHtml += '<div id="videoElement">';
|
||||
videoPlayerHtml += '<div id="play" class="status"></div>';
|
||||
videoPlayerHtml += '<div id="pause" class="status"></div>';
|
||||
videoPlayerHtml += '</div>';
|
||||
|
||||
videoPlayerHtml += '<div class="videoTopControls hiddenOnIdle">';
|
||||
videoPlayerHtml += '<div class="videoTopControlsLogo"></div>';
|
||||
videoPlayerHtml += '<div class="videoAdvancedControls">';
|
||||
|
||||
videoPlayerHtml += '<button class="mediaButton videoTrackControl previousTrackButton imageButton" title="Previous video" type="button" onclick="MediaPlayer.previousTrack();" data-role="none"><i class="fa fa-step-backward"></i></button>';
|
||||
videoPlayerHtml += '<button class="mediaButton videoTrackControl nextTrackButton imageButton" title="Next video" type="button" onclick="MediaPlayer.nextTrack();" data-role="none"><i class="fa fa-step-forward"></i></button>';
|
||||
|
||||
// Embedding onclicks due to issues not firing in cordova safari
|
||||
videoPlayerHtml += '<button class="mediaButton videoAudioButton imageButton" title="Audio tracks" type="button" data-role="none" onclick="MediaPlayer.showAudioTracksFlyout();"><i class="fa fa-music"></i></button>';
|
||||
videoPlayerHtml += '<div data-role="popup" class="videoAudioPopup videoPlayerPopup" data-history="false" data-theme="b"></div>';
|
||||
|
||||
videoPlayerHtml += '<button class="mediaButton videoSubtitleButton imageButton" title="Subtitles" type="button" data-role="none" onclick="MediaPlayer.showSubtitleMenu();"><i class="fa fa-text-width"></i></button>';
|
||||
videoPlayerHtml += '<div data-role="popup" class="videoSubtitlePopup videoPlayerPopup" data-history="false" data-theme="b"></div>';
|
||||
|
||||
videoPlayerHtml += '<button class="mediaButton videoChaptersButton imageButton" title="Scenes" type="button" data-role="none" onclick="MediaPlayer.showChaptersFlyout();"><i class="fa fa-video-camera"></i></button>';
|
||||
videoPlayerHtml += '<div data-role="popup" class="videoChaptersPopup videoPlayerPopup" data-history="false" data-theme="b"></div>';
|
||||
|
||||
videoPlayerHtml += '<button class="mediaButton videoQualityButton imageButton" title="Quality" type="button" data-role="none" onclick="MediaPlayer.showQualityFlyout();"><i class="fa fa-gear"></i></button>';
|
||||
videoPlayerHtml += '<div data-role="popup" class="videoQualityPopup videoPlayerPopup" data-history="false" data-theme="b"></div>';
|
||||
|
||||
videoPlayerHtml += '<button class="mediaButton imageButton" title="Stop" type="button" onclick="MediaPlayer.stop();" data-role="none"><i class="fa fa-close"></i></button>';
|
||||
|
||||
videoPlayerHtml += '</div>'; // videoAdvancedControls
|
||||
videoPlayerHtml += '</div>'; // videoTopControls
|
||||
|
||||
// Create controls
|
||||
videoPlayerHtml += '<div class="videoControls hiddenOnIdle">';
|
||||
|
||||
videoPlayerHtml += '<div class="nowPlayingInfo hiddenOnIdle">';
|
||||
videoPlayerHtml += '<div class="nowPlayingImage"></div>';
|
||||
videoPlayerHtml += '<div class="nowPlayingTabs"></div>';
|
||||
videoPlayerHtml += '</div>'; // nowPlayingInfo
|
||||
|
||||
videoPlayerHtml += '<button id="video-previousTrackButton" class="mediaButton previousTrackButton videoTrackControl imageButton" title="Previous Track" type="button" onclick="MediaPlayer.previousTrack();" data-role="none"><i class="fa fa-step-backward"></i></button>';
|
||||
videoPlayerHtml += '<button id="video-playButton" class="mediaButton imageButton" title="Play" type="button" onclick="MediaPlayer.unpause();" data-role="none"><i class="fa fa-play"></i></button>';
|
||||
videoPlayerHtml += '<button id="video-pauseButton" class="mediaButton imageButton" title="Pause" type="button" onclick="MediaPlayer.pause();" data-role="none"><i class="fa fa-pause"></i></button>';
|
||||
videoPlayerHtml += '<button id="video-nextTrackButton" class="mediaButton nextTrackButton videoTrackControl imageButton" title="Next Track" type="button" onclick="MediaPlayer.nextTrack();" data-role="none"><i class="fa fa-step-forward"></i></button>';
|
||||
|
||||
videoPlayerHtml += '<div class="positionSliderContainer sliderContainer">';
|
||||
videoPlayerHtml += '<input type="range" class="mediaSlider positionSlider slider" step=".001" min="0" max="100" value="0" style="display:none;" data-mini="true" data-theme="a" data-highlight="true" />';
|
||||
videoPlayerHtml += '</div>';
|
||||
|
||||
videoPlayerHtml += '<div class="currentTime">--:--</div>';
|
||||
|
||||
videoPlayerHtml += '<button id="video-muteButton" class="mediaButton muteButton imageButton" title="Mute" type="button" onclick="MediaPlayer.mute();" data-role="none"><i class="fa fa-volume-up"></i></button>';
|
||||
videoPlayerHtml += '<button id="video-unmuteButton" class="mediaButton unmuteButton imageButton" title="Unmute" type="button" onclick="MediaPlayer.unMute();" data-role="none"><i class="fa fa-volume-off"></i></button>';
|
||||
|
||||
videoPlayerHtml += '<div class="volumeSliderContainer sliderContainer">';
|
||||
videoPlayerHtml += '<input type="range" class="mediaSlider volumeSlider slider" step=".05" min="0" max="1" value="0" style="display:none;" data-mini="true" data-theme="a" data-highlight="true" />';
|
||||
videoPlayerHtml += '</div>';
|
||||
|
||||
videoPlayerHtml += '<button onclick="MediaPlayer.toggleFullscreen();" id="video-fullscreenButton" class="mediaButton fullscreenButton imageButton" title="Fullscreen" type="button" data-role="none"><i class="fa fa-expand"></i></button>';
|
||||
|
||||
videoPlayerHtml += '</div>'; // videoControls
|
||||
|
||||
videoPlayerHtml += '</div>'; // videoPlayer
|
||||
videoPlayerHtml += '</div>'; // videoBackdrop
|
||||
videoPlayerHtml += '</div>'; // mediaPlayer
|
||||
|
||||
$(document.body).append(videoPlayerHtml);
|
||||
|
||||
var mediaPlayerElem = $('#mediaPlayer', document.body);
|
||||
mediaPlayerElem.trigger('create');
|
||||
|
||||
var footerHtml = '<div id="footer" class="footer" data-theme="b" class="ui-bar-b">';
|
||||
|
||||
footerHtml += '<div id="footerNotifications"></div>';
|
||||
|
@ -1925,8 +1851,6 @@ var AppInfo = {};
|
|||
|
||||
$(document.body).append(footerHtml);
|
||||
|
||||
$(Dashboard).trigger('footercreated');
|
||||
|
||||
$(window).on("beforeunload", function () {
|
||||
|
||||
var apiClient = window.ApiClient;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue