diff --git a/README.md b/README.md index 018282b..455484c 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,8 @@ const App = () => ( #### Properties/Configuration Items +The following attributes come from the `option` property configuration item + | Parameter | Description | type | Default value | | ------------------- | ------------------------------------------------------------ | ----------------- | ------------- | | width | The width of the video container (required) | `number` | required | @@ -146,6 +148,20 @@ export interface videoAttributes { | onvolumechange | Callback when the volume changes | (e: videoAttributes) => void | | onError | Video playback failed callback | () => void | +#### The parameter interface received by `JoLPlaye`r is as follows: :point_down: + +``` tsx +export interface videoparameter extends Partial { + style?: React.CSSProperties; + /** + * @description 组件的配置项 + */ + option: videoOption; + className?: string; + ref?: JoLPlayerRef +} +``` + ## :muscle:Later version - [ ] Add shortcut key function diff --git a/package.json b/package.json index e234822..13f8ebc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jol-player", - "version": "2.1.1", + "version": "2.1.2", "description": "简洁,美观,功能强大的react播放器,simple and beautiful, powerful react player", "main": "index.js", "scripts": { diff --git a/src/core/index.tsx b/src/core/index.tsx index 9e5301f..30404ee 100644 --- a/src/core/index.tsx +++ b/src/core/index.tsx @@ -20,6 +20,8 @@ import './index.scss'; const JoLPlayer = function JoLPlayer(props: videoparameter, ref: React.Ref | undefined) { const { option, + className, + style, onProgressMouseDown, onPlay, onPause, @@ -148,7 +150,7 @@ const JoLPlayer = function JoLPlayer(props: videoparameter, ref: React.Ref +