Created
October 19, 2012 14:48
-
-
Save dmlap/3918603 to your computer and use it in GitHub Desktop.
Using the event logger with a BC iOS Player
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Create an event logger for a player. Note how we attach it to the event emitter for a player. You can attach the logger to the catalog's event emitter as well! */ | |
| BCEventLogger *playerLogger = [[BCEventLogger alloc]initWithEventEmitter:player.playbackEmitter]; | |
| /* If you're in verbose mode, this string will be prepended to all the logging */ | |
| [playerLogger setLoggingPrefix:@"Player"]; | |
| /* The logger is verbose by default and prints out every event and all the properties of that event. Non-verbose mode just prints out the event name */ | |
| playerLogger.verbose = false; | |
| /* We don't recommend leaving this on for "production" code but it can be handy to know what component sent a particular event when debugging. If you add this line, the sender will be printed out as well. */ | |
| [player.playbackEmitter | |
| emit:BCEventSetDebug | |
| withDetails:[NSDictionary | |
| dictionaryWithObject:[NSNumber numberWithBool:YES] | |
| forKey:@"debug"]]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment