Get the HTML canvas element that is used for drawing the waveform. This flag determines whether the waveform should be redrawn when setting one of the view properties that affects the look of the waveform (e.g. Get / set the interaction state of the view instance. Get / set the flag that determines if the waveform should be drawn with a gradient. Get / set the flag that determines if the view instance is operating in responsive mode. Get / set the width of the gap that separates consecutive bars. Get / set the width of a bar representing an element of the waveform. Get / set the height of the drawn waveform. Setting the width only has an effect if the view instance is not operating in responsive mode. Get / set the width of the drawn waveform. Get / set the HTML container element for the view instance. Get / set the progress of the waveform, assumed to be in the range. This will remove all internally registered event handlers and remove the HTML canvas element from the DOM. stroy() ĭestroy the view instance and do the appropriate clean up. The view instance on which the method was called. view = view.clear() Ĭlear the canvas HTML element where the waveform is drawn on. view = view.draw() ĭraw the waveform on the canvas HTML element. Indicates whether playback should start after selecting another track in the playlist, regardless if the playlist is paused or not.Īn array of floating point values representing the amplitude of some audio file at equally spaced intervals that will be used to draw the waveform.Īn object where each key / value pair represents a valid view option.Ī fully initialised View instance that can be used to draw the waveform associated with an audio file. Get the flag that indicates whether the playlist has finished playback. Get the index of the currently playing track. Get the player instance associated with the playlist. Get / set the flag that indicates whether playback should start after selecting another track in the playlist, regardless if the playlist is paused or not. This will remove all internally registered event handlers and call stroy(). stroy() ĭestroy the player instance and do the appropriate clean up. This will start playback of the selected track regardless if the playlist is currently paused.Ī promise that resolves to the playlist instance on which the method was called. The index of the track in the playlist that should be selected. const playlist = await lect(track, forcePlay) This will start playback of the previous track regardless if the playlist is currently paused.Ī promise that resolves to the playlist instance on which the method was called. Skip to the previous track in the playlist. const playlist = await playlist.previous(forcePlay) This will start playback of the next track regardless if the playlist is currently paused.Ī promise that resolves to the playlist instance on which the method was called. const playlist = await playlist.next(forcePlay) ReturnsĪ promise that resolves to the playlist instance on which the method was called. This will pause playback and set the first track in the playlist as the current track to play. const playlist = await playlist.prepare() See the Strategies section for more information on the available strategies and how to use them.Ī fully initialised Playlist instance that can be used to load and play multiple audio files in succession. Import ]Īn array of objects, where each object references an URL or path to an audio file and a strategy data object that instructs how to resolve the amplitude data associated with the audio file.
0 Comments
Leave a Reply. |