Skip to content

Commit

Permalink
Merge pull request #87 from hyperaudio/update-hyperaudio-lite-2.0.16
Browse files Browse the repository at this point in the history
Update hyperaudio lite 2.0.16
  • Loading branch information
maboa authored Aug 2, 2022
2 parents 2d71e01 + 2f49d3d commit df431a2
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions wp-hyperaudio/js/caption.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*! (C) The Hyperaudio Project. MIT @license: en.wikipedia.org/wiki/MIT_License. */
/*! Version 2.0.12 */
/*! Version 2.0.16 */
'use strict';

var caption = function () {
Expand Down Expand Up @@ -302,15 +302,19 @@ var caption = function () {

var video = document.getElementById(playerId);

video.addEventListener("loadedmetadata", function() {
//var track = document.createElement("track");
var track = document.getElementById(playerId+'-vtt');
track.kind = "captions";
track.label = "English";
track.srclang = "en";
track.src = "data:text/vtt,"+encodeURIComponent(captionsVtt);
if (video !== null) {
video.addEventListener("loadedmetadata", function() {
//var track = document.createElement("track");
var track = document.getElementById(playerId+'-vtt');
track.kind = "captions";
track.label = "English";
track.srclang = "en";
track.src = "data:text/vtt,"+encodeURIComponent(captionsVtt);
video.textTracks[0].mode = "showing";
});

video.textTracks[0].mode = "showing";
});
}

video.textTracks[0].mode = "showing";

Expand Down

0 comments on commit df431a2

Please sign in to comment.