Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
065d3c8e47 | ||
|
|
5827d129f6 |
@@ -186,6 +186,9 @@ class MainActivity : AudioServiceActivity(), MethodChannel.MethodCallHandler, Ev
|
||||
chooserDialog = MediaRouteChooserDialog(themedContext)
|
||||
chooserDialog?.routeSelector = routeSelector
|
||||
chooserDialog?.setCanceledOnTouchOutside(true)
|
||||
chooserDialog?.setOnDismissListener {
|
||||
handlePickerDismissed()
|
||||
}
|
||||
chooserDialog?.show()
|
||||
|
||||
emitStatus("connecting")
|
||||
@@ -194,6 +197,17 @@ class MainActivity : AudioServiceActivity(), MethodChannel.MethodCallHandler, Ev
|
||||
}
|
||||
}
|
||||
|
||||
private fun handlePickerDismissed() {
|
||||
chooserDialog = null
|
||||
|
||||
val currentSession = castContext?.sessionManager?.currentCastSession
|
||||
val currentStatus = statusPayload["status"] as? String
|
||||
|
||||
if (currentSession == null && currentStatus == "connecting") {
|
||||
emitStatus("idle")
|
||||
}
|
||||
}
|
||||
|
||||
private fun startCastingLiveStream(call: MethodCall, result: MethodChannel.Result) {
|
||||
val arguments = call.arguments as? Map<*, *>
|
||||
if (arguments == null) {
|
||||
|
||||
Reference in New Issue
Block a user