Adding title to the player html template

This commit is contained in:
Walter Cruz 2017-08-28 10:19:29 -03:00
parent 3fe0c7c84b
commit f50f0eb63d
2 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,7 @@ You need to add several placeholders to your html template that are replaced whe
- `{id}` - the dynamically generated ID for the player (for form controls) - `{id}` - the dynamically generated ID for the player (for form controls)
- `{seektime}` - the seek time specified in options for fast forward and rewind - `{seektime}` - the seek time specified in options for fast forward and rewind
- `{title}` - the title of yout media, if specified
You can include only the controls you need when specifying custom html. You can include only the controls you need when specifying custom html.

View File

@ -1298,6 +1298,11 @@
// Replace all id references with random numbers // Replace all id references with random numbers
html = _replaceAll(html, '{id}', Math.floor(Math.random() * (10000))); html = _replaceAll(html, '{id}', Math.floor(Math.random() * (10000)));
// Replace Title, if it exists
if (config.title){
html = _replaceAll(html, '{title}', config.title);
}
// Controls container // Controls container
var target; var target;