Open tarekbazine opened 5 years ago
i've got no error like that but it cannot set the volume
The reason: the Kotlin implementation misses the setVolume method! So, on Android, it Wont' work, the missing plugin exception will occure. Btw, on iOS, implementation seems to me o.k.
So, what can be done for android? Until the plugin owner does not correct this BUG, then, you can workaround it, from other words, you can solve it locally, in this way:
flutter_radio:
path: ../flutter_radio
if the directory of flutter_radio is next to the directory of your project.
call.method.equals("setVolume")-> {
val volume = call.argument("volume") as Double
radioManager.setVolume(volume.toFloat())
result.success(null)
}
fun setVolume(volume: Float) {
service.setVolume(volume)
}
fun setVolume(volume: Float) {
exoPlayer.volume = volume
}
That's all. Enjoy it! Cheers, DaneeD
Please fix this!
+1
once I call
setVolume()
I get this error :