Subtitles


The player supports subtitles in .srt,.ass, .ssaand .vttformats.

In iOS, the player switches in full screen mode to native interface, which supported only vtt format. So we recommend use this format.

You can pass URL of the source in the code by variable subtitle. It is important to consider cross-domain policy

The name of subtitle (usually a language) can be specified in square brackets

var player = new Playerjs({"subtitle":"[En]//site.com/subtitle.vtt", "file":"//site.com/video.mp4"});

You can specify a listing:

[English]https://site.com/subtitle.vtt,[Spanish]https://site.com/subtitular.srt

Similarly, the subtitle variable is passed in Playlist and JS API.

From version 9.91 you can use spare subtitle links via the or operator. The player will load them if the first link does not work.

https://site.com/subtitle.vtt or https//site2.com/subtitle.vtt

Selecting subtitles is possible in the settings menu Settings / Settings menu

To customize the design use Plugins/ Subtitle

The parameter default_subtitle allows you to enable the desired subtitle language (if memorize option is enabled in the settings, it has priority).

var player = new Playerjs({"subtitle":"[En]//site.com/en.vtt,[Es]//site.com/es.vtt","default_subtitle":"Es"});

Time correction

You can move subtitles in time if there is a de-sync. This only works if subtitles are uploaded as separate files and managed by the player. You can use the subshift parameter in seconds

"subshift":-0.5

You can also specify a shift in the subtitle source link

//site.com/subtitle.vtt?shift=-0.5



2020 © PlayerJS

Login

Restore password
Sign up
Log in

Sign up free

Sign up
By signing up, you agree to Terms of Service
Login if you have an account

Enterprise

Your name
Website
Email
Phone
Description
Order player

Restore password

Restore
Forgot email? Contact us