Add "GPU configuration" setting

This commit is contained in:
redphx
2024-07-19 17:41:52 +07:00
parent dbbdc48aab
commit 210fdfbabe
6 changed files with 46 additions and 4 deletions

View File

@@ -260,9 +260,20 @@ export class StreamPlayer {
this.#resizePlayer();
}
reloadPlayer() {
this.#cleanUpWebGL2Player();
this.#playerType = StreamPlayerType.VIDEO;
this.setPlayerType(StreamPlayerType.WEBGL2, false);
}
#cleanUpWebGL2Player() {
// Clean up WebGL2 Player
this.#webGL2Player?.destroy();
this.#webGL2Player = null;
}
destroy() {
// Cleanup WebGL2 Player
this.#webGL2Player?.destroy();
this.#webGL2Player = null;
this.#cleanUpWebGL2Player();
}
}