From 24e84a397b76bdb50d8784d3522975a910533852 Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Fri, 4 Sep 2020 23:38:29 +0200 Subject: [PATCH] Assign created elements to player keys --- clapper_src/player.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clapper_src/player.js b/clapper_src/player.js index b90db86d..394c1c1b 100644 --- a/clapper_src/player.js +++ b/clapper_src/player.js @@ -28,6 +28,13 @@ class ClapperPlayer extends GstPlayer.Player video_renderer: renderer }); + // assign elements to player for later access + // and make sure that GJS will not free them early + this.gtkglsink = gtkglsink; + this.glsinkbin = glsinkbin; + this.dispatcher = dispatcher; + this.renderer = renderer; + let config = this.get_config(); for(let setting of Object.keys(GSTPLAYER_DEFAULTS))