class Media
Cordova media class.
(js)
<init> |
Cordova media class. Media(src: String, mediaSuccess: (() -> Unit)? = definedExternally, mediaError: ((MediaError) -> Unit)? = definedExternally, mediaStatus: ((Int) -> Unit)? = definedExternally) |
(js)
duration |
val duration: Number |
(js)
position |
val position: Number |
(js)
getCurrentAmplitude |
fun getCurrentAmplitude(mediaSuccess: (Number) -> Unit, mediaError: ((Int) -> Unit)? = definedExternally): Unit |
(js)
getCurrentPosition |
fun getCurrentPosition(mediaSuccess: (Number) -> Unit, mediaError: ((Int) -> Unit)? = definedExternally): Unit |
(js)
getDuration |
fun getDuration(): Number |
(js)
pause |
fun pause(): Unit |
(js)
pauseRecord |
fun pauseRecord(): Unit |
(js)
play |
fun play(): Unit |
(js)
release |
fun release(): Unit |
(js)
resumeRecord |
fun resumeRecord(): Unit |
(js)
seekTo |
fun seekTo(millis: Number): Unit |
(js)
setRate |
fun setRate(rate: Number): Unit |
(js)
setVolume |
fun setVolume(volume: Number): Unit |
(js)
startRecord |
fun startRecord(): Unit |
(js)
stop |
fun stop(): Unit |
(js)
stopRecord |
fun stopRecord(): Unit |
(js)
MEDIA_NONE |
val MEDIA_NONE: Int |
(js)
MEDIA_PAUSED |
val MEDIA_PAUSED: Int |
(js)
MEDIA_RUNNING |
val MEDIA_RUNNING: Int |
(js)
MEDIA_STARTING |
val MEDIA_STARTING: Int |
(js)
MEDIA_STOPPED |
val MEDIA_STOPPED: Int |
(js)
getCurrentAmplitude |
Returns the current amplitude within an audio file. suspend fun Media.getCurrentAmplitude(): Number |
(js)
getCurrentPosition |
Returns the current position within an audio file. suspend fun Media.getCurrentPosition(): Number |