(function ($) { AblePlayer.prototype.showSearchResults = function() { // search VTT file for all instances of searchTerms // Currently just supports search terms separated with one or more spaces // TODO: Add support for more robust search syntax: // Search terms wrapped in quotation marks ("") must occur exactly as they appear in the quotes // Search terms with an attached minus sign (e.g., -term) are to be excluded from results // Boolean AND/OR operators // ALSO: Add localization support var thisObj = this; if (this.searchDiv && this.searchString) { if ($('#' + this.SearchDiv)) { var resultsArray = this.searchFor(this.searchString); if (resultsArray.length > 0) { var resultsSummary = $('

',{ 'class': 'able-search-results-summary' }); var resultsSummaryText = 'Found ' + resultsArray.length + ' matching items. '; resultsSummaryText += 'Click the time associated with any item '; resultsSummaryText += 'to play the video from that point.'; resultsSummary.html(resultsSummaryText); var resultsList = $('