Video player with search (server-side)
Search terms are provided to the player using the data-search
attribute.
In this hypothetical example, we have entered the search term "you" into a search field.
After the user submits the form, their input would be sanitized by the web application
and Able Player would be loaded with the following attributes:
data-search
- the search term, expressed as one or more words, separated with space. Able Player will search for any of these words (using OR logic).data-search-div
- contains the id of a<div>
in which to display the search results.data-search-lang
- optional, specifies the language of the caption or subtitle track to search. If omitted it will search the caption track for the default language.data-search-ignore-caps
- true to ignore case; false for case sensitive search.
Also in this example, data-include-transcript
is set to "false", since there isn't room on this page for both search results and a transcript. A better design would accommodate both features.
See also the client-side search demo.