Commit 6ac0bbae authored by Kateryna Kostiuk's avatar Kateryna Kostiuk

video: pause in background mode

When application enter background VideoToolbox session become invalid
and need to be reset when application enter foreground. This patch
disable video when enter background and enable when entering foreground.

Change-Id: I5a307ca99298a6fb891b5b6d3920954c06e4d952
parent af148d1b
......@@ -205,12 +205,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
func applicationDidEnterBackground(_ application: UIApplication) {
self.log.warning("entering background")
self.callService.muteCurrentCallVideoVideo( mute: true)
func applicationWillEnterForeground(_ application: UIApplication) {
self.log.warning("entering foreground")
self.callService.muteCurrentCallVideoVideo( mute: false)
func applicationWillTerminate(_ application: UIApplication) {
......@@ -206,6 +206,16 @@ class CallsService: CallsAdapterDelegate {
muted: mute)
func muteCurrentCallVideoVideo(mute: Bool) {
for call in self.calls.values where call.state == .current {
mediaType: String(describing:,
muted: mute)
func playDTMF(code: String) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment