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:
committed by
GitHub
parent
d4c9be2ba0
commit
3cd7ab60b2
@@ -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"
|
||||
}
|
||||
|
Reference in New Issue
Block a user