Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6df390fa18 | ||
|
|
d0c3d7ee4d | ||
|
|
bc621aacdf | ||
|
|
73eb30d671 | ||
|
|
2cfbec95c9 | ||
|
|
08fc29cba3 |
@@ -12,7 +12,7 @@
|
|||||||
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
||||||
<Title>Jellyfin Media Bar Enhanced Plugin</Title>
|
<Title>Jellyfin Media Bar Enhanced Plugin</Title>
|
||||||
<Authors>CodeDevMLH</Authors>
|
<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>
|
<RepositoryUrl>https://github.com/CodeDevMLH/jellyfin-plugin-media-bar-enhanced</RepositoryUrl>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -1403,7 +1403,9 @@ const ApiUtils = {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
id: trailer.Id,
|
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;
|
return null;
|
||||||
@@ -1798,6 +1800,8 @@ const SlideCreator = {
|
|||||||
const iframe = event.target.getIframe();
|
const iframe = event.target.getIframe();
|
||||||
if (iframe) {
|
if (iframe) {
|
||||||
iframe.setAttribute('referrerpolicy', 'strict-origin-when-cross-origin');
|
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
|
// Store start/end time and videoId for later use
|
||||||
@@ -1928,7 +1932,10 @@ const SlideCreator = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
videoBackdrop.addEventListener('error', (event) => {
|
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');
|
const slide = event.target.closest('.slide');
|
||||||
if (slide && slide.classList.contains('active')) {
|
if (slide && slide.classList.contains('active')) {
|
||||||
SlideshowManager.nextSlide();
|
SlideshowManager.nextSlide();
|
||||||
@@ -2467,28 +2474,39 @@ const SlideshowManager = {
|
|||||||
if (videoBackdrop.tagName === 'VIDEO') {
|
if (videoBackdrop.tagName === 'VIDEO') {
|
||||||
// Restore src from data-src if it was deactivated to release connections
|
// Restore src from data-src if it was deactivated to release connections
|
||||||
const lazySrc = videoBackdrop.getAttribute('data-src');
|
const lazySrc = videoBackdrop.getAttribute('data-src');
|
||||||
if (lazySrc && !videoBackdrop.src) {
|
const isFreshLoad = lazySrc && !videoBackdrop.src;
|
||||||
videoBackdrop.src = lazySrc;
|
|
||||||
videoBackdrop.load();
|
|
||||||
}
|
|
||||||
|
|
||||||
videoBackdrop.currentTime = 0;
|
|
||||||
|
|
||||||
videoBackdrop.muted = STATE.slideshow.isMuted;
|
videoBackdrop.muted = STATE.slideshow.isMuted;
|
||||||
if (!STATE.slideshow.isMuted) {
|
if (!STATE.slideshow.isMuted) {
|
||||||
videoBackdrop.volume = 0.4;
|
videoBackdrop.volume = 0.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
videoBackdrop.play().catch(e => {
|
const doPlay = () => {
|
||||||
// Check if it actually started playing after a short delay (handling autoplay blocks)
|
if (!currentSlide.classList.contains('active')) return;
|
||||||
setTimeout(() => {
|
videoBackdrop.play().catch(e => {
|
||||||
if (videoBackdrop.paused && currentSlide.classList.contains('active')) {
|
setTimeout(() => {
|
||||||
console.warn(`Autoplay blocked for ${currentItemId}, attempting muted fallback`);
|
if (videoBackdrop.paused && currentSlide.classList.contains('active')) {
|
||||||
videoBackdrop.muted = true;
|
console.warn(`Autoplay blocked for ${currentItemId}, attempting muted fallback`);
|
||||||
videoBackdrop.play().catch(err => console.error("Muted fallback failed", err));
|
videoBackdrop.muted = true;
|
||||||
}
|
videoBackdrop.play().catch(err => console.error("Muted fallback failed", err));
|
||||||
}, 1000);
|
}
|
||||||
});
|
}, 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]) {
|
} else if (STATE.slideshow.videoPlayers && STATE.slideshow.videoPlayers[currentItemId]) {
|
||||||
const player = STATE.slideshow.videoPlayers[currentItemId];
|
const player = STATE.slideshow.videoPlayers[currentItemId];
|
||||||
if (player && typeof player.loadVideoById === 'function' && player._videoId) {
|
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",
|
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/raw/branch/main/logo.png",
|
||||||
"versions": [
|
"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",
|
"changelog": "- Add YouTube no-cookie host and referrer policy for iframe security to fix playback issues on iOS/MacOS",
|
||||||
"targetAbi": "10.11.0.0",
|
"targetAbi": "10.11.0.0",
|
||||||
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.7.0.1/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.7.0.3/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
||||||
"checksum": "1e75cf789d686565176fea5a7010dd50",
|
"checksum": "b4f35ff869129d43c075948e5430b199",
|
||||||
"timestamp": "2026-03-05T21:43:50Z"
|
"timestamp": "2026-03-05T23:23:07Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "1.6.6.4",
|
"version": "1.6.6.4",
|
||||||
|
|||||||
Reference in New Issue
Block a user