byteark-player-react
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -367,3 +367,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
function defaultCreatePlayerFunction(videoNode, options, onReady) { | ||
return bytearkPlayer.initAsync(videoNode, options, onReady); | ||
if (bytearkPlayer.initAsync) { | ||
return bytearkPlayer.initAsync(videoNode, options, onReady); | ||
} | ||
return bytearkPlayer.init(videoNode, options, onReady); | ||
} | ||
@@ -370,0 +374,0 @@ |
@@ -365,3 +365,7 @@ import React from 'react'; | ||
function defaultCreatePlayerFunction(videoNode, options, onReady) { | ||
return bytearkPlayer.initAsync(videoNode, options, onReady); | ||
if (bytearkPlayer.initAsync) { | ||
return bytearkPlayer.initAsync(videoNode, options, onReady); | ||
} | ||
return bytearkPlayer.init(videoNode, options, onReady); | ||
} | ||
@@ -368,0 +372,0 @@ |
{ | ||
"name": "byteark-player-react", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "ByteArk Player Container for React", | ||
@@ -44,3 +44,3 @@ "author": "byteark", | ||
"microbundle-crl": "^0.13.11", | ||
"node-sass": "^4.14.1", | ||
"node-sass": "^7.0.0", | ||
"npm-run-all": "^4.1.5", | ||
@@ -47,0 +47,0 @@ "prettier": "^2.0.5", |
@@ -5,14 +5,18 @@ # ByteArk Player Container for React | ||
* [Demo](#demo) | ||
* [Features](#features) | ||
* [Installation](#installation) | ||
* [Usage](#usage) | ||
* [Basic Props](#basic-props) | ||
* [Source Object](#source-object) | ||
* [Callback Props](#callback-props) | ||
* [Advanced Props](#advanced-props) | ||
* [API Methods](#api-methods) | ||
* [Advanced Usages](#advanced-usages) | ||
* [Controlling Players](#controlling-players) | ||
* [Request Media/Encryption with credentials](#request-mediaencryption-with-credentials) | ||
- [ByteArk Player Container for React](#byteark-player-container-for-react) | ||
- [Demo](#demo) | ||
- [Features](#features) | ||
- [Installation](#installation) | ||
- [Usage](#usage) | ||
- [Basic Props](#basic-props) | ||
- [Source Object](#source-object) | ||
- [Callback Props](#callback-props) | ||
- [Advanced Props](#advanced-props) | ||
- [API Methods](#api-methods) | ||
- [`getPlayer()`](#getplayer) | ||
- [Advanced Usages](#advanced-usages) | ||
- [Controlling Players](#controlling-players) | ||
- [Using VideoJS Plugins](#using-videojs-plugins) | ||
- [Request Media/Encryption with credentials](#request-mediaencryption-with-credentials) | ||
- [License](#license) | ||
@@ -219,3 +223,3 @@ ## Demo | ||
return <div> | ||
<ByteArkPlayerContainer {...playerOptions} /> | ||
<ByteArkPlayerContainer {...playerOptions} onReady={onReady} /> | ||
<button onClick={() => playerInstance.play()}>Play</button> | ||
@@ -252,3 +256,3 @@ <button onClick={() => playerInstance.pause()}>Pause</button> | ||
return <ByteArkPlayerContainer {...playerOptions} /> | ||
return <ByteArkPlayerContainer {...playerOptions} onReady={onReady} /> | ||
} | ||
@@ -289,3 +293,3 @@ | ||
return <ByteArkPlayerContainer {...playerOptions} /> | ||
return <ByteArkPlayerContainer {...playerOptions} onReady={onReady} /> | ||
} | ||
@@ -292,0 +296,0 @@ |
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
169929
1224
298