CocoaPods trunk is moving to be read-only. Read more on the blog, there are 13 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | Custom |
| ReleasedLast Release | Mar 2018 |
Maintained by Noam Tamim, Oren Melamed, Nilit Danan, Kaltura Open Source, Kaltura.
Note: A new version of the Kaltura Player SDK (V3) will be available for beta very soon. The new SDK is fully native and introduces significant performance improvements.
If you are planning to begin a new project based on the SDK, you may want to wait for the new version.
The Kaltura player-sdk-native component enables embedding the kaltura player into native environments. This enables the full HTML5 player platform, without limitations of HTML5 video tag API in iOS platforms. Currently, for iOS this enables:
For a full list of native embed advantages, see the native controls table within the player toolkit basic usage guide.
The Kaltura player-sdk-native component can be embedded into both native apps, and hybrid native apps (via standard dynamic embed syntax)
Future support will include:
KalturaPlayerSDK can be added to any project (big or small) in a matter of minutes (maybe even seconds if you're super speedy). CocoaPods is fully supported.
git clone https://github.com/kaltura/player-sdk-native-ios.git
KALTURAPlayerSDK.xcodeproj from the subproject folder in Finder, and drag it into Xcode’s Navigator tree. Alternatively, add it with Xcode’s Add Files File menu item.Make sure to add the KALTURAPlayerSDK.xcodeproj file only, not the entire directory.
You can’t have the same project open in two different Xcode windows.If you find that you’re unable to navigate around the library project, check that you don’t have it open in another Xcode window.
After you’ve added the subproject, it should appear below the main project in the Xcode’s Navigator tree:
Build Phases section. This is where you’ll configure the KALTURAPlayerSDK target to automatically build and link to the KALTURAPlayerSDK library. Build Phases section, open the Target Dependencies block and click the + button. In the hierarchy presented to you, the KALTURAPlayerSDK target from the KALTURAPlayerSDK project should be listed. Select it and click Add.
Link Binary With Libraries section located a bit below the Target Dependencies section, and click + in there too. At the top of the list there should be the libKALTURAPlayerSDK.a static library that the main project target produces. Choose it and click Add.
Build Settings find the Other Linker Flags line, and add -ObjC.
Products folder and drag the KALTURAPlayerSDK.bundle to Copy Bundle Resources section.
** If you click build now, you will see that the PlayerSDK library is built before the main project app, and they are linked together.**
• SystemConfiguration
• QuartzCore
• CoreMedia
• AVFoundation
• AudioToolbox
• AdSupport
• WebKit
• Social
• MediaAccessibility
• libSystem.dylib
• libz.dylib
• libstdc++.dylib
• libstdc++.6.dylib
• libstdc++.6.0.9.dylib
• libxml2.dylib
• libxml2.2.dylib
• libc++.dylib
*If you are using Xcode 7 notice that the extension "dylib" was changed to "tbd"
#import <KALTURAPlayerSDK/KPViewController.h>
@property (retain, nonatomic) KPViewController *player;
- (KPViewController *)player {
if (!_player) {
// Account Params
KPPlayerConfig *config = [[KPPlayerConfig alloc] initWithDomain:@"http://cdnapi.kaltura.com"
uiConfID:@"26698911"
partnerId:@"1831271"];
// Video Entry
config.entryId = @"1_o426d3i4";
// Setting this property will cache the html pages in the limit size
config.cacheSize = 100; // MB
_player = [[KPViewController alloc] initWithConfiguration:config];
}
return _player;
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self presentViewController:self.player animated:YES completion:nil];
}
- (KPViewController *)player {
if (!_player) {
// Account Params
KPPlayerConfig *config = [[KPPlayerConfig alloc] initWithDomain:@"http://cdnapi.kaltura.com"
uiConfID:@"26698911"
partnerId:@"1831271"];
// Video Entry
config.entryId = @"1_o426d3i4";
// Setting this property will cache the html pages in the limit size
config.cacheSize = 0.8;
_player = [[KPViewController alloc] initWithConfiguration:config];
}
return _player;
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
self.player.view.frame = (CGRect){0, 0, 320, 180};
[self.player loadPlayerIntoViewController:self];
[self.view addSubview:_player.view];
}
Build Phases -> Link Binary with Library, click the + and Add Other...
GoogleCast.framework choose it and click -Open_.
GoogleMobileAds from: Admob and add it to your projectGoogleMobileAds you should download GoogleInteractiveMediaAds from: IMA SDK, if you are going to use Admob in addition to the IMA SDK you should add GoogleInteractiveMediaAds-GoogleIMA3ForAdMob to your project and if you are going to use only IMA SDK you should add GoogleInteractiveMediaAds-GoogleIMA3 to your project.GoogleMobileAds:
if you are using Xcode 7 you have to change the Enable Bitcode option. (see this link)
If you receive this output:
WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate:
You have to configure a Cocoa key called NSAppTransportSecurity (see this link)
All player-sdk-native-ios code is released under the AGPLv3 unless a different license for a particular library is specified in the applicable library path