Compare commits
31 Commits
v1.6.6.4
...
14c0eb43ed
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14c0eb43ed | ||
|
|
c4cbeda2b8 | ||
|
|
53ad568be4 | ||
|
|
fba64bd0f6 | ||
|
|
3da16c4c5c | ||
|
|
c7cd7be3ee | ||
|
|
6d90523eef | ||
|
|
2a3e8057a1 | ||
|
|
42026b0ee8 | ||
|
|
64dbc3cfd3 | ||
|
|
c998266dd7 | ||
|
|
9b941e5a77 | ||
|
|
1d70d7166d | ||
|
|
5331f0faf1 | ||
|
|
0508188705 | ||
|
|
cc861f4263 | ||
|
|
10e6cdc4a2 | ||
|
|
a8c7faab6b | ||
|
|
6df390fa18 | ||
|
|
d0c3d7ee4d | ||
|
|
bc621aacdf | ||
|
|
73eb30d671 | ||
|
|
2cfbec95c9 | ||
|
|
08fc29cba3 | ||
|
|
0d6b835486 | ||
|
|
bf620e447f | ||
|
|
3117d627dd | ||
|
|
71402f7e86 | ||
|
|
cce202b88d | ||
|
|
1d334e4d95 | ||
|
|
142063ce63 |
@@ -241,7 +241,7 @@
|
||||
<span>Start Muted</span>
|
||||
</label>
|
||||
<div class="fieldDescription">Start trailer video playback muted. (Known issue: In the
|
||||
Android/IOS app, backdrop trailers are always muted.)</div>
|
||||
Android/IOS app, backdrop trailers are always muted.)<br><b style="color:#ffcc00">Warning:</b> Disabling this may cause autoplay to fail on certain browsers due to strict autoplay policies.</div>
|
||||
</div>
|
||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||
<label>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
||||
<Title>Jellyfin Media Bar Enhanced Plugin</Title>
|
||||
<Authors>CodeDevMLH</Authors>
|
||||
<Version>1.6.6.4</Version>
|
||||
<Version>1.7.0.9</Version>
|
||||
<RepositoryUrl>https://github.com/CodeDevMLH/jellyfin-plugin-media-bar-enhanced</RepositoryUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -163,6 +163,14 @@ const isUserLoggedIn = () => {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Detects if the current device is a low-power device (Smart TVs, etc.)
|
||||
* @returns {boolean} True if running on a low-power device
|
||||
*/
|
||||
const isLowPowerDevice = () => {
|
||||
return /webOS|LG Browser|SMART-TV|SmartTV|Tizen|Viera|NetCast|Roku|VIDAA/i.test(navigator.userAgent);
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializes Jellyfin data from ApiClient
|
||||
* @param {Function} callback - Function to call once data is initialized
|
||||
@@ -744,6 +752,7 @@ const SlideUtils = {
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
videoId: videoId,
|
||||
host: 'https://www.youtube-nocookie.com',
|
||||
playerVars: {
|
||||
autoplay: 1,
|
||||
controls: 1,
|
||||
@@ -751,8 +760,15 @@ const SlideUtils = {
|
||||
rel: 0,
|
||||
playsinline: 1,
|
||||
origin: window.location.origin,
|
||||
widget_referrer: window.location.href,
|
||||
enablejsapi: 1
|
||||
},
|
||||
events: {
|
||||
'onReady': (event) => {
|
||||
const iframe = event.target.getIframe();
|
||||
if (iframe) {
|
||||
iframe.setAttribute('referrerpolicy', 'strict-origin-when-cross-origin');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1395,7 +1411,7 @@ const ApiUtils = {
|
||||
|
||||
return {
|
||||
id: trailer.Id,
|
||||
url: `${STATE.jellyfinData.serverAddress}/Videos/${trailer.Id}/stream.mp4?mediaSourceId=${mediaSourceId}&api_key=${STATE.jellyfinData.accessToken}`
|
||||
url: `${STATE.jellyfinData.serverAddress}/Videos/${trailer.Id}/stream.mp4?mediaSourceId=${mediaSourceId}&api_key=${STATE.jellyfinData.accessToken}&static=true`
|
||||
};
|
||||
}
|
||||
return null;
|
||||
@@ -1434,7 +1450,7 @@ const ApiUtils = {
|
||||
|
||||
return {
|
||||
id: video.Id,
|
||||
url: `${STATE.jellyfinData.serverAddress}/Videos/${video.Id}/stream.mp4?api_key=${STATE.jellyfinData.accessToken}`
|
||||
url: `${STATE.jellyfinData.serverAddress}/Videos/${video.Id}/stream.mp4?api_key=${STATE.jellyfinData.accessToken}&static=true`
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1660,7 +1676,7 @@ const SlideCreator = {
|
||||
|
||||
trailerUrl = {
|
||||
id: videoId,
|
||||
url: `${STATE.jellyfinData.serverAddress}/Videos/${videoId}/stream.mp4?api_key=${STATE.jellyfinData.accessToken}`
|
||||
url: `${STATE.jellyfinData.serverAddress}/Videos/${videoId}/stream.mp4?api_key=${STATE.jellyfinData.accessToken}&static=true`
|
||||
};
|
||||
} else {
|
||||
// Assume it's a standard URL (YouTube, etc.)
|
||||
@@ -1688,7 +1704,7 @@ const SlideCreator = {
|
||||
console.log(`Using local trailer fallback for ${itemId}: ${trailerUrl}`);
|
||||
}
|
||||
|
||||
const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
const isMobile = /Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
|
||||
// Client Setting Overrides
|
||||
const enableVideo = MediaBarEnhancedSettingsManager.getSetting('videoBackdrops', CONFIG.enableVideoBackdrop);
|
||||
@@ -1718,7 +1734,12 @@ const SlideCreator = {
|
||||
console.warn("Invalid trailer URL:", trailerUrl);
|
||||
}
|
||||
|
||||
if (isYoutube && videoId) {
|
||||
const isLowPower = isLowPowerDevice();
|
||||
const itemIndex = STATE.slideshow.itemIds ? STATE.slideshow.itemIds.indexOf(itemId) : -1;
|
||||
const isActiveSlide = itemIndex !== -1 && itemIndex === STATE.slideshow.currentSlideIndex;
|
||||
const shouldCreateVideo = !isLowPower || isActiveSlide;
|
||||
|
||||
if (isYoutube && videoId && shouldCreateVideo) {
|
||||
isVideo = true;
|
||||
// Create container for YouTube API
|
||||
const videoClass = CONFIG.fullWidthVideo ? "video-backdrop-full" : "video-backdrop-default";
|
||||
@@ -1751,7 +1772,6 @@ const SlideCreator = {
|
||||
loop: 0,
|
||||
playsinline: 1,
|
||||
origin: window.location.origin,
|
||||
widget_referrer: window.location.href,
|
||||
enablejsapi: 1
|
||||
};
|
||||
|
||||
@@ -1784,9 +1804,15 @@ const SlideCreator = {
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
videoId: videoId,
|
||||
host: 'https://www.youtube-nocookie.com',
|
||||
playerVars: playerVars,
|
||||
events: {
|
||||
'onReady': (event) => {
|
||||
const iframe = event.target.getIframe();
|
||||
if (iframe) {
|
||||
iframe.setAttribute('referrerpolicy', 'strict-origin-when-cross-origin');
|
||||
}
|
||||
|
||||
// Store start/end time and videoId for later use
|
||||
event.target._startTime = playerVars.start || 0;
|
||||
event.target._endTime = playerVars.end || undefined;
|
||||
@@ -1870,7 +1896,7 @@ const SlideCreator = {
|
||||
});
|
||||
|
||||
// 2. Check for local video trailers in MediaSources if yt is not available
|
||||
} else if (!isYoutube) {
|
||||
} else if (!isYoutube && shouldCreateVideo) {
|
||||
isVideo = true;
|
||||
|
||||
const videoSrc = (typeof trailerUrl === 'object' ? trailerUrl.url : trailerUrl);
|
||||
@@ -2562,7 +2588,7 @@ const SlideshowManager = {
|
||||
STATE.slideshow.isTransitioning = false;
|
||||
|
||||
if (previousVisibleSlide) {
|
||||
const enableAnimations = MediaBarEnhancedSettingsManager.getSetting('slideAnimations', CONFIG.slideAnimationEnabled);
|
||||
const enableAnimations = MediaBarEnhancedSettingsManager.getSetting('slideAnimations', CONFIG.slideAnimationEnabled) && !isLowPowerDevice();
|
||||
if (enableAnimations) {
|
||||
const prevBackdrop = previousVisibleSlide.querySelector(".backdrop");
|
||||
const prevLogo = previousVisibleSlide.querySelector(".logo");
|
||||
@@ -2603,7 +2629,9 @@ const SlideshowManager = {
|
||||
*/
|
||||
async preloadAdjacentSlides(currentIndex) {
|
||||
const totalItems = STATE.slideshow.totalItems;
|
||||
const preloadCount = Math.min(Math.max(CONFIG.preloadCount || 1, 1), 5);
|
||||
let preloadCount = Math.min(Math.max(CONFIG.preloadCount || 1, 1), 5);
|
||||
if (isLowPowerDevice()) preloadCount = 1; // Strict limit for TVs
|
||||
|
||||
const preloadedIds = new Set();
|
||||
|
||||
// Preload next slides
|
||||
|
||||
@@ -8,6 +8,14 @@
|
||||
"category": "General",
|
||||
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/raw/branch/main/logo.png",
|
||||
"versions": [
|
||||
{
|
||||
"version": "1.7.0.9",
|
||||
"changelog": "- Add YouTube no-cookie host and referrer policy for iframe security to fix playback issues on iOS/MacOS",
|
||||
"targetAbi": "10.11.0.0",
|
||||
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.7.0.9/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
||||
"checksum": "c483335bb07d9b76fb2512e811871c61",
|
||||
"timestamp": "2026-03-06T01:24:40Z"
|
||||
},
|
||||
{
|
||||
"version": "1.6.6.4",
|
||||
"changelog": "- feat: add static backdrop also for video backdrops\n- fix: renaming issue of settings (avoiding conflict with other plugins)",
|
||||
|
||||
Reference in New Issue
Block a user