import React , { useEffect , useRef } from 'react' ; import './App.css' ; import { Player , Video , DefaultUi , usePlayerContext } from '@vime/react' ; import '@vime/core/themes/default.css' ; import TapSidesToSeek from './TapSidesToSeek' ; function App ( ) { const player = useRef < HTMLVmPlayerElement > ( null ) ; const onPlaybackReady = ( ) => { } ; const [ currentTime ] = usePlayerContext ( player , 'currentTime' , 0 ) ; useEffect ( ( ) => { console . log ( currentTime ) ; } , [ currentTime ] ) ; return ( < div id = "container" > < Player playsinline ref = { player } onVmPlaybackReady = { onPlaybackReady } > < Video poster = "https://media.vimejs.com/poster.png" > < source data - src = "https://media.vimejs.com/720p.mp4" type = "video/mp4" / > < /Video> < DefaultUi > { } < TapSidesToSeek / > < /DefaultUi> < /Player> < /div>); } export default App ;