Skip to content

Facebook player ignores muted parameter #1127

Description

@AlexRypun

I've noticed today that if I pass muted to ReactPlayer it tries to start the video with sound. At least a few days ago it worked as expected.

I dived into the react-player library and found this code inside Facebook player (node_modules/react-player/lib/players/Facebook.js:124):

if (!_this2.props.muted) {
  // Player is muted by default
  _this2.callPlayer('unmute');
}

I tried to add console.log(_this2.player.isMuted()); and it printed false.
I can't find Facebook changelogs about it but seems like now Player is unmuted by default.

Adding else statement fix the problem.

if (!_this2.props.muted) {
  // Player is muted by default
  _this2.callPlayer('unmute');
} else {
  _this2.callPlayer('mute');
}

Could you please add this or something else to fix the issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions