Add "seek_seconds" function

Default "seek" function takes time in nanoseconds as argument which is not that useful, cause we will start playback from the nearest keyframe anyway. The new "seek_seconds" can take a double value for more precise seeking.
This commit is contained in:
Rafostar
2020-08-30 20:19:37 +02:00
parent f35ac10553
commit 734471475f

View File

@@ -28,6 +28,11 @@ class GtkPlayer extends GstPlayer.Player
this.widget.connect('destroy', this._onWidgetDestroy.bind(this));
}
seek_seconds(position)
{
this.seek(position * 1000000000);
}
_onStateChanged(player, state)
{
this.state = state;