Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subtitle position on the video player #2940

Open
Dacogetul opened this issue Oct 21, 2023 · 5 comments
Open

Subtitle position on the video player #2940

Dacogetul opened this issue Oct 21, 2023 · 5 comments

Comments

@Dacogetul
Copy link

I want to move subtitle track to show on the video not to the black border/controls but nothing work including add css or direct style in html.

@David-Koehler-DPX
Copy link
Contributor

Have a look at the WebVTT styling options: https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API#styling_webvtt_cues
The line setting should be what you need: https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API#line

@Dacogetul
Copy link
Author

It's not what I want... I need a setting for mediaplayer not for the subtitle file... The same file works perfectly on the other players (vlc, videojs, etc..) only in mediaplayerjs it doesn't work as I said above. Subtitling is shown correctly when the player runs at the size of the html page, but when I change to fullscreen, one line out of two disappears from the player.

@David-Koehler-DPX
Copy link
Contributor

That is certainly odd...
There is an option to change the default line used by the subtitles: "defaultTrackLine". Maybe setting this to false or changing tit will help with your problem.

@Dacogetul
Copy link
Author

Dacogetul commented Oct 24, 2023

My mediaelementjs player use:
https://cdnjs.cloudflare.com/ajax/libs/mediaelement/7.0.0/mediaelementplayer.min.css and
https://cdnjs.cloudflare.com/ajax/libs/mediaelement/7.0.0/mediaelement-and-player.min.js
your option is just in .js which requires running the js file from my server and I don't think it will work for me...

@David-Koehler-DPX
Copy link
Contributor

Have a look at the usage documentation. You can set the options when creating a new mediaelement instance or as data-attribute on the video itself. If that option doesn't help, I'm not sure what else it could be. When set to "false" all the subtitle rendering and positioning should be done by the browser itself, just like using a plain HTML video-tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants