├── .gitignore ├── EKVideoController.podspec ├── EKVideoController ├── EKVideoController.h └── EKVideoController.m ├── EKVideoControllerExample ├── EKVideoControllerExample.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── EKVideoControllerExample │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── ExampleViewController.h │ ├── ExampleViewController.m │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── facebook-connect.imageset │ │ │ ├── Contents.json │ │ │ ├── facebook-connect.png │ │ │ ├── facebook-connect@2x.png │ │ │ └── facebook-connect@3x.png │ ├── Info.plist │ ├── PrefixHeader.pch │ └── main.m ├── EKVideoControllerExampleTests │ ├── EKVideoControllerExampleTests.m │ └── Info.plist └── Ressources │ └── Videos │ ├── Demonstration.gif │ └── Video.mp4 ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | # Pods/ 27 | -------------------------------------------------------------------------------- /EKVideoController.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "EKVideoController" 3 | s.version = "0.0.1" 4 | s.summary = "Light weight view controller which add a video as a full screen background for IOS written in Objective-C" 5 | s.homepage = "https://github.com/Ekhoo" 6 | s.license = { :type => "MIT", :file => "LICENSE" } 7 | s.author = { "Lucas Ortis" => "contact@lucas-ortis.com" } 8 | s.platform = :ios, "6.0" 9 | s.source = { :git => "https://github.com/Ekhoo/EKVideoController.git", :tag => "0.0.1" } 10 | s.source_files = "EKVideoController/*.{h,m}" 11 | s.requires_arc = true 12 | end 13 | -------------------------------------------------------------------------------- /EKVideoController/EKVideoController.h: -------------------------------------------------------------------------------- 1 | // 2 | // EKVideoController.h 3 | // EKVideoControllerExample 4 | // 5 | // Created by Lucas Ortis on 06/03/2015. 6 | // Copyright (c) 2015 Ekhoo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define EK_SCREEN_BOUNDS [[UIScreen mainScreen] bounds] 12 | #define EK_SCREEN_WIDTH [[[UIScreen mainScreen] bounds] width] 13 | #define EK_SCREEN_HEIGHT [[[UIScreen mainScreen] bounds] height] 14 | 15 | @interface EKVideoController : UIViewController 16 | 17 | // 18 | // VideoPath can be a local file path or an URL. 19 | // When it's setted, the view controller initialize and add the video to the view. 20 | // 21 | @property(nonatomic, strong) NSString *videoPath; 22 | 23 | // 24 | // Determine how the view controller repeats the playback of the video. 25 | // Default value is YES. 26 | // 27 | @property(nonatomic, assign) BOOL repeat; 28 | 29 | // 30 | // Determine the speed of the video. 31 | // Default value is 1.0f; 32 | // 33 | @property(nonatomic, assign) CGFloat videoSpeed; 34 | 35 | // 36 | // Determine the mask color. 37 | // Default value is [UIColor clearColor]. 38 | // 39 | @property(nonatomic, strong) UIColor *maskTintColor; 40 | 41 | // 42 | // Determine the transparency of the mask. 43 | // Default value is 0.0f. 44 | // 45 | @property(nonatomic, assign) CGFloat maskAlpha; 46 | 47 | // 48 | // Play the video. 49 | // 50 | - (void)play; 51 | 52 | // 53 | // Stop the video. 54 | // 55 | - (void)stop; 56 | 57 | // 58 | // Pause the video. 59 | // 60 | - (void)pause; 61 | 62 | // 63 | // Restart the video from the beginning. 64 | // 65 | - (void)restart; 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /EKVideoController/EKVideoController.m: -------------------------------------------------------------------------------- 1 | // 2 | // EKVideoController.m 3 | // EKVideoControllerExample 4 | // 5 | // Created by Lucas Ortis on 06/03/2015. 6 | // Copyright (c) 2015 Ekhoo. All rights reserved. 7 | // 8 | @import MediaPlayer; 9 | 10 | #import "EKVideoController.h" 11 | 12 | @interface EKVideoController() 13 | 14 | @property(nonatomic, strong) MPMoviePlayerController *moviePlayer; 15 | @property(nonatomic, strong) UIView *moviePlayerMask; 16 | 17 | @end 18 | 19 | @implementation EKVideoController 20 | 21 | #pragma mark - Life cycle 22 | 23 | - (instancetype)init { 24 | self = [super init]; 25 | 26 | if (self) { 27 | _repeat = YES; 28 | _videoSpeed = 1.0f; 29 | _maskTintColor = [UIColor clearColor]; 30 | _maskAlpha = 0.0f; 31 | } 32 | 33 | return self; 34 | } 35 | 36 | - (void)viewDidLoad { 37 | [super viewDidLoad]; 38 | 39 | [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; 40 | } 41 | 42 | #pragma mark - Setters 43 | 44 | - (void)setVideoPath:(NSString *)videoPath { 45 | NSParameterAssert(videoPath); 46 | 47 | _videoPath = videoPath; 48 | 49 | /*** Movie player ***/ 50 | if (_moviePlayer) { 51 | [_moviePlayer stop]; 52 | [_moviePlayer.view removeFromSuperview]; 53 | _moviePlayer = nil; 54 | } 55 | 56 | _moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:videoPath]]; 57 | _moviePlayer.view.frame = EK_SCREEN_BOUNDS; 58 | _moviePlayer.fullscreen = YES; 59 | _moviePlayer.controlStyle = MPMovieControlStyleNone; 60 | _moviePlayer.scalingMode = MPMovieScalingModeAspectFill; 61 | _moviePlayer.repeatMode = self.repeat ? MPMovieRepeatModeOne : MPMovieRepeatModeNone; 62 | _moviePlayer.currentPlaybackRate = self.videoSpeed; 63 | 64 | /*** Movie player mask ***/ 65 | if (_moviePlayerMask) { 66 | [_moviePlayerMask removeFromSuperview]; 67 | _moviePlayerMask = nil; 68 | } 69 | 70 | _moviePlayerMask = [[UIView alloc] initWithFrame:EK_SCREEN_BOUNDS]; 71 | _moviePlayerMask.alpha = self.maskAlpha; 72 | _moviePlayerMask.backgroundColor = self.maskTintColor; 73 | 74 | [self.view addSubview:self.moviePlayer.view]; 75 | [self.view addSubview:self.moviePlayerMask]; 76 | [self.view sendSubviewToBack:self.moviePlayer.view]; 77 | } 78 | 79 | - (void)setRepeat:(BOOL)repeat { 80 | NSParameterAssert(self.moviePlayer); 81 | 82 | _repeat = repeat; 83 | 84 | _moviePlayer.repeatMode = repeat ? MPMovieRepeatModeOne : MPMovieRepeatModeNone; 85 | } 86 | 87 | - (void)setVideoSpeed:(CGFloat)videoSpeed { 88 | NSParameterAssert(self.moviePlayer); 89 | 90 | _videoSpeed = videoSpeed; 91 | self.moviePlayer.currentPlaybackRate = _videoSpeed; 92 | } 93 | 94 | - (void)setMaskTintColor:(UIColor *)maskTintColor { 95 | _maskTintColor = maskTintColor; 96 | 97 | _moviePlayerMask.backgroundColor = _maskTintColor; 98 | } 99 | 100 | - (void)setMaskAlpha:(CGFloat)maskAlpha { 101 | _maskAlpha = maskAlpha; 102 | 103 | _moviePlayerMask.alpha = _maskAlpha; 104 | } 105 | 106 | #pragma mark - Video controls 107 | 108 | - (void)play { 109 | NSParameterAssert(self.moviePlayer); 110 | 111 | [_moviePlayer play]; 112 | } 113 | 114 | - (void)stop { 115 | NSParameterAssert(self.moviePlayer); 116 | 117 | [_moviePlayer stop]; 118 | } 119 | 120 | - (void)pause { 121 | NSParameterAssert(self.moviePlayer); 122 | 123 | [_moviePlayer pause]; 124 | } 125 | 126 | - (void)restart { 127 | NSParameterAssert(self.moviePlayer); 128 | 129 | [_moviePlayer stop]; 130 | [_moviePlayer play]; 131 | } 132 | 133 | @end 134 | -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | BE1ABD4E1AA9CEBC00F14029 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BE1ABD4D1AA9CEBC00F14029 /* main.m */; }; 11 | BE1ABD511AA9CEBC00F14029 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BE1ABD501AA9CEBC00F14029 /* AppDelegate.m */; }; 12 | BE1ABD541AA9CEBC00F14029 /* ExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE1ABD531AA9CEBC00F14029 /* ExampleViewController.m */; }; 13 | BE1ABD591AA9CEBC00F14029 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BE1ABD581AA9CEBC00F14029 /* Images.xcassets */; }; 14 | BE1ABD5C1AA9CEBC00F14029 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = BE1ABD5A1AA9CEBC00F14029 /* LaunchScreen.xib */; }; 15 | BE1ABD681AA9CEBC00F14029 /* EKVideoControllerExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BE1ABD671AA9CEBC00F14029 /* EKVideoControllerExampleTests.m */; }; 16 | BE44F0CC1AACBE0200D53FCC /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE44F0CB1AACBE0200D53FCC /* MediaPlayer.framework */; }; 17 | BE830F8C1AA9D21C00AC9BB4 /* EKVideoController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE830F8B1AA9D21C00AC9BB4 /* EKVideoController.m */; }; 18 | BE830F8F1AA9D38600AC9BB4 /* Video.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = BE830F8E1AA9D38600AC9BB4 /* Video.mp4 */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | BE1ABD621AA9CEBC00F14029 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = BE1ABD401AA9CEBC00F14029 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = BE1ABD471AA9CEBC00F14029; 27 | remoteInfo = EKVideoControllerExample; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | BE1ABD481AA9CEBC00F14029 /* EKVideoControllerExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EKVideoControllerExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | BE1ABD4C1AA9CEBC00F14029 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 34 | BE1ABD4D1AA9CEBC00F14029 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 35 | BE1ABD4F1AA9CEBC00F14029 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 36 | BE1ABD501AA9CEBC00F14029 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 37 | BE1ABD521AA9CEBC00F14029 /* ExampleViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExampleViewController.h; sourceTree = ""; }; 38 | BE1ABD531AA9CEBC00F14029 /* ExampleViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleViewController.m; sourceTree = ""; }; 39 | BE1ABD581AA9CEBC00F14029 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 40 | BE1ABD5B1AA9CEBC00F14029 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 41 | BE1ABD611AA9CEBC00F14029 /* EKVideoControllerExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EKVideoControllerExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | BE1ABD661AA9CEBC00F14029 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43 | BE1ABD671AA9CEBC00F14029 /* EKVideoControllerExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EKVideoControllerExampleTests.m; sourceTree = ""; }; 44 | BE44F0CB1AACBE0200D53FCC /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; 45 | BE830F8A1AA9D21C00AC9BB4 /* EKVideoController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EKVideoController.h; path = ../EKVideoController/EKVideoController.h; sourceTree = ""; }; 46 | BE830F8B1AA9D21C00AC9BB4 /* EKVideoController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EKVideoController.m; path = ../EKVideoController/EKVideoController.m; sourceTree = ""; }; 47 | BE830F8E1AA9D38600AC9BB4 /* Video.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; name = Video.mp4; path = Ressources/Videos/Video.mp4; sourceTree = ""; }; 48 | BEC332261AAA40D800F8C5E3 /* PrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = ""; }; 49 | /* End PBXFileReference section */ 50 | 51 | /* Begin PBXFrameworksBuildPhase section */ 52 | BE1ABD451AA9CEBC00F14029 /* Frameworks */ = { 53 | isa = PBXFrameworksBuildPhase; 54 | buildActionMask = 2147483647; 55 | files = ( 56 | BE44F0CC1AACBE0200D53FCC /* MediaPlayer.framework in Frameworks */, 57 | ); 58 | runOnlyForDeploymentPostprocessing = 0; 59 | }; 60 | BE1ABD5E1AA9CEBC00F14029 /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | /* End PBXFrameworksBuildPhase section */ 68 | 69 | /* Begin PBXGroup section */ 70 | BE1ABD3F1AA9CEBB00F14029 = { 71 | isa = PBXGroup; 72 | children = ( 73 | BE44F0CA1AACBDC400D53FCC /* Frameworks */, 74 | BE830F8D1AA9D37700AC9BB4 /* Ressources */, 75 | BE830F891AA9CFF900AC9BB4 /* EKVideoController */, 76 | BE1ABD4A1AA9CEBC00F14029 /* EKVideoControllerExample */, 77 | BE1ABD641AA9CEBC00F14029 /* EKVideoControllerExampleTests */, 78 | BE1ABD491AA9CEBC00F14029 /* Products */, 79 | ); 80 | sourceTree = ""; 81 | }; 82 | BE1ABD491AA9CEBC00F14029 /* Products */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | BE1ABD481AA9CEBC00F14029 /* EKVideoControllerExample.app */, 86 | BE1ABD611AA9CEBC00F14029 /* EKVideoControllerExampleTests.xctest */, 87 | ); 88 | name = Products; 89 | sourceTree = ""; 90 | }; 91 | BE1ABD4A1AA9CEBC00F14029 /* EKVideoControllerExample */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | BE1ABD4F1AA9CEBC00F14029 /* AppDelegate.h */, 95 | BE1ABD501AA9CEBC00F14029 /* AppDelegate.m */, 96 | BE830F881AA9CF6600AC9BB4 /* Controller */, 97 | BE830F871AA9CF6000AC9BB4 /* View */, 98 | BE830F861AA9CF5800AC9BB4 /* Model */, 99 | BE1ABD581AA9CEBC00F14029 /* Images.xcassets */, 100 | BE1ABD5A1AA9CEBC00F14029 /* LaunchScreen.xib */, 101 | BE1ABD4B1AA9CEBC00F14029 /* Supporting Files */, 102 | ); 103 | path = EKVideoControllerExample; 104 | sourceTree = ""; 105 | }; 106 | BE1ABD4B1AA9CEBC00F14029 /* Supporting Files */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | BE1ABD4C1AA9CEBC00F14029 /* Info.plist */, 110 | BE1ABD4D1AA9CEBC00F14029 /* main.m */, 111 | BEC332261AAA40D800F8C5E3 /* PrefixHeader.pch */, 112 | ); 113 | name = "Supporting Files"; 114 | sourceTree = ""; 115 | }; 116 | BE1ABD641AA9CEBC00F14029 /* EKVideoControllerExampleTests */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | BE1ABD671AA9CEBC00F14029 /* EKVideoControllerExampleTests.m */, 120 | BE1ABD651AA9CEBC00F14029 /* Supporting Files */, 121 | ); 122 | path = EKVideoControllerExampleTests; 123 | sourceTree = ""; 124 | }; 125 | BE1ABD651AA9CEBC00F14029 /* Supporting Files */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | BE1ABD661AA9CEBC00F14029 /* Info.plist */, 129 | ); 130 | name = "Supporting Files"; 131 | sourceTree = ""; 132 | }; 133 | BE44F0CA1AACBDC400D53FCC /* Frameworks */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | BE44F0CB1AACBE0200D53FCC /* MediaPlayer.framework */, 137 | ); 138 | name = Frameworks; 139 | sourceTree = ""; 140 | }; 141 | BE830F861AA9CF5800AC9BB4 /* Model */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | ); 145 | name = Model; 146 | sourceTree = ""; 147 | }; 148 | BE830F871AA9CF6000AC9BB4 /* View */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | ); 152 | name = View; 153 | sourceTree = ""; 154 | }; 155 | BE830F881AA9CF6600AC9BB4 /* Controller */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | BE1ABD521AA9CEBC00F14029 /* ExampleViewController.h */, 159 | BE1ABD531AA9CEBC00F14029 /* ExampleViewController.m */, 160 | ); 161 | name = Controller; 162 | sourceTree = ""; 163 | }; 164 | BE830F891AA9CFF900AC9BB4 /* EKVideoController */ = { 165 | isa = PBXGroup; 166 | children = ( 167 | BE830F8A1AA9D21C00AC9BB4 /* EKVideoController.h */, 168 | BE830F8B1AA9D21C00AC9BB4 /* EKVideoController.m */, 169 | ); 170 | name = EKVideoController; 171 | sourceTree = ""; 172 | }; 173 | BE830F8D1AA9D37700AC9BB4 /* Ressources */ = { 174 | isa = PBXGroup; 175 | children = ( 176 | BE830F8E1AA9D38600AC9BB4 /* Video.mp4 */, 177 | ); 178 | name = Ressources; 179 | sourceTree = ""; 180 | }; 181 | /* End PBXGroup section */ 182 | 183 | /* Begin PBXNativeTarget section */ 184 | BE1ABD471AA9CEBC00F14029 /* EKVideoControllerExample */ = { 185 | isa = PBXNativeTarget; 186 | buildConfigurationList = BE1ABD6B1AA9CEBC00F14029 /* Build configuration list for PBXNativeTarget "EKVideoControllerExample" */; 187 | buildPhases = ( 188 | BE1ABD441AA9CEBC00F14029 /* Sources */, 189 | BE1ABD451AA9CEBC00F14029 /* Frameworks */, 190 | BE1ABD461AA9CEBC00F14029 /* Resources */, 191 | ); 192 | buildRules = ( 193 | ); 194 | dependencies = ( 195 | ); 196 | name = EKVideoControllerExample; 197 | productName = EKVideoControllerExample; 198 | productReference = BE1ABD481AA9CEBC00F14029 /* EKVideoControllerExample.app */; 199 | productType = "com.apple.product-type.application"; 200 | }; 201 | BE1ABD601AA9CEBC00F14029 /* EKVideoControllerExampleTests */ = { 202 | isa = PBXNativeTarget; 203 | buildConfigurationList = BE1ABD6E1AA9CEBC00F14029 /* Build configuration list for PBXNativeTarget "EKVideoControllerExampleTests" */; 204 | buildPhases = ( 205 | BE1ABD5D1AA9CEBC00F14029 /* Sources */, 206 | BE1ABD5E1AA9CEBC00F14029 /* Frameworks */, 207 | BE1ABD5F1AA9CEBC00F14029 /* Resources */, 208 | ); 209 | buildRules = ( 210 | ); 211 | dependencies = ( 212 | BE1ABD631AA9CEBC00F14029 /* PBXTargetDependency */, 213 | ); 214 | name = EKVideoControllerExampleTests; 215 | productName = EKVideoControllerExampleTests; 216 | productReference = BE1ABD611AA9CEBC00F14029 /* EKVideoControllerExampleTests.xctest */; 217 | productType = "com.apple.product-type.bundle.unit-test"; 218 | }; 219 | /* End PBXNativeTarget section */ 220 | 221 | /* Begin PBXProject section */ 222 | BE1ABD401AA9CEBC00F14029 /* Project object */ = { 223 | isa = PBXProject; 224 | attributes = { 225 | LastUpgradeCheck = 0610; 226 | ORGANIZATIONNAME = Ekhoo; 227 | TargetAttributes = { 228 | BE1ABD471AA9CEBC00F14029 = { 229 | CreatedOnToolsVersion = 6.1.1; 230 | }; 231 | BE1ABD601AA9CEBC00F14029 = { 232 | CreatedOnToolsVersion = 6.1.1; 233 | TestTargetID = BE1ABD471AA9CEBC00F14029; 234 | }; 235 | }; 236 | }; 237 | buildConfigurationList = BE1ABD431AA9CEBC00F14029 /* Build configuration list for PBXProject "EKVideoControllerExample" */; 238 | compatibilityVersion = "Xcode 3.2"; 239 | developmentRegion = English; 240 | hasScannedForEncodings = 0; 241 | knownRegions = ( 242 | en, 243 | Base, 244 | ); 245 | mainGroup = BE1ABD3F1AA9CEBB00F14029; 246 | productRefGroup = BE1ABD491AA9CEBC00F14029 /* Products */; 247 | projectDirPath = ""; 248 | projectRoot = ""; 249 | targets = ( 250 | BE1ABD471AA9CEBC00F14029 /* EKVideoControllerExample */, 251 | BE1ABD601AA9CEBC00F14029 /* EKVideoControllerExampleTests */, 252 | ); 253 | }; 254 | /* End PBXProject section */ 255 | 256 | /* Begin PBXResourcesBuildPhase section */ 257 | BE1ABD461AA9CEBC00F14029 /* Resources */ = { 258 | isa = PBXResourcesBuildPhase; 259 | buildActionMask = 2147483647; 260 | files = ( 261 | BE1ABD5C1AA9CEBC00F14029 /* LaunchScreen.xib in Resources */, 262 | BE1ABD591AA9CEBC00F14029 /* Images.xcassets in Resources */, 263 | BE830F8F1AA9D38600AC9BB4 /* Video.mp4 in Resources */, 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | }; 267 | BE1ABD5F1AA9CEBC00F14029 /* Resources */ = { 268 | isa = PBXResourcesBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | ); 272 | runOnlyForDeploymentPostprocessing = 0; 273 | }; 274 | /* End PBXResourcesBuildPhase section */ 275 | 276 | /* Begin PBXSourcesBuildPhase section */ 277 | BE1ABD441AA9CEBC00F14029 /* Sources */ = { 278 | isa = PBXSourcesBuildPhase; 279 | buildActionMask = 2147483647; 280 | files = ( 281 | BE1ABD541AA9CEBC00F14029 /* ExampleViewController.m in Sources */, 282 | BE830F8C1AA9D21C00AC9BB4 /* EKVideoController.m in Sources */, 283 | BE1ABD511AA9CEBC00F14029 /* AppDelegate.m in Sources */, 284 | BE1ABD4E1AA9CEBC00F14029 /* main.m in Sources */, 285 | ); 286 | runOnlyForDeploymentPostprocessing = 0; 287 | }; 288 | BE1ABD5D1AA9CEBC00F14029 /* Sources */ = { 289 | isa = PBXSourcesBuildPhase; 290 | buildActionMask = 2147483647; 291 | files = ( 292 | BE1ABD681AA9CEBC00F14029 /* EKVideoControllerExampleTests.m in Sources */, 293 | ); 294 | runOnlyForDeploymentPostprocessing = 0; 295 | }; 296 | /* End PBXSourcesBuildPhase section */ 297 | 298 | /* Begin PBXTargetDependency section */ 299 | BE1ABD631AA9CEBC00F14029 /* PBXTargetDependency */ = { 300 | isa = PBXTargetDependency; 301 | target = BE1ABD471AA9CEBC00F14029 /* EKVideoControllerExample */; 302 | targetProxy = BE1ABD621AA9CEBC00F14029 /* PBXContainerItemProxy */; 303 | }; 304 | /* End PBXTargetDependency section */ 305 | 306 | /* Begin PBXVariantGroup section */ 307 | BE1ABD5A1AA9CEBC00F14029 /* LaunchScreen.xib */ = { 308 | isa = PBXVariantGroup; 309 | children = ( 310 | BE1ABD5B1AA9CEBC00F14029 /* Base */, 311 | ); 312 | name = LaunchScreen.xib; 313 | sourceTree = ""; 314 | }; 315 | /* End PBXVariantGroup section */ 316 | 317 | /* Begin XCBuildConfiguration section */ 318 | BE1ABD691AA9CEBC00F14029 /* Debug */ = { 319 | isa = XCBuildConfiguration; 320 | buildSettings = { 321 | ALWAYS_SEARCH_USER_PATHS = NO; 322 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 323 | CLANG_CXX_LIBRARY = "libc++"; 324 | CLANG_ENABLE_MODULES = YES; 325 | CLANG_ENABLE_OBJC_ARC = YES; 326 | CLANG_WARN_BOOL_CONVERSION = YES; 327 | CLANG_WARN_CONSTANT_CONVERSION = YES; 328 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 329 | CLANG_WARN_EMPTY_BODY = YES; 330 | CLANG_WARN_ENUM_CONVERSION = YES; 331 | CLANG_WARN_INT_CONVERSION = YES; 332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 333 | CLANG_WARN_UNREACHABLE_CODE = YES; 334 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 335 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 336 | COPY_PHASE_STRIP = NO; 337 | ENABLE_STRICT_OBJC_MSGSEND = YES; 338 | GCC_C_LANGUAGE_STANDARD = gnu99; 339 | GCC_DYNAMIC_NO_PIC = NO; 340 | GCC_OPTIMIZATION_LEVEL = 0; 341 | GCC_PREFIX_HEADER = EKVideoControllerExample/PrefixHeader.pch; 342 | GCC_PREPROCESSOR_DEFINITIONS = ( 343 | "DEBUG=1", 344 | "$(inherited)", 345 | ); 346 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 347 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 348 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 349 | GCC_WARN_UNDECLARED_SELECTOR = YES; 350 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 351 | GCC_WARN_UNUSED_FUNCTION = YES; 352 | GCC_WARN_UNUSED_VARIABLE = YES; 353 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 354 | MTL_ENABLE_DEBUG_INFO = YES; 355 | ONLY_ACTIVE_ARCH = YES; 356 | SDKROOT = iphoneos; 357 | }; 358 | name = Debug; 359 | }; 360 | BE1ABD6A1AA9CEBC00F14029 /* Release */ = { 361 | isa = XCBuildConfiguration; 362 | buildSettings = { 363 | ALWAYS_SEARCH_USER_PATHS = NO; 364 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 365 | CLANG_CXX_LIBRARY = "libc++"; 366 | CLANG_ENABLE_MODULES = YES; 367 | CLANG_ENABLE_OBJC_ARC = YES; 368 | CLANG_WARN_BOOL_CONVERSION = YES; 369 | CLANG_WARN_CONSTANT_CONVERSION = YES; 370 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 371 | CLANG_WARN_EMPTY_BODY = YES; 372 | CLANG_WARN_ENUM_CONVERSION = YES; 373 | CLANG_WARN_INT_CONVERSION = YES; 374 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 375 | CLANG_WARN_UNREACHABLE_CODE = YES; 376 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 377 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 378 | COPY_PHASE_STRIP = YES; 379 | ENABLE_NS_ASSERTIONS = NO; 380 | ENABLE_STRICT_OBJC_MSGSEND = YES; 381 | GCC_C_LANGUAGE_STANDARD = gnu99; 382 | GCC_PREFIX_HEADER = EKVideoControllerExample/PrefixHeader.pch; 383 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 384 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 385 | GCC_WARN_UNDECLARED_SELECTOR = YES; 386 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 387 | GCC_WARN_UNUSED_FUNCTION = YES; 388 | GCC_WARN_UNUSED_VARIABLE = YES; 389 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 390 | MTL_ENABLE_DEBUG_INFO = NO; 391 | SDKROOT = iphoneos; 392 | VALIDATE_PRODUCT = YES; 393 | }; 394 | name = Release; 395 | }; 396 | BE1ABD6C1AA9CEBC00F14029 /* Debug */ = { 397 | isa = XCBuildConfiguration; 398 | buildSettings = { 399 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 400 | INFOPLIST_FILE = EKVideoControllerExample/Info.plist; 401 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 402 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 403 | PRODUCT_NAME = "$(TARGET_NAME)"; 404 | }; 405 | name = Debug; 406 | }; 407 | BE1ABD6D1AA9CEBC00F14029 /* Release */ = { 408 | isa = XCBuildConfiguration; 409 | buildSettings = { 410 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 411 | INFOPLIST_FILE = EKVideoControllerExample/Info.plist; 412 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 413 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 414 | PRODUCT_NAME = "$(TARGET_NAME)"; 415 | }; 416 | name = Release; 417 | }; 418 | BE1ABD6F1AA9CEBC00F14029 /* Debug */ = { 419 | isa = XCBuildConfiguration; 420 | buildSettings = { 421 | BUNDLE_LOADER = "$(TEST_HOST)"; 422 | FRAMEWORK_SEARCH_PATHS = ( 423 | "$(SDKROOT)/Developer/Library/Frameworks", 424 | "$(inherited)", 425 | ); 426 | GCC_PREPROCESSOR_DEFINITIONS = ( 427 | "DEBUG=1", 428 | "$(inherited)", 429 | ); 430 | INFOPLIST_FILE = EKVideoControllerExampleTests/Info.plist; 431 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 432 | PRODUCT_NAME = "$(TARGET_NAME)"; 433 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EKVideoControllerExample.app/EKVideoControllerExample"; 434 | }; 435 | name = Debug; 436 | }; 437 | BE1ABD701AA9CEBC00F14029 /* Release */ = { 438 | isa = XCBuildConfiguration; 439 | buildSettings = { 440 | BUNDLE_LOADER = "$(TEST_HOST)"; 441 | FRAMEWORK_SEARCH_PATHS = ( 442 | "$(SDKROOT)/Developer/Library/Frameworks", 443 | "$(inherited)", 444 | ); 445 | INFOPLIST_FILE = EKVideoControllerExampleTests/Info.plist; 446 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 447 | PRODUCT_NAME = "$(TARGET_NAME)"; 448 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EKVideoControllerExample.app/EKVideoControllerExample"; 449 | }; 450 | name = Release; 451 | }; 452 | /* End XCBuildConfiguration section */ 453 | 454 | /* Begin XCConfigurationList section */ 455 | BE1ABD431AA9CEBC00F14029 /* Build configuration list for PBXProject "EKVideoControllerExample" */ = { 456 | isa = XCConfigurationList; 457 | buildConfigurations = ( 458 | BE1ABD691AA9CEBC00F14029 /* Debug */, 459 | BE1ABD6A1AA9CEBC00F14029 /* Release */, 460 | ); 461 | defaultConfigurationIsVisible = 0; 462 | defaultConfigurationName = Release; 463 | }; 464 | BE1ABD6B1AA9CEBC00F14029 /* Build configuration list for PBXNativeTarget "EKVideoControllerExample" */ = { 465 | isa = XCConfigurationList; 466 | buildConfigurations = ( 467 | BE1ABD6C1AA9CEBC00F14029 /* Debug */, 468 | BE1ABD6D1AA9CEBC00F14029 /* Release */, 469 | ); 470 | defaultConfigurationIsVisible = 0; 471 | defaultConfigurationName = Release; 472 | }; 473 | BE1ABD6E1AA9CEBC00F14029 /* Build configuration list for PBXNativeTarget "EKVideoControllerExampleTests" */ = { 474 | isa = XCConfigurationList; 475 | buildConfigurations = ( 476 | BE1ABD6F1AA9CEBC00F14029 /* Debug */, 477 | BE1ABD701AA9CEBC00F14029 /* Release */, 478 | ); 479 | defaultConfigurationIsVisible = 0; 480 | defaultConfigurationName = Release; 481 | }; 482 | /* End XCConfigurationList section */ 483 | }; 484 | rootObject = BE1ABD401AA9CEBC00F14029 /* Project object */; 485 | } 486 | -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // EKVideoControllerExample 4 | // 5 | // Created by Lucas Ortis on 06/03/2015. 6 | // Copyright (c) 2015 Ekhoo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // EKVideoControllerExample 4 | // 5 | // Created by Lucas Ortis on 06/03/2015. 6 | // Copyright (c) 2015 Ekhoo. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ExampleViewController.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | self.window = [[UIWindow alloc] initWithFrame:EK_SCREEN_BOUNDS]; 20 | 21 | ExampleViewController *exampleViewController = [ExampleViewController new]; 22 | self.window.rootViewController = exampleViewController; 23 | 24 | [self.window makeKeyAndVisible]; 25 | 26 | return YES; 27 | } 28 | 29 | - (void)applicationWillResignActive:(UIApplication *)application { 30 | } 31 | 32 | - (void)applicationDidEnterBackground:(UIApplication *)application { 33 | } 34 | 35 | - (void)applicationWillEnterForeground:(UIApplication *)application { 36 | } 37 | 38 | - (void)applicationDidBecomeActive:(UIApplication *)application { 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExample/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExample/ExampleViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // EKVideoControllerExample 4 | // 5 | // Created by Lucas Ortis on 06/03/2015. 6 | // Copyright (c) 2015 Ekhoo. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "EKVideoController.h" 11 | 12 | @interface ExampleViewController : EKVideoController 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExample/ExampleViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // EKVideoControllerExample 4 | // 5 | // Created by Lucas Ortis on 06/03/2015. 6 | // Copyright (c) 2015 Ekhoo. All rights reserved. 7 | // 8 | 9 | #import "ExampleViewController.h" 10 | 11 | @interface ExampleViewController () 12 | 13 | @end 14 | 15 | @implementation ExampleViewController 16 | 17 | - (void)loadView { 18 | self.view = [[UIView alloc] initWithFrame:EK_SCREEN_BOUNDS]; 19 | self.view.backgroundColor = [UIColor whiteColor]; 20 | 21 | /*** Video player ***/ 22 | self.videoPath = [[NSBundle mainBundle] pathForResource:@"Video" ofType:@"mp4"]; 23 | 24 | /*** Authentication ackground ***/ 25 | UIView *authBkg = [[UIView alloc] initWithFrame:CGRectMake(16.0f, 26 | CGRectGetMaxY(self.view.bounds) - 150.0f, 27 | CGRectGetMaxX(self.view.bounds) - 32.0f, 28 | 120.0f)]; 29 | authBkg.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.5f]; 30 | 31 | /*** Facebook connect button ***/ 32 | UIButton *facebookConnect = [UIButton buttonWithType:UIButtonTypeCustom]; 33 | [facebookConnect setBackgroundImage:[UIImage imageNamed:@"facebook-connect"] forState:UIControlStateNormal]; 34 | facebookConnect.frame = CGRectMake(0.0f, 0.0f, 270.0f, 60.0f); 35 | facebookConnect.center = CGPointMake(CGRectGetMidX(self.view.bounds), CGRectGetMinY(authBkg.frame) + 33.0f); 36 | 37 | /*** Log in button ***/ 38 | UIButton *loginButton = [UIButton buttonWithType:UIButtonTypeCustom]; 39 | [loginButton setTitle:@"Connect with email" forState:UIControlStateNormal]; 40 | loginButton.frame = CGRectMake(0.0f, 0.0f, 255.0f, 40.0f); 41 | loginButton.center = CGPointMake(CGRectGetMidX(self.view.bounds), CGRectGetMaxY(facebookConnect.frame) + 25.0f); 42 | loginButton.backgroundColor = [UIColor darkGrayColor]; 43 | loginButton.layer.cornerRadius = 5.0f; 44 | loginButton.layer.borderColor = [UIColor lightGrayColor].CGColor; 45 | loginButton.layer.borderWidth = 0.5f; 46 | 47 | [self.view addSubview:authBkg]; 48 | [self.view addSubview:facebookConnect]; 49 | [self.view addSubview:loginButton]; 50 | } 51 | 52 | - (void)viewDidLoad { 53 | [super viewDidLoad]; 54 | 55 | self.repeat = YES; 56 | self.maskTintColor = [UIColor blackColor]; 57 | self.maskAlpha = 0.5f; 58 | 59 | [self play]; 60 | } 61 | 62 | - (void)didReceiveMemoryWarning { 63 | [super didReceiveMemoryWarning]; 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExample/Images.xcassets/facebook-connect.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "facebook-connect.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "facebook-connect@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "facebook-connect@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExample/Images.xcassets/facebook-connect.imageset/facebook-connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ekhoo/EKVideoController/9092dba7d8c78c5078a6d195ceafdf104d00ee72/EKVideoControllerExample/EKVideoControllerExample/Images.xcassets/facebook-connect.imageset/facebook-connect.png -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExample/Images.xcassets/facebook-connect.imageset/facebook-connect@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ekhoo/EKVideoController/9092dba7d8c78c5078a6d195ceafdf104d00ee72/EKVideoControllerExample/EKVideoControllerExample/Images.xcassets/facebook-connect.imageset/facebook-connect@2x.png -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExample/Images.xcassets/facebook-connect.imageset/facebook-connect@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ekhoo/EKVideoController/9092dba7d8c78c5078a6d195ceafdf104d00ee72/EKVideoControllerExample/EKVideoControllerExample/Images.xcassets/facebook-connect.imageset/facebook-connect@3x.png -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | Ekhoo.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIViewControllerBasedStatusBarAppearance 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExample/PrefixHeader.pch: -------------------------------------------------------------------------------- 1 | // 2 | // PrefixHeader.pch 3 | // EKVideoControllerExample 4 | // 5 | // Created by Lucas Ortis on 06/03/2015. 6 | // Copyright (c) 2015 Ekhoo. All rights reserved. 7 | // 8 | 9 | #ifndef EKVideoControllerExample_PrefixHeader_pch 10 | #define EKVideoControllerExample_PrefixHeader_pch 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // EKVideoControllerExample 4 | // 5 | // Created by Lucas Ortis on 06/03/2015. 6 | // Copyright (c) 2015 Ekhoo. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExampleTests/EKVideoControllerExampleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // EKVideoControllerExampleTests.m 3 | // EKVideoControllerExampleTests 4 | // 5 | // Created by Lucas Ortis on 06/03/2015. 6 | // Copyright (c) 2015 Ekhoo. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface EKVideoControllerExampleTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation EKVideoControllerExampleTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /EKVideoControllerExample/EKVideoControllerExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | Ekhoo.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /EKVideoControllerExample/Ressources/Videos/Demonstration.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ekhoo/EKVideoController/9092dba7d8c78c5078a6d195ceafdf104d00ee72/EKVideoControllerExample/Ressources/Videos/Demonstration.gif -------------------------------------------------------------------------------- /EKVideoControllerExample/Ressources/Videos/Video.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ekhoo/EKVideoController/9092dba7d8c78c5078a6d195ceafdf104d00ee72/EKVideoControllerExample/Ressources/Videos/Video.mp4 -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Lucas Ortis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ![EKVideoController](http://img.shields.io/cocoapods/v/EKVideoController.svg?style=flat) 3 | # EKVideoController 4 | Light weight view controller which add a video as a full screen background for IOS written in Objective-C. 5 | 6 | ### Demonstration 7 | ![EKVideoController](https://github.com/Ekhoo/EKVideoController/blob/dev/EKVideoControllerExample/Ressources/Videos/Demonstration.gif) 8 | 9 | ### Features 10 | - You can set a video as a full screen background of your view controller. 11 | - You can set a repeat mode. 12 | - You can add a mask to the video. 13 | - You can handle the speed of the video. 14 | - You can play, stop, pause and restart the video. 15 | 16 | ### Usage 17 | - Inherit your `ViewController` by `EKVideoController`. 18 | - In `ViewDidLoad` or `LoadView` method, set `videoPath`. It can be a local path, or an url. 19 | - Then, call `play`. 20 | - Enjoy :) 21 | 22 | ### Example 23 | ``` objective-c 24 | - (void)viewDidLoad { 25 | [super viewDidLoad]; 26 | 27 | self.videoPath = [[NSBundle mainBundle] pathForResource:@"Video" ofType:@"mp4"]; 28 | self.repeat = YES; 29 | self.maskTintColor = [UIColor blackColor]; 30 | self.maskAlpha = 0.5f; 31 | 32 | [self play]; 33 | } 34 | ``` 35 | 36 | ### Contact 37 | - [contact@lucas-ortis.com](contact@lucas-ortis.com) 38 | - [Facebook](https://www.facebook.com/lucasekhoo.ortis) 39 | - [Linkedin](https://www.linkedin.com/profile/view?id=124705168) 40 | - [Twitter](https://twitter.com/LucasEkhoo) 41 | 42 | ### Lisence 43 | EKVideoController is available under the MIT license. See the LICENSE file for more info. 44 | --------------------------------------------------------------------------------