Skip to content

Commit

Permalink
fix: text track with no src should fall-back to transcript (#640)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsi authored Jun 6, 2024
1 parent 5e6bbea commit 35e54d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/cloudinary.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ const isKeyInTransformation = (transformation, key) => {

const addTextTracks = (tracks, videojs) => {
tracks.forEach(track => {
if ((track.maxWords || track.wordHighlight) && videojs.pacedTranscript) {
videojs.pacedTranscript(track);
} else if (track.src) {
if (track.src) {
fetch(track.src, GET_ERROR_DEFAULT_REQUEST).then(r => {
if (r.status >= 200 && r.status <= 399) {
videojs.addRemoteTextTrack(track, true);
}
});
} else if (videojs.pacedTranscript) {
videojs.pacedTranscript(track);
}
});
};
Expand Down

0 comments on commit 35e54d9

Please sign in to comment.