diff --git a/src/appComponent.tsx b/src/appComponent.tsx
index 47c264f..dfbf929 100644
--- a/src/appComponent.tsx
+++ b/src/appComponent.tsx
@@ -80,7 +80,6 @@ const AppComponent = memo(function AppComponent(props) {
height: 420,
theme: '#00D3FF',
poster: 'https://cdn.gudsen.com/2021/06/28/f81356b08b4842d7a3719499f557c8e4.JPG',
- isAutoPlay: true,
}}
onProgressMouseDown={onProgressMouseDown}
onPlay={onPlay}
@@ -99,7 +98,6 @@ const AppComponent = memo(function AppComponent(props) {
height: 420,
theme: 'red',
poster: 'https://cdn.gudsen.com/2021/06/28/f81356b08b4842d7a3719499f557c8e4.JPG',
- isAutoPlay: false,
}}
/>
diff --git a/src/core/controller/index.tsx b/src/core/controller/index.tsx
index f4a048c..f287626 100644
--- a/src/core/controller/index.tsx
+++ b/src/core/controller/index.tsx
@@ -102,7 +102,13 @@ const Index = memo(function Index(props) {
- {isEndEd ? [handleChangePlayState(), hiddleCursor()]} /> : null}
+ {isEndEd ? (
+ propsAttributes!.setEndPlayContent ? (
+ propsAttributes!.setEndPlayContent
+ ) : (
+ [handleChangePlayState(), hiddleCursor()]} />
+ )
+ ) : null}
);
});
diff --git a/src/core/index.tsx b/src/core/index.tsx
index 1d4a577..f107d21 100644
--- a/src/core/index.tsx
+++ b/src/core/index.tsx
@@ -31,7 +31,7 @@ const JoLPlayer = function JoLPlayer(props: videoparameter, ref: React.Ref
{!isVideoUseful && 抱歉!视频找不到了 (。 ́︿ ̀。)
}
- {isBufferring && (
-
- )}
+ {isBufferring &&
+ (setBufferContent ? (
+ setBufferContent
+ ) : (
+
+ ))}
diff --git a/src/interface/index.ts b/src/interface/index.ts
index 59de282..fd22738 100644
--- a/src/interface/index.ts
+++ b/src/interface/index.ts
@@ -6,6 +6,7 @@ export interface hoverShowStyleType {
progressBgRefEle: HTMLDivElement;
progressScrubberRefEle: HTMLDivElement;
}
+export type pausePlacement = 'bottomRight' | 'center';
export interface videoOption {
/**
* @description 视频容器的width
@@ -28,9 +29,17 @@ export interface videoOption {
*/
poster?: T;
/**
- * @description 是否自动播放
+ * @description 自定义视频结束时显示的内容
*/
- isAutoPlay?: K;
+ setEndPlayContent?: React.ReactNode;
+ /**
+ * @description 自定义视频缓冲加载组件
+ */
+ setBufferContent?: React.ReactNode;
+ /**
+ * @description 暂停键的位置
+ */
+ pausePlacement?: pausePlacement;
}
export interface videoAttributes {
/**