Audio Player
#
UsageTo use the video componentyou have to import it and use it.
#
Code#
OutputTo find more about props check the Audio Props section.
#
Propstype
#
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:
#
event
This is a native browser event that is usally triggered each time the video time updates. It is the first argument you will receive
#
currentTime
This is a the current time that the video playback has reached.
#
duration
This is the full video duration. This is anded in just because we thought it was necessary.
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 on the audio
onMute
#
This is fired when the volume of the player is muted
onPause
#
This is fired when the audio pauses
onPlay
#
This is fired when the audio plays
autoPlay
#
This props tells the audio that it should play imediately when the page loads
className
#
This will be the class
of the player