From b34cb2c2077cc6f1683f93ecb89fc85debb86df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= <34163393+amtins@users.noreply.github.com> Date: Tue, 4 Jul 2023 13:03:33 +0200 Subject: [PATCH] fix(play-toggle): missing svg play icon (#8337) Svg play icon is missing when player is initialized with class `vjs-has-started`. - add `setIcon` to the `play-toggle` component constructor Fixes #8336 --- src/js/control-bar/play-toggle.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/js/control-bar/play-toggle.js b/src/js/control-bar/play-toggle.js index e851095e6c..bb22ba9ee2 100644 --- a/src/js/control-bar/play-toggle.js +++ b/src/js/control-bar/play-toggle.js @@ -27,6 +27,8 @@ class PlayToggle extends Button { // show or hide replay icon options.replay = options.replay === undefined || options.replay; + this.setIcon('play'); + this.on(player, 'play', (e) => this.handlePlay(e)); this.on(player, 'pause', (e) => this.handlePause(e));