Skip to content

Commit

Permalink
qnd: committed new iOS demo application source code
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://kelev.kaltura.com/usr/local/kalsource/backend/server/trunk/core@100342 6b8eccd3-e8c5-4e7d-8186-e12b5326b719
  • Loading branch information
erank committed Jun 23, 2013
1 parent be757bc commit c9bf3e4
Show file tree
Hide file tree
Showing 26 changed files with 1,621 additions and 803 deletions.
72 changes: 72 additions & 0 deletions generator/sources/objc/DemoApplication/Kaltura widevine-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>icon.png</string>
<key>CFBundleIconFiles</key>
<array>
<string>icon.png</string>
<string>icon_retina.png</string>
<string>icon_ipad.png</string>
</array>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>icon.png</string>
<string>icon_retina.png</string>
<string>icon_ipad.png</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleBlackOpaque</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
<string>MainWindow_iPhone</string>
<key>NSMainNibFile~ipad</key>
<string>MainWindow_iPad</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UserEmail</key>
<string>[email protected]</string>
<key>UserPassword</key>
<string>password</string>
</dict>
</plist>

Large diffs are not rendered by default.

42 changes: 41 additions & 1 deletion generator/sources/objc/DemoApplication/Shared/Client.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,29 @@

@class KalturaClient;

#ifdef widevine
@class WVSettings;
#endif

@protocol ClientDelegate <NSObject>
-(void) videoStop;
-(void) videoPlay:(NSURL*) url;
-(void) loadWVBitratesList:(NSArray*)wvBitrates;
@end

@interface Client : NSObject <KalturaClientDelegate, ASIProgressDelegate> {

NSMutableArray* mutableArray;
NSDictionary* dict;

KalturaClient *client;
NSMutableArray *categories;
NSMutableArray *media;

#ifdef widevine
WVSettings* wvSettings;
#endif

int partnerId;


Expand All @@ -29,9 +46,14 @@
int currentChunk;
int uploadTryCount;

NSString *path;
NSURL *wvUrl;
NSString *uploadFileTokenId;
NSString *uploadFilePath;

UISegmentedControl *mBitrates;
bool mSettingBitRateButton;

UIViewController *uploadDelegateController;
}

Expand All @@ -55,7 +77,17 @@
- (BOOL)uploadingInProgress;
- (void)uploadProcess:(NSDictionary *)data withDelegate:(UIViewController *)delegateController;
- (NSArray *)getBitratesList:(KalturaMediaEntry *)mediaEntry withFilter:(NSString *)filter;
- (NSString *)getVideoURL:(KalturaMediaEntry *)mediaEntry forFlavor:(NSString *)flavorId;
- (NSString *)getVideoURL:(KalturaMediaEntry *)mediaEntry forMediaEntryDuration:(int)EntryDuration forFlavor:(NSString *)flavorId forFlavorType: (NSString*)flavorType;
-(void)HandleCurrentBitrate:(NSDictionary *)attributes;
-(void)HandleBitrates:(NSDictionary *)attributes;

- (void)donePlayingMovieWithWV;
- (void)playMovieFromUrl:(NSString *)path2;

- (void) initializeWVDictionary: (NSString *)flavorId;
- (void) terminateWV;
- (void)selectBitrate:(int)ind;


@property (nonatomic, retain) KalturaClient *client;
@property (nonatomic, retain) NSMutableArray *categories;
Expand All @@ -64,5 +96,13 @@

@property (nonatomic, retain) NSString *uploadFileTokenId;
@property (nonatomic, retain) NSString *uploadFilePath;
@property (nonatomic, retain) NSString *path;
@property (nonatomic, retain) NSURL *wvUrl;
@property (nonatomic, retain) IBOutlet UISegmentedControl *mBitrates;

@property (nonatomic, assign) id<ClientDelegate> delegate;

@property (nonatomic, assign)NSMutableArray* mutableArray;
@property (nonatomic, assign)NSDictionary* dict;

@end
Loading

0 comments on commit c9bf3e4

Please sign in to comment.