Compare commits
7 Commits
bf620e447f
...
v1.7.0.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6df390fa18 | ||
|
|
d0c3d7ee4d | ||
|
|
bc621aacdf | ||
|
|
73eb30d671 | ||
|
|
2cfbec95c9 | ||
|
|
08fc29cba3 | ||
|
|
0d6b835486 |
@@ -12,7 +12,7 @@
|
||||
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
||||
<Title>Jellyfin Media Bar Enhanced Plugin</Title>
|
||||
<Authors>CodeDevMLH</Authors>
|
||||
<Version>1.7.0.1</Version>
|
||||
<Version>1.7.0.3</Version>
|
||||
<RepositoryUrl>https://github.com/CodeDevMLH/jellyfin-plugin-media-bar-enhanced</RepositoryUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -1403,7 +1403,9 @@ const ApiUtils = {
|
||||
|
||||
return {
|
||||
id: trailer.Id,
|
||||
url: `${STATE.jellyfinData.serverAddress}/Videos/${trailer.Id}/stream.mp4?mediaSourceId=${mediaSourceId}&api_key=${STATE.jellyfinData.accessToken}`
|
||||
// static=true forces Jellyfin to direct-stream (no transcoding) which enables
|
||||
// HTTP Range Requests (Accept-Ranges: bytes) — required by Safari for video playback
|
||||
url: `${STATE.jellyfinData.serverAddress}/Videos/${trailer.Id}/stream.mp4?mediaSourceId=${mediaSourceId}&api_key=${STATE.jellyfinData.accessToken}&static=true`
|
||||
};
|
||||
}
|
||||
return null;
|
||||
@@ -1798,6 +1800,8 @@ const SlideCreator = {
|
||||
const iframe = event.target.getIframe();
|
||||
if (iframe) {
|
||||
iframe.setAttribute('referrerpolicy', 'strict-origin-when-cross-origin');
|
||||
// Full allow attribute matching what YouTube sets on their own embed pages
|
||||
iframe.setAttribute('allow', 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share');
|
||||
}
|
||||
|
||||
// Store start/end time and videoId for later use
|
||||
@@ -1928,7 +1932,10 @@ const SlideCreator = {
|
||||
});
|
||||
|
||||
videoBackdrop.addEventListener('error', (event) => {
|
||||
console.warn(`Local video error for item ${itemId}`);
|
||||
const src = event.target.src || event.target.getAttribute('data-src') || 'unknown';
|
||||
const errCode = event.target.error ? event.target.error.code : 'n/a';
|
||||
const errMsg = event.target.error ? event.target.error.message : 'n/a';
|
||||
console.warn(`Local video error for item ${itemId} | code=${errCode} | msg=${errMsg} | url=${src}`);
|
||||
const slide = event.target.closest('.slide');
|
||||
if (slide && slide.classList.contains('active')) {
|
||||
SlideshowManager.nextSlide();
|
||||
@@ -2467,28 +2474,39 @@ const SlideshowManager = {
|
||||
if (videoBackdrop.tagName === 'VIDEO') {
|
||||
// Restore src from data-src if it was deactivated to release connections
|
||||
const lazySrc = videoBackdrop.getAttribute('data-src');
|
||||
if (lazySrc && !videoBackdrop.src) {
|
||||
videoBackdrop.src = lazySrc;
|
||||
videoBackdrop.load();
|
||||
}
|
||||
|
||||
videoBackdrop.currentTime = 0;
|
||||
const isFreshLoad = lazySrc && !videoBackdrop.src;
|
||||
|
||||
videoBackdrop.muted = STATE.slideshow.isMuted;
|
||||
if (!STATE.slideshow.isMuted) {
|
||||
videoBackdrop.volume = 0.4;
|
||||
}
|
||||
|
||||
videoBackdrop.play().catch(e => {
|
||||
// Check if it actually started playing after a short delay (handling autoplay blocks)
|
||||
setTimeout(() => {
|
||||
if (videoBackdrop.paused && currentSlide.classList.contains('active')) {
|
||||
console.warn(`Autoplay blocked for ${currentItemId}, attempting muted fallback`);
|
||||
videoBackdrop.muted = true;
|
||||
videoBackdrop.play().catch(err => console.error("Muted fallback failed", err));
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
const doPlay = () => {
|
||||
if (!currentSlide.classList.contains('active')) return;
|
||||
videoBackdrop.play().catch(e => {
|
||||
setTimeout(() => {
|
||||
if (videoBackdrop.paused && currentSlide.classList.contains('active')) {
|
||||
console.warn(`Autoplay blocked for ${currentItemId}, attempting muted fallback`);
|
||||
videoBackdrop.muted = true;
|
||||
videoBackdrop.play().catch(err => console.error("Muted fallback failed", err));
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
};
|
||||
|
||||
if (isFreshLoad) {
|
||||
// Safari: set src, then wait for loadedmetadata before seeking/playing
|
||||
videoBackdrop.src = lazySrc;
|
||||
videoBackdrop.load();
|
||||
videoBackdrop.addEventListener('loadedmetadata', () => {
|
||||
videoBackdrop.currentTime = 0;
|
||||
doPlay();
|
||||
}, { once: true });
|
||||
} else {
|
||||
// src already set (e.g. paused slide resuming)
|
||||
videoBackdrop.currentTime = 0;
|
||||
doPlay();
|
||||
}
|
||||
} else if (STATE.slideshow.videoPlayers && STATE.slideshow.videoPlayers[currentItemId]) {
|
||||
const player = STATE.slideshow.videoPlayers[currentItemId];
|
||||
if (player && typeof player.loadVideoById === 'function' && player._videoId) {
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/raw/branch/main/logo.png",
|
||||
"versions": [
|
||||
{
|
||||
"version": "1.7.0.1",
|
||||
"version": "1.7.0.3",
|
||||
"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.0/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
||||
"checksum": "d126fd4b76c49bdcca257919fd3db8a5",
|
||||
"timestamp": "2026-03-05T01:05:37Z"
|
||||
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.7.0.3/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
||||
"checksum": "b4f35ff869129d43c075948e5430b199",
|
||||
"timestamp": "2026-03-05T23:23:07Z"
|
||||
},
|
||||
{
|
||||
"version": "1.6.6.4",
|
||||
|
||||
Reference in New Issue
Block a user