Merge pull request #649 from waltercruz/master

Adding title to the player html template
This commit is contained in:
Sam Potts 2017-11-04 22:16:28 +11:00 committed by GitHub
commit a06a8150ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 5 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 your 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.

2
demo/dist/demo.css vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.css vendored

File diff suppressed because one or more lines are too long

3
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1389,6 +1389,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;