Jump to content

Subtitle placement too low in Chrome/Firefox


Moods
 Share

Recommended Posts

So I dunno when it started, but its recent, subtitles are placed too low, pretty much at the very bottom of the screen in both Chrome and Firefox, in Emby Theater, on Chromecast and on my Smart TV this is not an issue.

 

So I am not sure what happend on the browser version.

 

Anyone experienced this? I cant seem to find anywhere to adjust subtitle positioning.

 

I have attached a PNG file to show my issue.

post-96743-0-52219600-1564571683_thumb.png

Edited by Moods
Link to comment
Share on other sites

  • 4 months later...

Firefox doesn't offer a way to control subtitle position, but chrome does and we are utilizing that to position them.

Link to comment
Share on other sites

  • 10 months later...
On 12/28/2019 at 4:13 AM, Luke said:

Firefox doesn't offer a way to control subtitle position, but chrome does and we are utilizing that to position them.

 

Actually there is a way to do it @Luke (and I would love to have this done as I'm a Firefox user and using Emby in Firefox mainly). If you run that when the video starts, subtitles will be at the desired vertical position. It works well in all the cases I tested (including multiple subtitles with timestamps overlapping)

let subtitlePosition = 80; // The number corresponding to the position. 0 for top, 100 for bottom. Should be probably linked to a setting

let videoElmt = document.getElementsByTagName('video')[0];

for(let i=0;i<videoElmt.textTracks[0].cues.length;i++){
	videoElmt.textTracks[0].cues[i].snapToLines = false;
	videoElmt.textTracks[0].cues[i].line = subtitlePosition;
}

You can find more info there https://www.w3.org/TR/webvtt1/#cues

Thanks

Edited by Nisalon
Link to comment
Share on other sites

On 10/29/2020 at 10:29 PM, Nisalon said:

 

Actually there is a way to do it @Luke (and I would love to have this done as I'm a Firefox user and using Emby in Firefox mainly). If you run that when the video starts, subtitles will be at the desired vertical position. It works well in all the cases I tested (including multiple subtitles with timestamps overlapping)


let subtitlePosition = 80; // The number corresponding to the position. 0 for top, 100 for bottom. Should be probably linked to a setting

let videoElmt = document.getElementsByTagName('video')[0];

for(let i=0;i<videoElmt.textTracks[0].cues.length;i++){
	videoElmt.textTracks[0].cues[i].snapToLines = false;
	videoElmt.textTracks[0].cues[i].line = subtitlePosition;
}

You can find more info there https://www.w3.org/TR/webvtt1/#cues

Thanks

hi @Nisalon yes that is possible, although that would end up overriding data that is already in the subtitles, whereas the current techniques do not do that. But yes that is doable. Thanks.

Link to comment
Share on other sites

In that case, can it be implemented (maybe a setting, which by default has the current behavior, and when changed, does this) ?

Thanks

Link to comment
Share on other sites

On 11/5/2020 at 3:44 PM, Nisalon said:

In that case, can it be implemented (maybe a setting, which by default has the current behavior, and when changed, does this) ?

Thanks

Yes it's possible for the future, thanks for the feedback.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...