Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Commit

Permalink
fix(Video): fix muted prop (#1847)
Browse files Browse the repository at this point in the history
* fix(Video): fix `muted` prop

* update changelog
  • Loading branch information
layershifter authored Aug 26, 2019
1 parent 0d7c53e commit 3971070
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [Unreleased]

### Fixes
- Fix `muted` prop in `Video` component @layershifter ([#1847](https://github.com/stardust-ui/react/pull/1847))

<!--------------------------------[ v0.37.0 ]------------------------------- -->
## [v0.37.0](https://github.com/stardust-ui/react/tree/v0.37.0) (2019-08-26)
[Compare changes](https://github.com/stardust-ui/react/compare/v0.36.2...v0.37.0)
Expand Down
6 changes: 1 addition & 5 deletions packages/react/src/components/Video/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,7 @@ class Video extends UIComponent<WithAsProp<VideoProps>> {
// React doesn't guaranty that props will be set:
// https://github.com/facebook/react/issues/10389
if (this.videoRef.current) {
if (this.props.muted) {
this.videoRef.current.setAttribute('muted', 'true')
} else {
this.videoRef.current.removeAttribute('muted')
}
this.videoRef.current.muted = !!this.props.muted
}
}

Expand Down

0 comments on commit 3971070

Please sign in to comment.