Skip to content

Commit

Permalink
Log when reading TTML files from file or URL
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelmegitt committed Jul 12, 2024
1 parent fa8d91f commit e9443cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/VideoAudioHook.es6
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ export default class VideoAudioHook {
this.parseTTML(ttmlFile, reader.result);
};

Logger.log(`Reading TTML file at: ${ ttmlFile }`);
reader.readAsText(ttmlFile);
}

attachTTMLfromURL(ttmlURL) {
Logger.log(`Fetching TTML from URL at: ${ ttmlURL }`);
fetch(ttmlURL).then(response => {
if (!response.ok) throw Error(response.statusText);
return response.text().then(text => { this.parseTTML(ttmlURL, text); });
Expand Down

0 comments on commit e9443cc

Please sign in to comment.