Add music visualizations

This commit is contained in:
Rafostar
2020-09-11 20:33:06 +02:00
parent a01cc058cd
commit 5afe5149aa
4 changed files with 163 additions and 32 deletions

View File

@@ -56,6 +56,7 @@ class ClapperPlayer extends GstPlayer.Player
this.run_loop = opts.run_loop || false;
this.widget = gtkglsink.widget;
this.state = GstPlayer.PlayerState.STOPPED;
this.visualization_enabled = false;
this._playlist = [];
this._trackId = 0;
@@ -103,6 +104,20 @@ class ClapperPlayer extends GstPlayer.Player
return this._playlist;
}
set_visualization_enabled(value)
{
if(value === this.visualization_enabled)
return;
super.set_visualization_enabled(value);
this.visualization_enabled = value;
}
get_visualization_enabled()
{
return this.visualization_enabled;
}
seek_seconds(position)
{
this.seek(position * 1000000000);