byteark-player-react
Advanced tools
Comparing version 1.0.0-beta2 to 1.0.0-beta3
@@ -240,4 +240,4 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
function defaultCreatePlayerFunction(videoNode, options, onPlayerReady) { | ||
return bytearkPlayer(videoNode, options, onPlayerReady); | ||
function defaultCreatePlayerFunction(videoNode, options, onReady) { | ||
return bytearkPlayer(videoNode, options, onReady); | ||
} | ||
@@ -287,5 +287,5 @@ | ||
_this.onPlayerReady = function () { | ||
if (_this.props.onPlayerReady) { | ||
_this.props.onPlayerReady(_this.player); | ||
_this.onReady = function () { | ||
if (_this.props.onReady) { | ||
_this.props.onReady(_this.player); | ||
} | ||
@@ -305,3 +305,3 @@ }; | ||
_this.createPlayerInstance = function () { | ||
_this.player = _this.props.createPlayerFunction(_this.videoNode, _this.props, _this.onPlayerReady); | ||
_this.player = _this.props.createPlayerFunction(_this.videoNode, _this.props, _this.onReady); | ||
@@ -404,2 +404,11 @@ _this.onPlayerCreated(); | ||
if (this.props.audioOnlyMode) { | ||
return /*#__PURE__*/React.createElement("audio", { | ||
playsInline: true, | ||
ref: this.onVideoNodeCreated, | ||
className: "video-js " + this.props.className, | ||
style: videoStyle | ||
}); | ||
} | ||
return /*#__PURE__*/React.createElement("video", { | ||
@@ -432,3 +441,4 @@ playsInline: true, | ||
playerCssFileName: 'byteark-player.min.css', | ||
playsinline: true | ||
playsinline: true, | ||
techCanOverridePoster: false | ||
}; | ||
@@ -435,0 +445,0 @@ |
@@ -238,4 +238,4 @@ import React from 'react'; | ||
function defaultCreatePlayerFunction(videoNode, options, onPlayerReady) { | ||
return bytearkPlayer(videoNode, options, onPlayerReady); | ||
function defaultCreatePlayerFunction(videoNode, options, onReady) { | ||
return bytearkPlayer(videoNode, options, onReady); | ||
} | ||
@@ -285,5 +285,5 @@ | ||
_this.onPlayerReady = function () { | ||
if (_this.props.onPlayerReady) { | ||
_this.props.onPlayerReady(_this.player); | ||
_this.onReady = function () { | ||
if (_this.props.onReady) { | ||
_this.props.onReady(_this.player); | ||
} | ||
@@ -303,3 +303,3 @@ }; | ||
_this.createPlayerInstance = function () { | ||
_this.player = _this.props.createPlayerFunction(_this.videoNode, _this.props, _this.onPlayerReady); | ||
_this.player = _this.props.createPlayerFunction(_this.videoNode, _this.props, _this.onReady); | ||
@@ -402,2 +402,11 @@ _this.onPlayerCreated(); | ||
if (this.props.audioOnlyMode) { | ||
return /*#__PURE__*/React.createElement("audio", { | ||
playsInline: true, | ||
ref: this.onVideoNodeCreated, | ||
className: "video-js " + this.props.className, | ||
style: videoStyle | ||
}); | ||
} | ||
return /*#__PURE__*/React.createElement("video", { | ||
@@ -430,3 +439,4 @@ playsInline: true, | ||
playerCssFileName: 'byteark-player.min.css', | ||
playsinline: true | ||
playsinline: true, | ||
techCanOverridePoster: false | ||
}; | ||
@@ -433,0 +443,0 @@ |
{ | ||
"name": "byteark-player-react", | ||
"version": "1.0.0-beta2", | ||
"version": "1.0.0-beta3", | ||
"description": "ByteArk Player Container for React", | ||
@@ -5,0 +5,0 @@ "author": "byteark", |
@@ -92,3 +92,3 @@ # ByteArk Player Container for React | ||
| onPlayerLoadingError | Function | `({ code, message })` | Callback function to be called when there're an error about loading player. | | ||
| onPlayerReady | Function | `(player)` | Callback function to be called when a player instance is ready. | | ||
| onReady | Function | `(player)` | Callback function to be called when a player instance is ready. | | ||
@@ -95,0 +95,0 @@ ## Advance Props |
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
120624
7
797