mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
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:
@@ -28,6 +28,11 @@ class GtkPlayer extends GstPlayer.Player
|
|||||||
this.widget.connect('destroy', this._onWidgetDestroy.bind(this));
|
this.widget.connect('destroy', this._onWidgetDestroy.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
seek_seconds(position)
|
||||||
|
{
|
||||||
|
this.seek(position * 1000000000);
|
||||||
|
}
|
||||||
|
|
||||||
_onStateChanged(player, state)
|
_onStateChanged(player, state)
|
||||||
{
|
{
|
||||||
this.state = state;
|
this.state = state;
|
||||||
|
Reference in New Issue
Block a user