2024-06-27, 11:05 PM
I am working on adding a watermark to the videos I stream through Jellyfin. I've successfully added the watermark using HTML and CSS code. The code works, but I'm facing an issue with positioning the watermark accurately in the corner of the video itself, rather than the corner of the player container. This causes inconsistency as the watermark sometimes appears partially on the video and partially on the surrounding black bars.
I am using Jellyfin in a Docker container, the official version 10.9.6, on Ubuntu Server 22.04.
The code I added HTML:
in playback-video-index-html.XXXXXXXXX.chunk.js
CSS (in Custom CSS section):
I have also tried modifying the site correctly. I downloaded the client from GitHub and used npm, but I got the same result as well
The issue I'm encountering:
I am using Jellyfin in a Docker container, the official version 10.9.6, on Ubuntu Server 22.04.
The code I added HTML:
in playback-video-index-html.XXXXXXXXX.chunk.js
PHP Code:
<div class="watermark">
<img src="/web/logo-no-background1.png" alt="Watermark Image">
</div>
CSS (in Custom CSS section):
PHP Code:
.watermark {
position: absolute;
top: 15px; /* يظهر في الزاوية العلوية بالقرب من الفيديو */
left: 15px; /* يظهر في الزاوية اليمنى بالقرب من الفيديو */
z-index: 10000;
pointer-events: none;
}
.watermark img {
max-width: 150px; /* حجم الصورة الأقصى */
height: auto;
display: block;
opacity: 0.3; /* شفافية الصورة بنسبة 70% */
border-radius: 5px; /* لإضافة حواف مستديرة إذا لزم الأمر */
}
I have also tried modifying the site correctly. I downloaded the client from GitHub and used npm, but I got the same result as well
The issue I'm encountering:
- The watermark appears correctly when the video is played, but it doesn't always show in the correct corner on the video itself. Sometimes it appears on the surrounding black bars, and other times it is partially on the video.
- I am looking for a way to adjust the code or use a feature in Jellyfin to ensure the watermark consistently displays based on the video’s dimensions, regardless of the player's container dimensions.