Skip to content

Commit

Permalink
improve regex for timecode, discard unneeded variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas committed Nov 12, 2019
1 parent 12b928e commit cc48381
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/App.svelte
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<script>
import EditableLine from './EditableLine.svelte';
import {tick} from 'svelte';
let name = 'world';
let fileContent = "";
let data = "";
let allLines = [];
let vttRegEx = /\d+:\d+:\d+\.\d+-->\d+:\d+:\d+\.\d+/;
let vttRegEx = /\d+:\d+:\d+\.\d+ *--> *\d+:\d+:\d+\.\d+/;
let currentFileName = "data";
let hideTimeCode = false;
let videoSrc = "https://sample-videos.com/video123/mp4/240/big_buck_bunny_240p_2mb.mp4";
let player;
let encodedVtt;
let joinedLines = "";
function readFile(ev) {
Expand Down Expand Up @@ -39,11 +37,7 @@
player.currentTime = seconds;
}
function getId(number) {
blob[0].id = Number.parseInt(Math.random()*20000);
return "test";
}
//we need to use a delayed promise in order to force the browser (via #await) to actually reload the vtt track
function waitForBlob(thedata) {
return new Promise((resolve, reject) => {
setTimeout(() => {
Expand Down

0 comments on commit cc48381

Please sign in to comment.