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

fixes for mobile playback

This commit is contained in:
Luke Pulverenti 2013-05-24 10:35:15 -04:00
parent 85dc707032
commit ed0f918ac6
3 changed files with 17 additions and 14 deletions

View file

@ -31,6 +31,8 @@
<div id="divVirtualFolders"></div> <div id="divVirtualFolders"></div>
</div> </div>
</div> </div>
<br />
<div>Define images for collections by <a href="index.html">browsing and editing.</a></div>
</div> </div>
</div> </div>
<div data-role="popup" id="popupEnterText" class="ui-corner-all popup"> <div data-role="popup" id="popupEnterText" class="ui-corner-all popup">

View file

@ -103,8 +103,8 @@
html += '</ul>'; html += '</ul>';
html += '<p>'; html += '<p>';
html += '<button type="button" data-inline="true" data-icon="minus" data-folderindex="' + index + '" onclick="MediaLibraryPage.deleteVirtualFolder(this);">Remove collection</button>'; html += '<button type="button" data-inline="true" data-icon="minus" data-folderindex="' + index + '" onclick="MediaLibraryPage.deleteVirtualFolder(this);" data-mini="true">Remove collection</button>';
html += '<button type="button" data-inline="true" data-icon="pencil" data-folderindex="' + index + '" onclick="MediaLibraryPage.renameVirtualFolder(this);">Rename collection</button>'; html += '<button type="button" data-inline="true" data-icon="pencil" data-folderindex="' + index + '" onclick="MediaLibraryPage.renameVirtualFolder(this);" data-mini="true">Rename collection</button>';
html += '</p>'; html += '</p>';
html += '</div>'; html += '</div>';

View file

@ -35,13 +35,13 @@
} }
} }
} }
function isFullScreen() { function isFullScreen() {
return document.fullscreenEnabled || document.mozFullscreenEnabled || document.webkitIsFullScreen ? true : false; return document.fullscreenEnabled || document.mozFullscreenEnabled || document.webkitIsFullScreen ? true : false;
} }
$(document).on('webkitfullscreenchange mozfullscreenchange fullscreenchange', function() { $(document).on('webkitfullscreenchange mozfullscreenchange fullscreenchange', function () {
if (isFullScreen()) { if (isFullScreen()) {
$('.itemVideo').addClass('fullscreenVideo'); $('.itemVideo').addClass('fullscreenVideo');
} else { } else {
@ -285,7 +285,12 @@
var html = ''; var html = '';
html += '<audio preload="auto" autoplay>'; // Can't autoplay in these browsers so we need to use the full controls
if ($.browser.msie || $.browser.android || $.browser.iphone || $.browser.ipad) {
html += '<audio preload="auto" autoplay controls>';
} else {
html += '<audio preload="auto" style="display:none;" autoplay>';
}
html += '<source type="audio/mpeg" src="' + mp3Url + '" />'; html += '<source type="audio/mpeg" src="' + mp3Url + '" />';
html += '<source type="audio/aac" src="' + aacUrl + '" />'; html += '<source type="audio/aac" src="' + aacUrl + '" />';
html += '<source type="audio/webm" src="' + webmUrl + '" />'; html += '<source type="audio/webm" src="' + webmUrl + '" />';
@ -328,7 +333,7 @@
currentTimeElement.show(); currentTimeElement.show();
audioElement.removeAttr('controls').hide().off("play.once"); audioElement.off("play.once");
ApiClient.reportPlaybackStart(Dashboard.getCurrentUserId(), item.Id); ApiClient.reportPlaybackStart(Dashboard.getCurrentUserId(), item.Id);
@ -454,8 +459,8 @@
// HLS must be at the top for safari // HLS must be at the top for safari
// Webm must be ahead of mp4 due to the issue of mp4 playing too fast in chrome // Webm must be ahead of mp4 due to the issue of mp4 playing too fast in chrome
// Can't autoplay in ie so need to use the full controls // Can't autoplay in these browsers so we need to use the full controls
if ($.browser.msie) { if ($.browser.msie || $.browser.android || $.browser.iphone || $.browser.ipad) {
html += '<video class="itemVideo" preload="auto" autoplay controls>'; html += '<video class="itemVideo" preload="auto" autoplay controls>';
} else { } else {
html += '<video class="itemVideo" preload="auto" autoplay>'; html += '<video class="itemVideo" preload="auto" autoplay>';
@ -552,10 +557,6 @@
self.canPlayMediaType = function (mediaType) { self.canPlayMediaType = function (mediaType) {
if ($.browser.android || $.browser.iphone || $.browser.ipad) {
return false;
}
var media; var media;
if (mediaType === "Video") { if (mediaType === "Video") {