Plyr: "muted" config option seems to be ignored

Created on 9 Jul 2019  路  4Comments  路  Source: sampotts/plyr

Expected behaviour

When the "muted" config option is set to true the player should be muted

Actual behaviour

The player ist not muted

Steps to reproduce

Set player to muted via config options

Environment

  • Browser: Tested in latest Safari, Chrome & FF

Link to where the bug is happening

https://codepen.io/anon/pen/MMZrxO

Most helpful comment

Got it working.
Apparently you have to disable the storage option - makes somehow sense, but this should definitely be mentioned in the documentation.
One could also argue that storage should be ignored if the muted option is explicitly set to true.

All 4 comments

Got it working.
Apparently you have to disable the storage option - makes somehow sense, but this should definitely be mentioned in the documentation.
One could also argue that storage should be ignored if the muted option is explicitly set to true.

@danielvonmitschke I just stumbled upon this and I think it would make more sense to use user settings if config params are undefined. I have a player with autoplay and only play/pause and progress controls. It took me a while to figure out why the audio wasn't playing. When I re-enabled all the controls (including mute) I realized the player was keeping the mute even though I explicitly set autoplay: true, muted: false, and volume: 1. Finally, I disabled the storage and everything works as expected. Also, now I understand other strange behaviors I saw in the past with volume even though I was specifically setting the volume value.

Tested in latest Chrome (84), this issue also occurs if you set the attribute "muted" in the HTML video tag as well, and it is solved by the same solution setting the option storage: {enabled: false}

As a result of this, autoplay won't work; muted must be true.

Adding the Chrome error here for search engine indexing / Github error searching as it wasn't obvious where in the issues to find a solution:

DOMException: play() failed because the user didn't interact with the document first.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

onigetoc picture onigetoc  路  3Comments

ahmadshc picture ahmadshc  路  4Comments

MTyson picture MTyson  路  3Comments

Skwai picture Skwai  路  4Comments

frumbert picture frumbert  路  3Comments