TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Apache 2 |
ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
Minimum deployment target
Auto Reference Counting (ARC)
Frameworks
Framework installation
Drag and drop
Drag "Woodo.framework" into "Frameworks" folder. If folder is not visible at the left side of XCode window, you could reveal navigation bar with (command + shift + j) keyboard shortcut and find it under your project. A dialog for file adding options will appear
. On dialog;
must be selected.
If cloned Woodo's git repository, it is recommended, but not mandatory, to un-check (de-select) "Copy items into destination group's folder (if needed)", as keeping repository up-to-date would be much more easier.
Now, you have to add 'Other Linker Flags'. Click project navigator icon at upper-left corner (below run button)
! If unable to see project navigator, navigator might be closed. You could reveal navigation bar with (command + shift + j) keyboard shortcut.
Select your project from project navigator
Select project target
Select "Build settings" tab
Search for "Other Linker Flags"
Add "-ObjC" flag
, and you are done.
! To dive in coding, see "How to use" section below. ! Have questions, ask them on StackOverflow: http://stackoverflow.com/questions/tagged/woodo
Adding from project settings
Click project navigator icon at upper-left corner (below run button)
! If unable to see project navigator, navigator might be closed. You could reveal navigation bar with (command + shift + j) keyboard shortcut.
Select your project from project navigator
Select project target
Select "Build Phases" tab
Open "Link with binary libraries"
Select "Add items" . Framework and library chooser dialog will open
Find Woodo.framework at the opened dialog
Now, you have to add 'Other Linker Flags'. Click project navigator icon at upper-left corner (below run button)
! If unable to see project navigator, navigator might be closed. You could reveal navigation bar with (command + shift + j) keyboard shortcut.
Select your project from project navigator
Select project target
Select "Build settings" tab
Search for "Other Linker Flags"
Add "-ObjC" flag
, and you are done.
! To dive in coding, see "How to use" section below. ! Have questions, ask them on StackOverflow: http://stackoverflow.com/questions/tagged/woodo
Setup -
In order to use Woodo Framework properly "AccessToken", "AppToken" and "ClientSecret" parameters need to be decleared on WPManager class before usage. It is recommended to perform setup on "UIApplicationDelegate" instance's "application:application didFinishLaunchingWithOptions:." selector.
i.e
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
// ...
[WPManager setAccessToken:@"<Please contact [email protected] for access token data>"];
[WPManager setAppToken:@"<Please contact [email protected] for app token data>"];
[WPManager setClientSecret:@"<Please contact [email protected] for client secret data>"];
// ...
return YES;
}
iPhone
Basic usage
Import required headers
#import <Woodo/WPManager.h>
Note that: Only presentation is allowed to use at iPhone environment.
NSURL *url = [NSURL URLWithString:@"<Your video content url>"];
NSString *token = @"<Please contact [email protected] for player token data>";
[[WPManager sharedManager]
presentWoodoWithUrl:url
token:token
attachmentView:nil
shareText:nil
shareTitle:nil
shareRecipients:nil
presentationHandler:nil
startHandler:nil
progressHandler:nil
finishHandler:nil
errorHandler:nil];
Add default video controllers
Import required assets by simply dragging WoodoImages.xcassets folder inside project
Import required headers
#import <Woodo/WPDefaultVideoControllerView.h>
Import required assets
Drag and drop
Drag "WoodoImages.xcassets" into "Project" folder. If folder is not visible at the left side of XCode window, you could reveal navigation bar with (command + shift + j) keyboard shortcut and find it under your project. A dialog for file adding options will appear
. On dialog;
must be selected.
If cloned Woodo's git repository, it is recommended, but not mandatory, to un-check (de-select) "Copy items into destination group's folder (if needed)", as keeping repository up-to-date would be much more easier.
Adding from project settings -
Click project navigator icon at upper-left corner (below run button)
! If unable to see project navigator, navigator might be closed. You could reveal navigation bar with (command + shift + j) keyboard shortcut.
Select your project from project navigator
Select project target
Select "Build Phases" tab
Open "Copy bundle resources"
Select "Add items" . Bundle resource chooser dialog will open
Find WoodoImages.xcassets at the opened dialog
Pass new instance of WPDefaultVideoController to "presentWoodoWithUrl:token:attachmentView:shareText:shareTitle:shareRecipients:presentationHandler:startHandler:progressHandler:finishHandler:errorHandler:." selector.
UIView *attachmentView = [WPDefaultVideoControllerView new];
[[WPManager sharedManager]
presentWoodoWithUrl:url
token:token
attachmentView:attachmentView
shareText:nil
shareTitle:nil
shareRecipients:nil
presentationHandler:nil
startHandler:nil
progressHandler:nil
finishHandler:nil
errorHandler:nil];
If given, attachment view will be added to main content, content you want to play, with same size with video player's boundaries.
Add social share data
// Used for facebook, twitter & mail share options (Required)
NSString *shareText = @"Mobilike'ın yeni sitesi yayında - http://mobilike.com/";
// Only used for mail share options (Optional)
NSString *shareTitle = @"Mobilike";
// Only used for mail share options
NSArray *shareRecipients = @[@"[email protected]"];
[[WPManager sharedManager]
presentWoodoWithUrl:url
token:token
attachmentView:nil
shareText:shareText
shareTitle:shareTitle
shareRecipients:shareRecipients
presentationHandler:nil
startHandler:nil
progressHandler:nil
finishHandler:nil
errorHandler:nil];
Add event handlers
void(^presentationHandler)() = ^(){
NSLog(@"Presented (Available on UI)");
};
void(^startHandler)() = ^(){
NSLog(@"Started");
};
void(^progressHandler)(CGFloat currentTime, CGFloat duration) = ^(CGFloat currentTime, CGFloat duration){
// Video progress updated
NSLog(@"%f / %f", currentTime, duration);
};
void(^finishHandler)() = ^(){
// Handle finish here
NSLog(@"Finished");
};
void(^errorHandler)() = ^(){
// Handle error here
NSLog(@"Error");
};
[[WPManager sharedManager]
presentWoodoWithUrl:url
token:token
attachmentView:nil
shareText:nil
shareTitle:nil
shareRecipients:nil
presentationHandler:presentationHandler
startHandler:startHandler
progressHandler:progressHandler
finishHandler:finishHandler
errorHandler:errorHandler];
iPad -
Basic usage
As subview
Import required headers
#import <Woodo/WPManager.h>
Note that: Only presentation is allowed to use at iPhone environment.
NSURL *url = [NSURL URLWithString:@"<Your video content url>"];
NSString *token = @"<Please contact [email protected] for player token data>";
[[WPManager sharedManager]
addWoodoToView:self.videoThumbnail
url:url
token:token
attachmentView:nil
shareText:nil
shareTitle:nil
shareRecipients:nil
presentationHandler:nil
startHandler:nil
progressHandler:nil
finishHandler:nil
errorHandler:nil];
Add default video controllers
Import required assets by simply dragging WoodoImages.xcassets folder inside project
Import required headers
#import <Woodo/WPDefaultVideoControllerView.h>
Import required assets
Drag and drop
Drag "WoodoImages.xcassets" into "Project" folder. If folder is not visible at the left side of XCode window, you could reveal navigation bar with (command + shift + j) keyboard shortcut and find it under your project. A dialog for file adding options will appear
. On dialog;
must be selected.
If cloned Woodo's git repository, it is recommended, but not mandatory, to un-check (de-select) "Copy items into destination group's folder (if needed)", as keeping repository up-to-date would be much more easier.
Adding from project settings -
Click project navigator icon at upper-left corner (below run button)
! If unable to see project navigator, navigator might be closed. You could reveal navigation bar with (command + shift + j) keyboard shortcut.
Select your project from project navigator
Select project target
Select "Build Phases" tab
Open "Copy bundle resources"
Select "Add items" . Bundle resource chooser dialog will open
Find WoodoImages.xcassets at the opened dialog
Pass new instance of WPDefaultVideoController to "presentWoodoWithUrl:token:attachmentView:shareText:shareTitle:shareRecipients:presentationHandler:startHandler:progressHandler:finishHandler:errorHandler:." selector.
UIView *attachmentView = [WPDefaultVideoControllerView new];
[[WPManager sharedManager]
addWoodoToView:self.videoThumbnail
url:url
token:token
attachmentView:attachmentView
shareText:nil
shareTitle:nil
shareRecipients:nil
presentationHandler:nil
startHandler:nil
progressHandler:nil
finishHandler:nil
errorHandler:nil];
If given, attachment view will be added to main content, content you want to play, with same size with video player's boundaries.
Add social share data
// Used for facebook, twitter & mail share options (Required)
NSString *shareText = @"Mobilike'ın yeni sitesi yayında - http://mobilike.com/";
// Only used for mail share options (Optional)
NSString *shareTitle = @"Mobilike";
// Only used for mail share options
NSArray *shareRecipients = @[@"[email protected]"];
[[WPManager sharedManager]
addWoodoToView:self.videoThumbnail
url:url
token:token
attachmentView:nil
shareText:shareText
shareTitle:shareTitle
shareRecipients:shareRecipients
presentationHandler:nil
startHandler:nil
progressHandler:nil
finishHandler:nil
errorHandler:nil];
Add event handlers
void(^presentationHandler)() = ^(){
NSLog(@"Presented (Available on UI)");
};
void(^startHandler)() = ^(){
NSLog(@"Started");
};
void(^progressHandler)(CGFloat currentTime, CGFloat duration) = ^(CGFloat currentTime, CGFloat duration){
// Video progress updated
NSLog(@"%f / %f", currentTime, duration);
};
void(^finishHandler)() = ^(){
// Handle finish here
NSLog(@"Finished");
};
void(^errorHandler)() = ^(){
// Handle error here
NSLog(@"Error");
};
[[WPManager sharedManager]
addWoodoToView:self.videoThumbnail
url:url
token:token
attachmentView:nil
shareText:nil
shareTitle:nil
shareRecipients:nil
presentationHandler:presentationHandler
startHandler:startHandler
progressHandler:progressHandler
finishHandler:finishHandler
errorHandler:errorHandler];
As modal view controller
Import required headers
#import <Woodo/WPManager.h>
Call presentation method over WPManager's shared instance with required parameters
NSURL *url = [NSURL URLWithString:@"<Your video content url>"];
NSString *token = @"<Please contact [email protected] for player token data>";
[[WPManager sharedManager]
presentWoodoWithUrl:url
token:token
attachmentView:nil
shareText:nil
shareTitle:nil
shareRecipients:nil
presentationHandler:nil
startHandler:nil
progressHandler:nil
finishHandler:nil
errorHandler:nil];
Add default video controllers
Import required assets by simply dragging WoodoImages.xcassets folder inside project
Import required headers
#import <Woodo/WPDefaultVideoControllerView.h>
Import required assets
Drag and drop
Drag "WoodoImages.xcassets" into "Project" folder. If folder is not visible at the left side of XCode window, you could reveal navigation bar with (command + shift + j) keyboard shortcut and find it under your project. A dialog for file adding options will appear
. On dialog;
must be selected.
If cloned Woodo's git repository, it is recommended, but not mandatory, to un-check (de-select) "Copy items into destination group's folder (if needed)", as keeping repository up-to-date would be much more easier.
Adding from project settings -
Click project navigator icon at upper-left corner (below run button)
! If unable to see project navigator, navigator might be closed. You could reveal navigation bar with (command + shift + j) keyboard shortcut.
Select your project from project navigator
Select project target
Select "Build Phases" tab
Open "Copy bundle resources"
Select "Add items" . Bundle resource chooser dialog will open
Find WoodoImages.xcassets at the opened dialog
Pass new instance of WPDefaultVideoController to "presentWoodoWithUrl:token:attachmentView:shareText:shareTitle:shareRecipients:presentationHandler:startHandler:progressHandler:finishHandler:errorHandler:." selector.
UIView *attachmentView = [WPDefaultVideoControllerView new];
[[WPManager sharedManager]
presentWoodoWithUrl:url
token:token
attachmentView:attachmentView
shareText:nil
shareTitle:nil
shareRecipients:nil
presentationHandler:nil
startHandler:nil
progressHandler:nil
finishHandler:nil
errorHandler:nil];
If given, attachment view will be added to main content, content you want to play, with same size with video player's boundaries.
Add social share data
// Used for facebook, twitter & mail share options (Required)
NSString *shareText = @"Mobilike'ın yeni sitesi yayında - http://mobilike.com/";
// Only used for mail share options (Optional)
NSString *shareTitle = @"Mobilike";
// Only used for mail share options
NSArray *shareRecipients = @[@"[email protected]"];
[[WPManager sharedManager]
presentWoodoWithUrl:url
token:token
attachmentView:nil
shareText:shareText
shareTitle:shareTitle
shareRecipients:shareRecipients
presentationHandler:nil
startHandler:nil
progressHandler:nil
finishHandler:nil
errorHandler:nil];
Add event handlers
void(^presentationHandler)() = ^(){
NSLog(@"Presented (Available on UI)");
};
void(^startHandler)() = ^(){
NSLog(@"Started");
};
void(^progressHandler)(CGFloat currentTime, CGFloat duration) = ^(CGFloat currentTime, CGFloat duration){
// Video progress updated
NSLog(@"%f / %f", currentTime, duration);
};
void(^finishHandler)() = ^(){
// Handle finish here
NSLog(@"Finished");
};
void(^errorHandler)() = ^(){
// Handle error here
NSLog(@"Error");
};
[[WPManager sharedManager]
presentWoodoWithUrl:url
token:token
attachmentView:nil
shareText:nil
shareTitle:nil
shareRecipients:nil
presentationHandler:presentationHandler
startHandler:startHandler
progressHandler:progressHandler
finishHandler:finishHandler
errorHandler:errorHandler];
WoodoView & WoodoViewController callbacks
Start handler
Called when user content started playing.
Progress update handler
Called when user video content updated progress.
Finish handler
Called when all media playpack finished.
Error handler
Called when any kind of error occured.
Custom player controllers -
// TODO:
See sample project for usage
! On iPhone environment, it is mandatory to present WPWoodoViewController.