feat: add setVolume function to component's ref (#3794)

* feat: add setVolume function to component's ref

* Update methods.mdx
This commit is contained in:
Seyed Mostafa Hasani
2024-05-20 13:51:48 +03:30
committed by GitHub
parent d4c9be2ba0
commit 3cd7ab60b2
6 changed files with 32 additions and 0 deletions

View File

@@ -54,6 +54,13 @@ class VideoManagerModule(reactContext: ReactApplicationContext?) : ReactContextB
}
}
@ReactMethod
fun setVolume(volume: Float, reactTag: Int) {
performOnPlayerView(reactTag) {
it?.setVolumeModifier(volume)
}
}
companion object {
private const val REACT_CLASS = "VideoManager"
}