import React from 'react'
import styles from './index.module.scss'
import { baseURL } from '@/utils/http'
import BtnRight from '../BtnRight'

type Props = {
  src: string
  closeFu: () => void
}

function Zguide({ src, closeFu }: Props) {
  return (
    <div className={styles.Zguide}>
      <video
        autoPlay
        playsInline
        muted={true}
        webkit-playsinline='true'
        x5-video-player-type='h5'
        controls={true}
      >
        <source type='video/mp4' src={baseURL + src} />
        Your browser does not support the video tag.
      </video>

      {/* 右下角的返回按钮 */}
      <BtnRight imgName='back' clickSon={() => closeFu()} title='返回' />
    </div>
  )
}

const MemoZguide = React.memo(Zguide)

export default MemoZguide
