|
@@ -1,5 +1,5 @@
|
|
|
import { Video, VideoProps, View } from "@tarojs/components";
|
|
|
-import { FC } from "@tarojs/taro";
|
|
|
+import Taro, { FC } from "@tarojs/taro";
|
|
|
import "./index.scss";
|
|
|
|
|
|
export interface VideoWrapProps extends Omit<VideoProps, "onEnded"> {
|
|
@@ -12,6 +12,12 @@ export const VideoWrap: FC<VideoWrapProps> = ({ onEnded, ...props }) => {
|
|
|
<Video
|
|
|
className="video-wrap__video"
|
|
|
enableProgressGesture={false}
|
|
|
+ onWaiting={() => {
|
|
|
+ Taro.showLoading();
|
|
|
+ }}
|
|
|
+ onPlay={() => {
|
|
|
+ Taro.hideLoading();
|
|
|
+ }}
|
|
|
{...props}
|
|
|
onEnded={() => onEnded()}
|
|
|
/>
|