GadulkaPlayer

actual class GadulkaPlayer

A minimalistic audio player

Example:

val player = GadulkaPlayer()
player.play(url = "...")
player.stop()
player.release()
expect class GadulkaPlayer

A minimalistic audio player

Example:

val player = GadulkaPlayer()
player.play(url = "...")
player.stop()
player.release()
actual class GadulkaPlayer

A minimalistic audio player

Example:

val player = GadulkaPlayer()
player.play(url = "...")
player.stop()
player.release()
actual class GadulkaPlayer

A minimalistic audio player

Example:

val player = GadulkaPlayer()
player.play(url = "...")
player.stop()
player.release()
actual class GadulkaPlayer

A minimalistic audio player

Example:

val player = GadulkaPlayer()
player.play(url = "...")
player.stop()
player.release()

Constructors

Link copied to clipboard
actual constructor()
expect constructor()
actual constructor()
actual constructor()
actual constructor()

Properties

Link copied to clipboard
var playerState: MediaPlayer?

Functions

Link copied to clipboard
actual fun currentDuration(): Long?

Retrieves the total duration of the playback item in milliseconds.

expect fun currentDuration(): Long?

Retrieves the total duration of the playback item in milliseconds.

actual fun currentDuration(): Long?

Retrieves the total duration of the playback item in milliseconds.

actual fun currentDuration(): Long?

Retrieves the total duration of the playback item in milliseconds.

actual fun currentDuration(): Long?

Retrieves the total duration of the playback item in milliseconds.

Link copied to clipboard

Retrieves the current state of the player

Retrieves the current state of the player

actual fun currentPlayerState(): GadulkaPlayerState?

Retrieves the current state of the player

Retrieves the current state of the player

actual fun currentPlayerState(): GadulkaPlayerState?

Retrieves the current state of the player

Link copied to clipboard
actual fun currentPosition(): Long?

Retrieves the current playback position in milliseconds.

expect fun currentPosition(): Long?

Retrieves the current playback position in milliseconds.

actual fun currentPosition(): Long?

Retrieves the current playback position in milliseconds.

actual fun currentPosition(): Long?

Retrieves the current playback position in milliseconds.

actual fun currentPosition(): Long?

Retrieves the current playback position in milliseconds.

Link copied to clipboard
actual fun currentVolume(): Float?

Retrieves the current volume level of the player.

expect fun currentVolume(): Float?

Retrieves the current volume level of the player.

actual fun currentVolume(): Float?

Retrieves the current volume level of the player.

actual fun currentVolume(): Float?

Retrieves the current volume level of the player.

actual fun currentVolume(): Float?

Retrieves the current volume level of the player.

Link copied to clipboard

Checks whether the player is currently in a playing or buffering state.

Link copied to clipboard
actual fun pause()

Pauses the audio playback without resetting the play position. To resume playback, call play.

expect fun pause()

Pauses the audio playback without resetting the play position. To resume playback, call play.

actual fun pause()

Pauses the audio playback without resetting the play position. To resume playback, call play.

actual fun pause()

Pauses the audio playback without resetting the play position. To resume playback, call play.

actual fun pause()

Pauses the audio playback without resetting the play position. To resume playback, call play.

Link copied to clipboard
actual fun play()

Resumes audio playback from the current position if it was previously paused.

fun play(rawResourceId: Int)

Android-specific implementation of the play method which uses a ContentResolver to calculate the Uri of a raw file resource bundled with the app.

actual fun play(url: String)

Start playback of the audio resource at the provided url.

expect fun play()

Resumes audio playback from the current position if it was previously paused.

expect fun play(url: String)

Start playback of the audio resource at the provided url.

actual fun play()

Resumes audio playback from the current position if it was previously paused.

actual fun play(url: String)

Start playback of the audio resource at the provided url.

actual fun play()

Resumes audio playback from the current position if it was previously paused.

actual fun play(url: String)

Start playback of the audio resource at the provided url.

actual fun play()

Resumes audio playback from the current position if it was previously paused.

actual fun play(url: String)

Start playback of the audio resource at the provided url.

Link copied to clipboard
actual fun release()

Pause and attempts to perform cleanup in order to dispose of any player resources.

expect fun release()

Pause and attempts to perform cleanup in order to dispose of any player resources.

actual fun release()

Pause and attempts to perform cleanup in order to dispose of any player resources.

actual fun release()

Pause and attempts to perform cleanup in order to dispose of any player resources.

actual fun release()

Stops playback and removes the player element from the DOM.

Link copied to clipboard
actual fun seekTo(time: Long)

Seeks to the specified playback position in the currently playing media.

expect fun seekTo(time: Long)

Seeks to the specified playback position in the currently playing media.

actual fun seekTo(time: Long)

Seeks to the specified playback position in the currently playing media.

actual fun seekTo(time: Long)

Seeks to the specified playback position in the currently playing media.

actual fun seekTo(time: Long)

Seeks to the specified playback position in the currently playing media.

Link copied to clipboard
actual fun setOnErrorListener(listener: ErrorListener)
expect fun setOnErrorListener(listener: ErrorListener)
actual fun setOnErrorListener(listener: ErrorListener)
actual fun setOnErrorListener(listener: ErrorListener)
actual fun setOnErrorListener(listener: ErrorListener)
Link copied to clipboard
actual fun setRate(rate: Float)

Adjusts the playback speed of the audio.

expect fun setRate(rate: Float)

Adjusts the playback speed of the audio.

actual fun setRate(rate: Float)

Adjusts the playback speed of the audio.

actual fun setRate(rate: Float)

Adjusts the playback speed of the audio.

actual fun setRate(rate: Float)

Adjusts the playback speed of the audio.

Link copied to clipboard
actual fun setVolume(volume: Float)

Adjusts the volume level of the player.

expect fun setVolume(volume: Float)

Adjusts the volume level of the player.

actual fun setVolume(volume: Float)

Adjusts the volume level of the player.

actual fun setVolume(volume: Float)

Adjusts the volume level of the player.

actual fun setVolume(volume: Float)

Adjusts the volume level of the player.

Link copied to clipboard
actual fun stop()

Stop playback and return the play position to the beginning of time (position 0).

expect fun stop()

Stop playback and return the play position to the beginning of time (position 0).

actual fun stop()

Stop playback and return the play position to the beginning of time (position 0).

actual fun stop()

Stop playback and return the play position to the beginning of time (position 0).

actual fun stop()

Stop playback and return the play position to the beginning of time (position 0).