From 287fb81342c9ffa084d2021614a92e2c7fb44325 Mon Sep 17 00:00:00 2001 From: lgf <18827634408@163.com> Date: Thu, 5 Aug 2021 17:59:16 +0800 Subject: [PATCH] merge file --- src/app.ts | 4 ++++ src/appComponent.tsx | 5 ++--- src/core/controller/index.tsx | 12 ++++++------ 3 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 src/app.ts diff --git a/src/app.ts b/src/app.ts new file mode 100644 index 0000000..9a93c26 --- /dev/null +++ b/src/app.ts @@ -0,0 +1,4 @@ +import { useVideo } from '@/core/useVideo'; +import JoLPlayer from '@/core/index'; +export { useVideo }; +export default JoLPlayer; diff --git a/src/appComponent.tsx b/src/appComponent.tsx index 6803f2f..f27f088 100644 --- a/src/appComponent.tsx +++ b/src/appComponent.tsx @@ -1,7 +1,6 @@ import React, { memo, useRef, useEffect } from 'react'; -import JoLPlayer from '@/core/index'; +import JoLPlayer, { useVideo } from './app'; import '@/icons/'; -import { useVideo } from '@/core/useVideo'; const AppComponent = memo(function AppComponent(props) { const videoRef = useRef(null!); @@ -18,7 +17,7 @@ const AppComponent = memo(function AppComponent(props) { // console.log(val, xx.current); // }, onTimeChange: (val: any) => { - // console.log(val); + console.log(val); }, // onEndEd: (val: any) => { // console.log('结束', val); diff --git a/src/core/controller/index.tsx b/src/core/controller/index.tsx index 74d81cc..f5517f8 100644 --- a/src/core/controller/index.tsx +++ b/src/core/controller/index.tsx @@ -17,12 +17,12 @@ const Index = memo(function Index(props) { const { isPlay, handleChangePlayState, currentTime } = useVideo({ videoElement: reviceProps.videoRef, - onPause: (val: any) => { - console.log(val); - }, - onPlay: (val: any) => { - console.log(val); - }, + // onPause: (val: any) => { + // console.log(val); + // }, + // onPlay: (val: any) => { + // console.log(val); + // }, // onTimeChange: (val: any) => { // console.log(val); // },