![]() ![]() Other events PropsĬalled every listenInterval milliseconds during playbackĬalled when there's error invoking ay(), it captures error that onError won't catchĬalled when dragging progress bar or press rewind/forward while the audio hasn't loaded yetīesides using props to change UI, React H5 Audio Player provides built-in class names and SASS/LESS variables for developers to overwrite. Please use onListen with listenInterval for better performance. Supported media events: onPlay, onPause, onEnded, onSeeking, onSeeked, onAbort, onCanPlay, onCanPlayThrough, onEmptied, onError, onLoadStart, onLoadedMetaData, onLoadedData, onPlaying, onSuspend, onWaiting, onVolumeChange The callback to be used when encrypted audio is detected and needs to be decrypted (this is a key of the mse prop) The callback to be used when seek happens (this is a key of the mse prop) The complete duration of the MSE audio chunks together (this is a key of the mse prop) 'auto' means when duration is greater than one hour, time format is hh:mm:ss, otherwise it's mm:ssĪ configuration object to overwrite the default aria-label on the action buttonsĪ configuration object so the player can play audio chunks, MSE streams and encrypted audio (See section about Media Source Extensions in this Readme) Time format for both current time and duration. There are 37 other projects in the npm registry using react-h5-audio-player. 3 0.0.0 flipflop lite video loader plugin videojs-vjsdownload 4923 1.0.4 downloads video videojs-mobile-ui 2517 0.7.0 Mobile tap controls and fullscreen on rotate for Video.js videojs-fetch-flv 19 1.0.12 A videojs plugin to download http-flv stream videojs-awesome-watermark 54 0.0. Start using react-h5-audio-player in your project by running npm i react-h5-audio-player. ![]() Indicates the interval (ms) to call the onListened prop during playbackĭefault display for audio's current time before src's meta data is loadedĭefault display for audio's duration before src's meta data is loaded Latest version: 3.8.6, last published: 8 months ago. Indicates the interval (ms) that the progress bar UI updates, Indicates the progress jump step (ms) when clicking rewind/forward button or left/right arrow key Indicates the volume jump step when pressing up/down arrow key, volume range is 0 to 1ĭeprecated, use progressJumpSteps. Play audio after src is changed, no matter autoPlay is true or false Show filled (already played) area on progress bar The controls attribute defaults to false and should never be changed to true because this library is already providing UI. More native attributes detail: MDN Audio element Props HTML Audio Tag Native Attributes Props They can be turned off by setting hasDefaultKeyBindings prop to false Key binding log ( "onPlay" ) } // other props here / > ) Keyboard shortcuts (When audio player focused) Import AudioPlayer from 'react-h5-audio-player' import 'react-h5-audio-player/lib/styles.css' // import 'react-h5-audio-player/lib/styles.less' Use LESS // import 'react-h5-audio-player/src/styles.scss' Use SASS const Player = ( ) => ( console. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |