-
-
Save pbnkp/1533715 to your computer and use it in GitHub Desktop.
This file contains 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
REMOTE REQUESTS: | |
com.sadun.airflick | |
RequestType := show-photo | play-media | screenshot | |
MediaLocation := | |
<url string> | <local file path string> | <array of local file path strings for slideshow> | |
Rotation := 0 | 1 | 2 | 3 (0 ^, 1 <, 2 v, 3 >) | |
Transition := SlideRight | Dissolve | |
SlideDuration := 2 | 3 | 5 | 8 | 10 (Use strings. Incorrect durations default to 5) | |
// Single Slide | |
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: | |
@"show-photo", @"RequestType", | |
@"/Users/ericasadun/Pictures/Spring 2010/EPho 3.JPG", @"MediaLocation", | |
@"1", @"Rotation", | |
nil]; | |
// Slideshow | |
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: | |
@"show-photo", @"RequestType", | |
array, @"MediaLocation", | |
@"0", @"Rotation", | |
@"dissolve", @"Transition", | |
@"5", @"SlideDuration", | |
nil]; | |
[[NSDistributedNotificationCenter defaultCenter] | |
postNotificationName:@"com.sadun.airflick" object:nil | |
userInfo:dict deliverImmediately:YES]; | |
// Onsite Video | |
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: | |
@"play-media", @"RequestType", | |
@"/Volumes/MusicAndData/Core Media/TV/Under Control.m4v", @"MediaLocation", | |
nil]; | |
// Offsite Video | |
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: | |
@"play-media", @"RequestType", | |
@"http://www.archive.org/download/bb_poor_cinderella/bb_poor_cinderella_512kb.mp4", | |
@"MediaLocation", | |
nil]; | |
[[NSDistributedNotificationCenter defaultCenter] | |
postNotificationName:@"com.sadun.airflick" object:nil | |
userInfo:dict deliverImmediately:YES]; | |
URL ACTIVATION: | |
airflick://screenshot (NEW!) | |
airflick://play-media?MediaLocation=http://example.com/some.mp4 | |
airflick://show-photo?MediaLocation=http://example.com/some.jpeg | |
where the media location is escaped | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment