Skip to content

Commit

Permalink
Prevent unwanted Vidyard autoplay
Browse files Browse the repository at this point in the history
  • Loading branch information
Webmaster1116 committed May 23, 2020
1 parent 173b11a commit e1a851b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/players/Vidyard.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class Vidyard extends Component {
}

load (url) {
const { config, onError, onDuration } = this.props
const { playing, config, onError, onDuration } = this.props
const id = url && url.match(MATCH_URL_VIDYARD)[1]
if (this.player) {
this.stop()
Expand All @@ -34,6 +34,7 @@ export default class Vidyard extends Component {
Vidyard.api.renderPlayer({
uuid: id,
container: this.container,
autoplay: playing ? 1 : 0,
...config.options
})
Vidyard.api.getPlayerMetadata(id).then(meta => {
Expand Down

0 comments on commit e1a851b

Please sign in to comment.