
TAG: Youtube , Youtube-ios-Player-Helper , Youtube-Player , Player , Video Player , Swift , Objective c
Licence: Apache 2.0
Classification: youtube player
Platform: IOS
Language: Swift / Objective c
Language: Swift / Objective c
Device:
iPhone / iPad
Download
Objective c : -
Installation
CocoaPods
- Install CocoaPods
- Add this repo to your
Podfile
Swift :-
target 'Example' do
# IMPORTANT: Make sure use_frameworks! is included at the top of the file
use_frameworks!
platform :ios, '8.0'
pod 'youtube-ios-player-helper-swift'
end
Objective c :-
pod "youtube-ios-player-helper", "~> 0.1.4"
- Run
pod install - Open up the
.xcworkspacethat CocoaPods created - Done!
Installation
After installing in your project and opening the workspace, to use the library:
- Drag a UIView the desired size of your player onto your Storyboard.
- Change the UIView's class in the Identity Inspector tab to YTPlayerView
- Import "YTPlayerView.h" in your ViewController.
- Add the following property to your ViewController's header file:
@property(nonatomic, strong) IBOutlet YTPlayerView *playerView;
- Load the video into the player in your controller's code with the following code:
[self.playerView loadWithVideoId:@"M7lc1UVf-VE"];
- Run your code!
Features
- Interface builder designable
- Highly customizable and flexible
- Easy to use
- Written in Swift
