Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuri Sulyma committed Mar 13, 2022
1 parent 81a4db4 commit 7a9d5b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/seekonload.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import type {Playback} from "liqvid";
import {Utils} from "liqvid";
const {timeRegexp} = Utils.time;
const {parseTime, timeRegexp} = Utils.time;

const rgx = new RegExp(
"(?:^\\?|&)t=(" +
timeRegexp.toString().replace(/^\/\^|\$\/$/g, "") +
")"
);

export function seekOnLoad(playback: Playback) => {
export function seekOnLoad(playback: Playback) {
const $_ = parent.location.search.match(rgx);
if ($_) {
playback.seek($_[1]);
playback.seek(parseTime($_[1]));
}
};

Expand Down

0 comments on commit 7a9d5b7

Please sign in to comment.