Skip to content

Commit

Permalink
Release 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnCoates committed Oct 26, 2015
1 parent 0d1f743 commit 84bb5fb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
Expand Down
21 changes: 13 additions & 8 deletions Aerial/AerialView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ class ManifestLoader {
static var _player:AVPlayer?;
static var player:AVPlayer {
if let activePlayer = _player {
NSLog("returning existing player: %@", activePlayer);
// NSLog("returning existing player: %@", activePlayer);
return activePlayer;
}
NSLog("preview.... constructing new player!");
// NSLog("preview.... constructing new player!");
// let movieURL = NSURL(string: "http://a1.phobos.apple.com/us/r1000/000/Features/atv/AutumnResources/videos/b10-2.mov");
// let asset = AVAsset(URL: movieURL!);
//
Expand All @@ -188,7 +188,7 @@ class ManifestLoader {
}

deinit {
NSLog("deinit AerialView");
// NSLog("deinit AerialView");
NSNotificationCenter.defaultCenter().removeObserver(self);

// set player item to nil if not preview player
Expand Down Expand Up @@ -318,6 +318,11 @@ public let AVPlayerItemFailedToPlayToEndTimeErrorKey: String // NSError
*/
func playerItemFailedtoPlayToEnd(aNotification: NSNotification) {
NSLog("AVPlayerItemFailedToPlayToEndTimeNotification \(aNotification)");
guard let player = self.player else {
return;
}

playNextVideo(player);
}

func playerItemNewErrorLogEntryNotification(aNotification: NSNotification) {
Expand All @@ -329,13 +334,13 @@ public let AVPlayerItemFailedToPlayToEndTimeErrorKey: String // NSError
}

func playerItemDidReachEnd(aNotification: NSNotification) {
NSLog("played did reach end");
NSLog("notification: \(aNotification)");
// NSLog("played did reach end");
// NSLog("notification: \(aNotification)");
guard let player = self.player else {
return;
}

NSLog("playing next video for player \(player)");
// NSLog("playing next video for player \(player)");

// play another video
playNextVideo(player);
Expand All @@ -356,7 +361,7 @@ public let AVPlayerItemFailedToPlayToEndTimeErrorKey: String // NSError
let item = AVPlayerItem(asset: asset);
player.replaceCurrentItemWithPlayerItem(item);

NSLog("playing video: \(video.url)");
// NSLog("playing video: \(video.url)");
if player.rate == 0 {
player.play();
}
Expand All @@ -371,7 +376,7 @@ public let AVPlayerItemFailedToPlayToEndTimeErrorKey: String // NSError
// remove old entries
notificationCenter.removeObserver(self);

NSLog("observing current item \(currentItem)");
// NSLog("observing current item \(currentItem)");
notificationCenter.addObserver(self, selector: "playerItemDidReachEnd:", name: AVPlayerItemDidPlayToEndTimeNotification, object: currentItem);
notificationCenter.addObserver(self, selector: "playerItemNewErrorLogEntryNotification:", name: AVPlayerItemNewErrorLogEntryNotification, object: currentItem);
notificationCenter.addObserver(self, selector: "playerItemFailedtoPlayToEnd:", name: AVPlayerItemFailedToPlayToEndTimeNotification, object: currentItem);
Expand Down
10 changes: 3 additions & 7 deletions Aerial/PreferencesWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,9 @@ class City {

required init?(coder decoder: NSCoder) {
super.init(coder: decoder)
NSLog("initted!");
}
override init(window: NSWindow?) {
super.init(window: window)
NSLog("initted!");

}
override func windowDidLoad() {
Expand Down Expand Up @@ -157,8 +155,6 @@ class City {
return;
}

NSLog("loading JSON!");

PreferencesWindowController.loadedJSON = true;

let completionHandler = { (data:NSData?, response:NSURLResponse?, error:NSError?) -> Void in
Expand Down Expand Up @@ -198,7 +194,7 @@ class City {
city.addVideoForTimeOfDay(timeOfDay, video: video);
videos.append(video)

NSLog("id: \(id), name: \(name), time of day: \(timeOfDay), url: \(url)");
// NSLog("id: \(id), name: \(name), time of day: \(timeOfDay), url: \(url)");
}
}

Expand All @@ -212,7 +208,7 @@ class City {
self.outlineView?.reloadData();
self.outlineView?.expandItem(nil, expandChildren: true);
})
NSLog("reloading outline view\(self.outlineView)");
// NSLog("reloading outline view\(self.outlineView)");
}
catch {
NSLog("Error retrieving content listing.");
Expand All @@ -236,7 +232,7 @@ class City {

func outlineView(outlineView: NSOutlineView, numberOfChildrenOfItem item: AnyObject?) -> Int {
if item == nil {
NSLog("count: \(cities.count)");
// NSLog("count: \(cities.count)");
return cities.count;
}

Expand Down

0 comments on commit 84bb5fb

Please sign in to comment.