Instantly share code, notes, and snippets.

What would you like to do?
[iOS] Shows how to add custom query parameters to the SAS authorization request with the OoyalaPlayer
#import <OoyalaSDK/OoyalaSDK.h>
@interface MyPlayerInfo : OODefaultPlayerInfo
@property (nonatomic) NSDictionary *additionalParams;
@implementation MyPlayerInfo
@synthesize additionalParams;
@interface AdditionalSASQueryParamsVC ()
@property (nonatomic) OOOoyalaPlayerViewController *ooyalaPlayerViewController;
@property (nonatomic) NSString *embedCode;
@property (nonatomic) NSString *pcode;
@property (nonatomic) NSString *playerDomain;
@implementation AdditionalSASQueryParamsVC
- (void)viewDidLoad {
[super viewDidLoad];
MyPlayerInfo *playerInfo = [MyPlayerInfo new];
// Here you add the query params that will be appended to the SAS request
playerInfo.additionalParams = @{@"myKey": @"myValue"};
OOOptions *options = [OOOptions new];
options.playerInfo = playerInfo;
OOOoyalaPlayer *player = [[OOOoyalaPlayer alloc] initWithPcode:self.pcode
domain:[[OOPlayerDomain alloc] initWithString:self.playerDomain] options:options];
self.ooyalaPlayerViewController = [[OOOoyalaPlayerViewController alloc] initWithPlayer:player];
[self addPlayerViewController:self.ooyalaPlayerViewController];
[self.ooyalaPlayerViewController.player setEmbedCode:self.embedCode];
[self.ooyalaPlayerViewController.player play];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment