Video Component
The video player has many props that can be used to impletment logic.
src
#
- The
src
prop is a string and it represents the source of the video being played. You should not that it is also a required prop so if your dont pass it in the component will throw an error.
Example
poster
#
- The
poster
prop is a string and it represents the poster of the video being played.
Example
type
#
This represents the type of the video it usally defaults to video/mp4
. the values expexted is a string.
onTimeUpdate
#
This props is also passed down in form of a fuction. The function that your pass in will recieve three arguments and these are:
#
eventThis is a native browser event that is usally triggered each time the video time updates. It is the first argument you will receive
#
currentTimeThis is a the current time that the video playback has reached.
#
durationThis is the full video duration. This is anded in just because we thought it was necessary.
primaryColor
#
It is used to custiomize the main theme color of the video player
onRewind
#
This is fired when the user hit the forward button
onFoward
#
This is fired when the user hit the forward button
onSeek
#
This is fired when the user seeks a certain point i the video
onMute
#
This is fired when the volume of the player is muted
onRequestPictureInPicture
#
This is fired when the Player is playing in Picture in Picture
onEnterFullScreen
#
This is fired when the video enters FullScreen
onPause
#
This is fired when the video pauses
onPlay
#
This is fired when the video plays
autoPlay
#
This props tells the video that it should play imediately when the page loads
className
#
This will be the class
of the video