react-player
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -109,2 +109,3 @@ 'use strict'; | ||
} | ||
this.stop(); | ||
this.getSDK().then(function (SC) { | ||
@@ -111,0 +112,0 @@ _this2.getSongData(url).then(function (data) { |
@@ -66,3 +66,3 @@ 'use strict'; | ||
var data = JSON.stringify({ method: method, value: value }); | ||
return _this.iframe.contentWindow.postMessage(data, _this.origin); | ||
return _this.iframe.contentWindow && _this.iframe.contentWindow.postMessage(data, _this.origin); | ||
}; | ||
@@ -69,0 +69,0 @@ } |
@@ -44,3 +44,3 @@ 'use strict'; | ||
this.state = { | ||
Player: null | ||
Player: this.getPlayer(this.props.url) | ||
}; | ||
@@ -61,5 +61,3 @@ | ||
this.setState({ | ||
Player: _players2['default'].find(function (Player) { | ||
return Player.canPlay(nextProps.url); | ||
}) | ||
Player: this.getPlayer(nextProps.url) | ||
}); | ||
@@ -69,2 +67,9 @@ } | ||
}, { | ||
key: 'getPlayer', | ||
value: function getPlayer(url) { | ||
return _players2['default'].find(function (Player) { | ||
return Player.canPlay(url); | ||
}); | ||
} | ||
}, { | ||
key: 'render', | ||
@@ -71,0 +76,0 @@ value: function render() { |
{ | ||
"name": "react-player", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "A react component for playing media from YouTube, SoundCloud or Vimeo", | ||
@@ -5,0 +5,0 @@ "main": "lib/ReactPlayer.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41098
819