Use Gst.(M)SECOND constants instead of numbers

It makes code easier to read
This commit is contained in:
Rafał Dzięgiel
2021-04-17 13:08:12 +02:00
parent 457cbde25e
commit 9799783ee5
3 changed files with 8 additions and 8 deletions

View File

@@ -183,7 +183,7 @@ class ClapperPlayer extends PlayerBase
seek_seconds(seconds)
{
this.seek(seconds * 1000000000);
this.seek(seconds * Gst.SECOND);
}
seek_chapter(seconds)
@@ -324,8 +324,8 @@ class ClapperPlayer extends PlayerBase
let resumeInfo = {};
if(playlistItem.isLocalFile && settings.get_boolean('resume-enabled')) {
const resumeTime = Math.floor(this.position / 1000000000);
const resumeDuration = this.duration / 1000000000;
const resumeTime = Math.floor(this.position / Gst.SECOND);
const resumeDuration = this.duration / Gst.SECOND;
/* Do not save resume info when video is very short,
* just started or almost finished */