byteark-player-react
Advanced tools
Comparing version 1.0.0-beta11 to 1.0.0-beta12
@@ -110,3 +110,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var placeholderCustomStyle = { | ||
position: 'absolute', | ||
position: 'relative', | ||
width: '100%', | ||
@@ -399,2 +399,6 @@ minWidth: '100%', | ||
_this.onReady = function () { | ||
_this.setState({ | ||
ready: true | ||
}); | ||
if (_this.props.onReady) { | ||
@@ -433,3 +437,4 @@ _this.props.onReady(_this.player); | ||
ready: false, | ||
error: null | ||
error: null, | ||
showPlaceholder: true | ||
}; | ||
@@ -575,5 +580,10 @@ _this.onClickPlaceholder = _this.onClickPlaceholder.bind(_assertThisInitialized(_this)); | ||
style: { | ||
position: 'relative' | ||
position: 'relative', | ||
height: '100%' | ||
} | ||
}, this.renderPlaceholder(), this.state.error ? null : this.renderPlayer()); | ||
}, this.state.showPlaceholder ? this.renderPlaceholder() : null, /*#__PURE__*/React.createElement("div", { | ||
style: { | ||
display: this.state.showPlaceholder ? 'none' : 'initial' | ||
} | ||
}, this.state.error ? null : this.renderPlayer())); | ||
}; | ||
@@ -635,2 +645,6 @@ | ||
this.initializePlayer().then(function () { | ||
_this8.setState({ | ||
showPlaceholder: false | ||
}); | ||
_this8.player.play(); | ||
@@ -637,0 +651,0 @@ }); |
@@ -108,3 +108,3 @@ import React from 'react'; | ||
var placeholderCustomStyle = { | ||
position: 'absolute', | ||
position: 'relative', | ||
width: '100%', | ||
@@ -397,2 +397,6 @@ minWidth: '100%', | ||
_this.onReady = function () { | ||
_this.setState({ | ||
ready: true | ||
}); | ||
if (_this.props.onReady) { | ||
@@ -431,3 +435,4 @@ _this.props.onReady(_this.player); | ||
ready: false, | ||
error: null | ||
error: null, | ||
showPlaceholder: true | ||
}; | ||
@@ -573,5 +578,10 @@ _this.onClickPlaceholder = _this.onClickPlaceholder.bind(_assertThisInitialized(_this)); | ||
style: { | ||
position: 'relative' | ||
position: 'relative', | ||
height: '100%' | ||
} | ||
}, this.renderPlaceholder(), this.state.error ? null : this.renderPlayer()); | ||
}, this.state.showPlaceholder ? this.renderPlaceholder() : null, /*#__PURE__*/React.createElement("div", { | ||
style: { | ||
display: this.state.showPlaceholder ? 'none' : 'initial' | ||
} | ||
}, this.state.error ? null : this.renderPlayer())); | ||
}; | ||
@@ -633,2 +643,6 @@ | ||
this.initializePlayer().then(function () { | ||
_this8.setState({ | ||
showPlaceholder: false | ||
}); | ||
_this8.player.play(); | ||
@@ -635,0 +649,0 @@ }); |
{ | ||
"name": "byteark-player-react", | ||
"version": "1.0.0-beta11", | ||
"version": "1.0.0-beta12", | ||
"description": "ByteArk Player Container for React", | ||
@@ -5,0 +5,0 @@ "author": "byteark", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
158082
1143