Skip to content
Permalink
Browse files

Fix AirPlay audio routing

  • Loading branch information
GianniCarlo committed Feb 27, 2020
1 parent 92c3bdb commit 30a26dcfc0687b41f18a26c9428dc2b4279bcdfe
Showing with 15 additions and 12 deletions.
  1. +12 −12 BookPlayer.xcodeproj/project.pbxproj
  2. +3 −0 BookPlayer/Player/PlayerManager.swift
@@ -1902,7 +1902,7 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWatch/BookPlayerWatch.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
IBSC_MODULE = BookPlayerWatch_Extension;
@@ -1937,7 +1937,7 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWatch/BookPlayerWatch.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
IBSC_MODULE = BookPlayerWatch_Extension;
@@ -1969,7 +1969,7 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWatch/BookPlayerWatch.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
IBSC_MODULE = BookPlayerWatch_Extension;
@@ -1998,7 +1998,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "BookPlayerWatch Extension/BookPlayerWatch Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "BookPlayerWatch Extension/Info.plist";
@@ -2028,7 +2028,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "BookPlayerWatch Extension/BookPlayerWatch Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "BookPlayerWatch Extension/Info.plist";
@@ -2056,7 +2056,7 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "BookPlayerWatch Extension/BookPlayerWatch Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "BookPlayerWatch Extension/Info.plist";
@@ -2297,7 +2297,7 @@
CODE_SIGN_ENTITLEMENTS = BookPlayer/BookPlayer.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 8;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = S7TJSJXWUZ;
FRAMEWORK_SEARCH_PATHS = (
@@ -2328,7 +2328,7 @@
CODE_SIGN_ENTITLEMENTS = BookPlayer/BookPlayer.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -2501,7 +2501,7 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWidget/BookPlayerWidget.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = BookPlayerWidget/Info.plist;
@@ -2530,7 +2530,7 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWidget/BookPlayerWidget.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = BookPlayerWidget/Info.plist;
@@ -2557,7 +2557,7 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWidget/BookPlayerWidget.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = BookPlayerWidget/Info.plist;
@@ -2635,7 +2635,7 @@
CODE_SIGN_ENTITLEMENTS = BookPlayer/BookPlayer.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -73,6 +73,9 @@ class PlayerManager: NSObject {
self.update()
}

// Only route audio for AirPlay
self.audioPlayer.allowsExternalPlayback = false

NotificationCenter.default.addObserver(self, selector: #selector(playerDidFinishPlaying(_:)), name: .AVPlayerItemDidPlayToEndTime, object: nil)
}

0 comments on commit 30a26dc

Please sign in to comment.
You can’t perform that action at this time.