├── AVPlayerTest.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── yangboxing.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── AVPlayerTest.xcscheme │ └── xcschememanagement.plist ├── AVPlayerTest ├── AVPlayerTest.xcdatamodeld │ ├── .xccurrentversion │ └── AVPlayerTest.xcdatamodel │ │ └── contents ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── MaximumTrackImage.imageset │ │ ├── Contents.json │ │ └── MaximumTrackImage@2x.png │ ├── MinimumTrackImage.imageset │ │ ├── Contents.json │ │ └── MinimumTrackImage@2x.png │ ├── bg_media_default.imageset │ │ ├── Contents.json │ │ └── bg_media_default@2x.jpg │ ├── chongbo.imageset │ │ ├── Contents.json │ │ └── 重设.png │ ├── fenxiang.imageset │ │ ├── Contents.json │ │ └── 分享.png │ ├── full_minimize_btn.imageset │ │ ├── Contents.json │ │ ├── full_minimize_btn@2x.png │ │ └── full_minimize_btn@3x.png │ ├── full_minimize_btn_hl.imageset │ │ ├── Contents.json │ │ ├── full_minimize_btn_hl@2x.png │ │ └── full_minimize_btn_hl@3x.png │ ├── full_pause_btn.imageset │ │ ├── Contents.json │ │ ├── full_pause_btn@2x.png │ │ └── full_pause_btn@3x.png │ ├── full_pause_btn_hl.imageset │ │ ├── Contents.json │ │ ├── full_pause_btn_hl@2x.png │ │ └── full_pause_btn_hl@3x.png │ ├── full_play_btn.imageset │ │ ├── Contents.json │ │ ├── full_play_btn@2x.png │ │ └── full_play_btn@3x.png │ ├── full_play_btn_hl.imageset │ │ ├── Contents.json │ │ ├── full_play_btn_hl@2x.png │ │ └── full_play_btn_hl@3x.png │ ├── imageBackground.imageset │ │ ├── Contents.json │ │ └── 头像.jpg │ ├── mini_launchFullScreen_btn.imageset │ │ ├── Contents.json │ │ ├── mini_launchFullScreen_btn@2x.png │ │ └── mini_launchFullScreen_btn@3x.png │ ├── mini_launchFullScreen_btn_hl.imageset │ │ ├── Contents.json │ │ ├── mini_launchFullScreen_btn_hl@2x.png │ │ └── mini_launchFullScreen_btn_hl@3x.png │ ├── play.imageset │ │ ├── Contents.json │ │ └── 播放按钮.png │ ├── play1.imageset │ │ ├── Contents.json │ │ └── 播放.png │ └── thumbImage.imageset │ │ ├── Contents.json │ │ └── thumbImage@2x.png ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── CLAVPlayerView.h ├── CLAVPlayerView.m ├── CLAVPlayerView.xib ├── CLFullViewController.h ├── CLFullViewController.m ├── Info.plist ├── ViewController.h ├── ViewController.m └── main.m ├── AVPlayerTestTests ├── AVPlayerTestTests.m └── Info.plist └── AVPlayerTestUITests ├── AVPlayerTestUITests.m └── Info.plist /AVPlayerTest.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6BCF02FA1DC1C29F00A8595D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BCF02F91DC1C29F00A8595D /* main.m */; }; 11 | 6BCF02FD1DC1C29F00A8595D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BCF02FC1DC1C29F00A8595D /* AppDelegate.m */; }; 12 | 6BCF03001DC1C29F00A8595D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BCF02FF1DC1C29F00A8595D /* ViewController.m */; }; 13 | 6BCF03031DC1C29F00A8595D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6BCF03011DC1C29F00A8595D /* Main.storyboard */; }; 14 | 6BCF03061DC1C29F00A8595D /* AVPlayerTest.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 6BCF03041DC1C29F00A8595D /* AVPlayerTest.xcdatamodeld */; }; 15 | 6BCF030B1DC1C29F00A8595D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6BCF03091DC1C29F00A8595D /* LaunchScreen.storyboard */; }; 16 | 6BCF03161DC1C29F00A8595D /* AVPlayerTestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BCF03151DC1C29F00A8595D /* AVPlayerTestTests.m */; }; 17 | 6BCF03211DC1C29F00A8595D /* AVPlayerTestUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BCF03201DC1C29F00A8595D /* AVPlayerTestUITests.m */; }; 18 | 6BCF03301DC1C67600A8595D /* CLAVPlayerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BCF032F1DC1C67600A8595D /* CLAVPlayerView.m */; }; 19 | 6BCF03321DC1C68400A8595D /* CLAVPlayerView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6BCF03311DC1C68400A8595D /* CLAVPlayerView.xib */; }; 20 | 6BCF03371DC2297200A8595D /* CLFullViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BCF03361DC2297200A8595D /* CLFullViewController.m */; }; 21 | 6BCF03391DC2780A00A8595D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6BCF03381DC2780A00A8595D /* Assets.xcassets */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXContainerItemProxy section */ 25 | 6BCF03121DC1C29F00A8595D /* PBXContainerItemProxy */ = { 26 | isa = PBXContainerItemProxy; 27 | containerPortal = 6BCF02ED1DC1C29F00A8595D /* Project object */; 28 | proxyType = 1; 29 | remoteGlobalIDString = 6BCF02F41DC1C29F00A8595D; 30 | remoteInfo = AVPlayerTest; 31 | }; 32 | 6BCF031D1DC1C29F00A8595D /* PBXContainerItemProxy */ = { 33 | isa = PBXContainerItemProxy; 34 | containerPortal = 6BCF02ED1DC1C29F00A8595D /* Project object */; 35 | proxyType = 1; 36 | remoteGlobalIDString = 6BCF02F41DC1C29F00A8595D; 37 | remoteInfo = AVPlayerTest; 38 | }; 39 | /* End PBXContainerItemProxy section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 6BCF02F51DC1C29F00A8595D /* AVPlayerTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AVPlayerTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 6BCF02F91DC1C29F00A8595D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 44 | 6BCF02FB1DC1C29F00A8595D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 45 | 6BCF02FC1DC1C29F00A8595D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 46 | 6BCF02FE1DC1C29F00A8595D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 47 | 6BCF02FF1DC1C29F00A8595D /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 48 | 6BCF03021DC1C29F00A8595D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 49 | 6BCF03051DC1C29F00A8595D /* AVPlayerTest.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = AVPlayerTest.xcdatamodel; sourceTree = ""; }; 50 | 6BCF030A1DC1C29F00A8595D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 51 | 6BCF030C1DC1C29F00A8595D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 6BCF03111DC1C29F00A8595D /* AVPlayerTestTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AVPlayerTestTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 6BCF03151DC1C29F00A8595D /* AVPlayerTestTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AVPlayerTestTests.m; sourceTree = ""; }; 54 | 6BCF03171DC1C29F00A8595D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 6BCF031C1DC1C29F00A8595D /* AVPlayerTestUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AVPlayerTestUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | 6BCF03201DC1C29F00A8595D /* AVPlayerTestUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AVPlayerTestUITests.m; sourceTree = ""; }; 57 | 6BCF03221DC1C29F00A8595D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 6BCF032E1DC1C67600A8595D /* CLAVPlayerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CLAVPlayerView.h; sourceTree = ""; }; 59 | 6BCF032F1DC1C67600A8595D /* CLAVPlayerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CLAVPlayerView.m; sourceTree = ""; }; 60 | 6BCF03311DC1C68400A8595D /* CLAVPlayerView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CLAVPlayerView.xib; sourceTree = ""; }; 61 | 6BCF03351DC2297200A8595D /* CLFullViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CLFullViewController.h; sourceTree = ""; }; 62 | 6BCF03361DC2297200A8595D /* CLFullViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CLFullViewController.m; sourceTree = ""; }; 63 | 6BCF03381DC2780A00A8595D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 64 | /* End PBXFileReference section */ 65 | 66 | /* Begin PBXFrameworksBuildPhase section */ 67 | 6BCF02F21DC1C29F00A8595D /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | 6BCF030E1DC1C29F00A8595D /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | 6BCF03191DC1C29F00A8595D /* Frameworks */ = { 82 | isa = PBXFrameworksBuildPhase; 83 | buildActionMask = 2147483647; 84 | files = ( 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | /* End PBXFrameworksBuildPhase section */ 89 | 90 | /* Begin PBXGroup section */ 91 | 6BCF02EC1DC1C29F00A8595D = { 92 | isa = PBXGroup; 93 | children = ( 94 | 6BCF02F71DC1C29F00A8595D /* AVPlayerTest */, 95 | 6BCF03141DC1C29F00A8595D /* AVPlayerTestTests */, 96 | 6BCF031F1DC1C29F00A8595D /* AVPlayerTestUITests */, 97 | 6BCF02F61DC1C29F00A8595D /* Products */, 98 | ); 99 | sourceTree = ""; 100 | }; 101 | 6BCF02F61DC1C29F00A8595D /* Products */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 6BCF02F51DC1C29F00A8595D /* AVPlayerTest.app */, 105 | 6BCF03111DC1C29F00A8595D /* AVPlayerTestTests.xctest */, 106 | 6BCF031C1DC1C29F00A8595D /* AVPlayerTestUITests.xctest */, 107 | ); 108 | name = Products; 109 | sourceTree = ""; 110 | }; 111 | 6BCF02F71DC1C29F00A8595D /* AVPlayerTest */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | 6BCF02FB1DC1C29F00A8595D /* AppDelegate.h */, 115 | 6BCF02FC1DC1C29F00A8595D /* AppDelegate.m */, 116 | 6BCF02FE1DC1C29F00A8595D /* ViewController.h */, 117 | 6BCF02FF1DC1C29F00A8595D /* ViewController.m */, 118 | 6BCF032E1DC1C67600A8595D /* CLAVPlayerView.h */, 119 | 6BCF032F1DC1C67600A8595D /* CLAVPlayerView.m */, 120 | 6BCF03311DC1C68400A8595D /* CLAVPlayerView.xib */, 121 | 6BCF03351DC2297200A8595D /* CLFullViewController.h */, 122 | 6BCF03361DC2297200A8595D /* CLFullViewController.m */, 123 | 6BCF03381DC2780A00A8595D /* Assets.xcassets */, 124 | 6BCF03011DC1C29F00A8595D /* Main.storyboard */, 125 | 6BCF03091DC1C29F00A8595D /* LaunchScreen.storyboard */, 126 | 6BCF030C1DC1C29F00A8595D /* Info.plist */, 127 | 6BCF03041DC1C29F00A8595D /* AVPlayerTest.xcdatamodeld */, 128 | 6BCF02F81DC1C29F00A8595D /* Supporting Files */, 129 | ); 130 | path = AVPlayerTest; 131 | sourceTree = ""; 132 | }; 133 | 6BCF02F81DC1C29F00A8595D /* Supporting Files */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | 6BCF02F91DC1C29F00A8595D /* main.m */, 137 | ); 138 | name = "Supporting Files"; 139 | sourceTree = ""; 140 | }; 141 | 6BCF03141DC1C29F00A8595D /* AVPlayerTestTests */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | 6BCF03151DC1C29F00A8595D /* AVPlayerTestTests.m */, 145 | 6BCF03171DC1C29F00A8595D /* Info.plist */, 146 | ); 147 | path = AVPlayerTestTests; 148 | sourceTree = ""; 149 | }; 150 | 6BCF031F1DC1C29F00A8595D /* AVPlayerTestUITests */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | 6BCF03201DC1C29F00A8595D /* AVPlayerTestUITests.m */, 154 | 6BCF03221DC1C29F00A8595D /* Info.plist */, 155 | ); 156 | path = AVPlayerTestUITests; 157 | sourceTree = ""; 158 | }; 159 | /* End PBXGroup section */ 160 | 161 | /* Begin PBXNativeTarget section */ 162 | 6BCF02F41DC1C29F00A8595D /* AVPlayerTest */ = { 163 | isa = PBXNativeTarget; 164 | buildConfigurationList = 6BCF03251DC1C29F00A8595D /* Build configuration list for PBXNativeTarget "AVPlayerTest" */; 165 | buildPhases = ( 166 | 6BCF02F11DC1C29F00A8595D /* Sources */, 167 | 6BCF02F21DC1C29F00A8595D /* Frameworks */, 168 | 6BCF02F31DC1C29F00A8595D /* Resources */, 169 | ); 170 | buildRules = ( 171 | ); 172 | dependencies = ( 173 | ); 174 | name = AVPlayerTest; 175 | productName = AVPlayerTest; 176 | productReference = 6BCF02F51DC1C29F00A8595D /* AVPlayerTest.app */; 177 | productType = "com.apple.product-type.application"; 178 | }; 179 | 6BCF03101DC1C29F00A8595D /* AVPlayerTestTests */ = { 180 | isa = PBXNativeTarget; 181 | buildConfigurationList = 6BCF03281DC1C29F00A8595D /* Build configuration list for PBXNativeTarget "AVPlayerTestTests" */; 182 | buildPhases = ( 183 | 6BCF030D1DC1C29F00A8595D /* Sources */, 184 | 6BCF030E1DC1C29F00A8595D /* Frameworks */, 185 | 6BCF030F1DC1C29F00A8595D /* Resources */, 186 | ); 187 | buildRules = ( 188 | ); 189 | dependencies = ( 190 | 6BCF03131DC1C29F00A8595D /* PBXTargetDependency */, 191 | ); 192 | name = AVPlayerTestTests; 193 | productName = AVPlayerTestTests; 194 | productReference = 6BCF03111DC1C29F00A8595D /* AVPlayerTestTests.xctest */; 195 | productType = "com.apple.product-type.bundle.unit-test"; 196 | }; 197 | 6BCF031B1DC1C29F00A8595D /* AVPlayerTestUITests */ = { 198 | isa = PBXNativeTarget; 199 | buildConfigurationList = 6BCF032B1DC1C29F00A8595D /* Build configuration list for PBXNativeTarget "AVPlayerTestUITests" */; 200 | buildPhases = ( 201 | 6BCF03181DC1C29F00A8595D /* Sources */, 202 | 6BCF03191DC1C29F00A8595D /* Frameworks */, 203 | 6BCF031A1DC1C29F00A8595D /* Resources */, 204 | ); 205 | buildRules = ( 206 | ); 207 | dependencies = ( 208 | 6BCF031E1DC1C29F00A8595D /* PBXTargetDependency */, 209 | ); 210 | name = AVPlayerTestUITests; 211 | productName = AVPlayerTestUITests; 212 | productReference = 6BCF031C1DC1C29F00A8595D /* AVPlayerTestUITests.xctest */; 213 | productType = "com.apple.product-type.bundle.ui-testing"; 214 | }; 215 | /* End PBXNativeTarget section */ 216 | 217 | /* Begin PBXProject section */ 218 | 6BCF02ED1DC1C29F00A8595D /* Project object */ = { 219 | isa = PBXProject; 220 | attributes = { 221 | LastUpgradeCheck = 0730; 222 | ORGANIZATIONNAME = xx_cc; 223 | TargetAttributes = { 224 | 6BCF02F41DC1C29F00A8595D = { 225 | CreatedOnToolsVersion = 7.3.1; 226 | DevelopmentTeam = CS4CCCJCSM; 227 | }; 228 | 6BCF03101DC1C29F00A8595D = { 229 | CreatedOnToolsVersion = 7.3.1; 230 | DevelopmentTeam = CS4CCCJCSM; 231 | TestTargetID = 6BCF02F41DC1C29F00A8595D; 232 | }; 233 | 6BCF031B1DC1C29F00A8595D = { 234 | CreatedOnToolsVersion = 7.3.1; 235 | DevelopmentTeam = CS4CCCJCSM; 236 | TestTargetID = 6BCF02F41DC1C29F00A8595D; 237 | }; 238 | }; 239 | }; 240 | buildConfigurationList = 6BCF02F01DC1C29F00A8595D /* Build configuration list for PBXProject "AVPlayerTest" */; 241 | compatibilityVersion = "Xcode 3.2"; 242 | developmentRegion = English; 243 | hasScannedForEncodings = 0; 244 | knownRegions = ( 245 | en, 246 | Base, 247 | ); 248 | mainGroup = 6BCF02EC1DC1C29F00A8595D; 249 | productRefGroup = 6BCF02F61DC1C29F00A8595D /* Products */; 250 | projectDirPath = ""; 251 | projectRoot = ""; 252 | targets = ( 253 | 6BCF02F41DC1C29F00A8595D /* AVPlayerTest */, 254 | 6BCF03101DC1C29F00A8595D /* AVPlayerTestTests */, 255 | 6BCF031B1DC1C29F00A8595D /* AVPlayerTestUITests */, 256 | ); 257 | }; 258 | /* End PBXProject section */ 259 | 260 | /* Begin PBXResourcesBuildPhase section */ 261 | 6BCF02F31DC1C29F00A8595D /* Resources */ = { 262 | isa = PBXResourcesBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | 6BCF030B1DC1C29F00A8595D /* LaunchScreen.storyboard in Resources */, 266 | 6BCF03321DC1C68400A8595D /* CLAVPlayerView.xib in Resources */, 267 | 6BCF03391DC2780A00A8595D /* Assets.xcassets in Resources */, 268 | 6BCF03031DC1C29F00A8595D /* Main.storyboard in Resources */, 269 | ); 270 | runOnlyForDeploymentPostprocessing = 0; 271 | }; 272 | 6BCF030F1DC1C29F00A8595D /* Resources */ = { 273 | isa = PBXResourcesBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | ); 277 | runOnlyForDeploymentPostprocessing = 0; 278 | }; 279 | 6BCF031A1DC1C29F00A8595D /* Resources */ = { 280 | isa = PBXResourcesBuildPhase; 281 | buildActionMask = 2147483647; 282 | files = ( 283 | ); 284 | runOnlyForDeploymentPostprocessing = 0; 285 | }; 286 | /* End PBXResourcesBuildPhase section */ 287 | 288 | /* Begin PBXSourcesBuildPhase section */ 289 | 6BCF02F11DC1C29F00A8595D /* Sources */ = { 290 | isa = PBXSourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | 6BCF03371DC2297200A8595D /* CLFullViewController.m in Sources */, 294 | 6BCF03001DC1C29F00A8595D /* ViewController.m in Sources */, 295 | 6BCF03061DC1C29F00A8595D /* AVPlayerTest.xcdatamodeld in Sources */, 296 | 6BCF02FD1DC1C29F00A8595D /* AppDelegate.m in Sources */, 297 | 6BCF03301DC1C67600A8595D /* CLAVPlayerView.m in Sources */, 298 | 6BCF02FA1DC1C29F00A8595D /* main.m in Sources */, 299 | ); 300 | runOnlyForDeploymentPostprocessing = 0; 301 | }; 302 | 6BCF030D1DC1C29F00A8595D /* Sources */ = { 303 | isa = PBXSourcesBuildPhase; 304 | buildActionMask = 2147483647; 305 | files = ( 306 | 6BCF03161DC1C29F00A8595D /* AVPlayerTestTests.m in Sources */, 307 | ); 308 | runOnlyForDeploymentPostprocessing = 0; 309 | }; 310 | 6BCF03181DC1C29F00A8595D /* Sources */ = { 311 | isa = PBXSourcesBuildPhase; 312 | buildActionMask = 2147483647; 313 | files = ( 314 | 6BCF03211DC1C29F00A8595D /* AVPlayerTestUITests.m in Sources */, 315 | ); 316 | runOnlyForDeploymentPostprocessing = 0; 317 | }; 318 | /* End PBXSourcesBuildPhase section */ 319 | 320 | /* Begin PBXTargetDependency section */ 321 | 6BCF03131DC1C29F00A8595D /* PBXTargetDependency */ = { 322 | isa = PBXTargetDependency; 323 | target = 6BCF02F41DC1C29F00A8595D /* AVPlayerTest */; 324 | targetProxy = 6BCF03121DC1C29F00A8595D /* PBXContainerItemProxy */; 325 | }; 326 | 6BCF031E1DC1C29F00A8595D /* PBXTargetDependency */ = { 327 | isa = PBXTargetDependency; 328 | target = 6BCF02F41DC1C29F00A8595D /* AVPlayerTest */; 329 | targetProxy = 6BCF031D1DC1C29F00A8595D /* PBXContainerItemProxy */; 330 | }; 331 | /* End PBXTargetDependency section */ 332 | 333 | /* Begin PBXVariantGroup section */ 334 | 6BCF03011DC1C29F00A8595D /* Main.storyboard */ = { 335 | isa = PBXVariantGroup; 336 | children = ( 337 | 6BCF03021DC1C29F00A8595D /* Base */, 338 | ); 339 | name = Main.storyboard; 340 | sourceTree = ""; 341 | }; 342 | 6BCF03091DC1C29F00A8595D /* LaunchScreen.storyboard */ = { 343 | isa = PBXVariantGroup; 344 | children = ( 345 | 6BCF030A1DC1C29F00A8595D /* Base */, 346 | ); 347 | name = LaunchScreen.storyboard; 348 | sourceTree = ""; 349 | }; 350 | /* End PBXVariantGroup section */ 351 | 352 | /* Begin XCBuildConfiguration section */ 353 | 6BCF03231DC1C29F00A8595D /* Debug */ = { 354 | isa = XCBuildConfiguration; 355 | buildSettings = { 356 | ALWAYS_SEARCH_USER_PATHS = NO; 357 | CLANG_ANALYZER_NONNULL = YES; 358 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 359 | CLANG_CXX_LIBRARY = "libc++"; 360 | CLANG_ENABLE_MODULES = YES; 361 | CLANG_ENABLE_OBJC_ARC = YES; 362 | CLANG_WARN_BOOL_CONVERSION = YES; 363 | CLANG_WARN_CONSTANT_CONVERSION = YES; 364 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 365 | CLANG_WARN_EMPTY_BODY = YES; 366 | CLANG_WARN_ENUM_CONVERSION = YES; 367 | CLANG_WARN_INT_CONVERSION = YES; 368 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 369 | CLANG_WARN_UNREACHABLE_CODE = YES; 370 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 371 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 372 | COPY_PHASE_STRIP = NO; 373 | DEBUG_INFORMATION_FORMAT = dwarf; 374 | ENABLE_STRICT_OBJC_MSGSEND = YES; 375 | ENABLE_TESTABILITY = YES; 376 | GCC_C_LANGUAGE_STANDARD = gnu99; 377 | GCC_DYNAMIC_NO_PIC = NO; 378 | GCC_NO_COMMON_BLOCKS = YES; 379 | GCC_OPTIMIZATION_LEVEL = 0; 380 | GCC_PREPROCESSOR_DEFINITIONS = ( 381 | "DEBUG=1", 382 | "$(inherited)", 383 | ); 384 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 385 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 386 | GCC_WARN_UNDECLARED_SELECTOR = YES; 387 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 388 | GCC_WARN_UNUSED_FUNCTION = YES; 389 | GCC_WARN_UNUSED_VARIABLE = YES; 390 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 391 | MTL_ENABLE_DEBUG_INFO = YES; 392 | ONLY_ACTIVE_ARCH = YES; 393 | SDKROOT = iphoneos; 394 | }; 395 | name = Debug; 396 | }; 397 | 6BCF03241DC1C29F00A8595D /* Release */ = { 398 | isa = XCBuildConfiguration; 399 | buildSettings = { 400 | ALWAYS_SEARCH_USER_PATHS = NO; 401 | CLANG_ANALYZER_NONNULL = YES; 402 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 403 | CLANG_CXX_LIBRARY = "libc++"; 404 | CLANG_ENABLE_MODULES = YES; 405 | CLANG_ENABLE_OBJC_ARC = YES; 406 | CLANG_WARN_BOOL_CONVERSION = YES; 407 | CLANG_WARN_CONSTANT_CONVERSION = YES; 408 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 409 | CLANG_WARN_EMPTY_BODY = YES; 410 | CLANG_WARN_ENUM_CONVERSION = YES; 411 | CLANG_WARN_INT_CONVERSION = YES; 412 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 413 | CLANG_WARN_UNREACHABLE_CODE = YES; 414 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 415 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 416 | COPY_PHASE_STRIP = NO; 417 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 418 | ENABLE_NS_ASSERTIONS = NO; 419 | ENABLE_STRICT_OBJC_MSGSEND = YES; 420 | GCC_C_LANGUAGE_STANDARD = gnu99; 421 | GCC_NO_COMMON_BLOCKS = YES; 422 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 423 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 424 | GCC_WARN_UNDECLARED_SELECTOR = YES; 425 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 426 | GCC_WARN_UNUSED_FUNCTION = YES; 427 | GCC_WARN_UNUSED_VARIABLE = YES; 428 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 429 | MTL_ENABLE_DEBUG_INFO = NO; 430 | SDKROOT = iphoneos; 431 | VALIDATE_PRODUCT = YES; 432 | }; 433 | name = Release; 434 | }; 435 | 6BCF03261DC1C29F00A8595D /* Debug */ = { 436 | isa = XCBuildConfiguration; 437 | buildSettings = { 438 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 439 | INFOPLIST_FILE = AVPlayerTest/Info.plist; 440 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 441 | PRODUCT_BUNDLE_IDENTIFIER = xxIsMyPrecious.AVPlayerTest; 442 | PRODUCT_NAME = "$(TARGET_NAME)"; 443 | }; 444 | name = Debug; 445 | }; 446 | 6BCF03271DC1C29F00A8595D /* Release */ = { 447 | isa = XCBuildConfiguration; 448 | buildSettings = { 449 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 450 | INFOPLIST_FILE = AVPlayerTest/Info.plist; 451 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 452 | PRODUCT_BUNDLE_IDENTIFIER = xxIsMyPrecious.AVPlayerTest; 453 | PRODUCT_NAME = "$(TARGET_NAME)"; 454 | }; 455 | name = Release; 456 | }; 457 | 6BCF03291DC1C29F00A8595D /* Debug */ = { 458 | isa = XCBuildConfiguration; 459 | buildSettings = { 460 | BUNDLE_LOADER = "$(TEST_HOST)"; 461 | INFOPLIST_FILE = AVPlayerTestTests/Info.plist; 462 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 463 | PRODUCT_BUNDLE_IDENTIFIER = xxIsMyPrecious.AVPlayerTestTests; 464 | PRODUCT_NAME = "$(TARGET_NAME)"; 465 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AVPlayerTest.app/AVPlayerTest"; 466 | }; 467 | name = Debug; 468 | }; 469 | 6BCF032A1DC1C29F00A8595D /* Release */ = { 470 | isa = XCBuildConfiguration; 471 | buildSettings = { 472 | BUNDLE_LOADER = "$(TEST_HOST)"; 473 | INFOPLIST_FILE = AVPlayerTestTests/Info.plist; 474 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 475 | PRODUCT_BUNDLE_IDENTIFIER = xxIsMyPrecious.AVPlayerTestTests; 476 | PRODUCT_NAME = "$(TARGET_NAME)"; 477 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AVPlayerTest.app/AVPlayerTest"; 478 | }; 479 | name = Release; 480 | }; 481 | 6BCF032C1DC1C29F00A8595D /* Debug */ = { 482 | isa = XCBuildConfiguration; 483 | buildSettings = { 484 | INFOPLIST_FILE = AVPlayerTestUITests/Info.plist; 485 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 486 | PRODUCT_BUNDLE_IDENTIFIER = xxIsMyPrecious.AVPlayerTestUITests; 487 | PRODUCT_NAME = "$(TARGET_NAME)"; 488 | TEST_TARGET_NAME = AVPlayerTest; 489 | }; 490 | name = Debug; 491 | }; 492 | 6BCF032D1DC1C29F00A8595D /* Release */ = { 493 | isa = XCBuildConfiguration; 494 | buildSettings = { 495 | INFOPLIST_FILE = AVPlayerTestUITests/Info.plist; 496 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 497 | PRODUCT_BUNDLE_IDENTIFIER = xxIsMyPrecious.AVPlayerTestUITests; 498 | PRODUCT_NAME = "$(TARGET_NAME)"; 499 | TEST_TARGET_NAME = AVPlayerTest; 500 | }; 501 | name = Release; 502 | }; 503 | /* End XCBuildConfiguration section */ 504 | 505 | /* Begin XCConfigurationList section */ 506 | 6BCF02F01DC1C29F00A8595D /* Build configuration list for PBXProject "AVPlayerTest" */ = { 507 | isa = XCConfigurationList; 508 | buildConfigurations = ( 509 | 6BCF03231DC1C29F00A8595D /* Debug */, 510 | 6BCF03241DC1C29F00A8595D /* Release */, 511 | ); 512 | defaultConfigurationIsVisible = 0; 513 | defaultConfigurationName = Release; 514 | }; 515 | 6BCF03251DC1C29F00A8595D /* Build configuration list for PBXNativeTarget "AVPlayerTest" */ = { 516 | isa = XCConfigurationList; 517 | buildConfigurations = ( 518 | 6BCF03261DC1C29F00A8595D /* Debug */, 519 | 6BCF03271DC1C29F00A8595D /* Release */, 520 | ); 521 | defaultConfigurationIsVisible = 0; 522 | defaultConfigurationName = Release; 523 | }; 524 | 6BCF03281DC1C29F00A8595D /* Build configuration list for PBXNativeTarget "AVPlayerTestTests" */ = { 525 | isa = XCConfigurationList; 526 | buildConfigurations = ( 527 | 6BCF03291DC1C29F00A8595D /* Debug */, 528 | 6BCF032A1DC1C29F00A8595D /* Release */, 529 | ); 530 | defaultConfigurationIsVisible = 0; 531 | defaultConfigurationName = Release; 532 | }; 533 | 6BCF032B1DC1C29F00A8595D /* Build configuration list for PBXNativeTarget "AVPlayerTestUITests" */ = { 534 | isa = XCConfigurationList; 535 | buildConfigurations = ( 536 | 6BCF032C1DC1C29F00A8595D /* Debug */, 537 | 6BCF032D1DC1C29F00A8595D /* Release */, 538 | ); 539 | defaultConfigurationIsVisible = 0; 540 | defaultConfigurationName = Release; 541 | }; 542 | /* End XCConfigurationList section */ 543 | 544 | /* Begin XCVersionGroup section */ 545 | 6BCF03041DC1C29F00A8595D /* AVPlayerTest.xcdatamodeld */ = { 546 | isa = XCVersionGroup; 547 | children = ( 548 | 6BCF03051DC1C29F00A8595D /* AVPlayerTest.xcdatamodel */, 549 | ); 550 | currentVersion = 6BCF03051DC1C29F00A8595D /* AVPlayerTest.xcdatamodel */; 551 | path = AVPlayerTest.xcdatamodeld; 552 | sourceTree = ""; 553 | versionGroupType = wrapper.xcdatamodel; 554 | }; 555 | /* End XCVersionGroup section */ 556 | }; 557 | rootObject = 6BCF02ED1DC1C29F00A8595D /* Project object */; 558 | } 559 | -------------------------------------------------------------------------------- /AVPlayerTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AVPlayerTest.xcodeproj/xcuserdata/yangboxing.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /AVPlayerTest.xcodeproj/xcuserdata/yangboxing.xcuserdatad/xcschemes/AVPlayerTest.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /AVPlayerTest.xcodeproj/xcuserdata/yangboxing.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AVPlayerTest.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 6BCF02F41DC1C29F00A8595D 16 | 17 | primary 18 | 19 | 20 | 6BCF03101DC1C29F00A8595D 21 | 22 | primary 23 | 24 | 25 | 6BCF031B1DC1C29F00A8595D 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /AVPlayerTest/AVPlayerTest.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | AVPlayerTest.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /AVPlayerTest/AVPlayerTest.xcdatamodeld/AVPlayerTest.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /AVPlayerTest/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // AVPlayerTest 4 | // 5 | // Created by 杨博兴 on 16/10/27. 6 | // Copyright © 2016年 xx_cc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (strong, nonatomic) UIWindow *window; 15 | 16 | @property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext; 17 | @property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel; 18 | @property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator; 19 | 20 | - (void)saveContext; 21 | - (NSURL *)applicationDocumentsDirectory; 22 | 23 | 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /AVPlayerTest/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // AVPlayerTest 4 | // 5 | // Created by 杨博兴 on 16/10/27. 6 | // Copyright © 2016年 xx_cc. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | // Saves changes in the application's managed object context before the application terminates. 44 | [self saveContext]; 45 | } 46 | 47 | #pragma mark - Core Data stack 48 | 49 | @synthesize managedObjectContext = _managedObjectContext; 50 | @synthesize managedObjectModel = _managedObjectModel; 51 | @synthesize persistentStoreCoordinator = _persistentStoreCoordinator; 52 | 53 | - (NSURL *)applicationDocumentsDirectory { 54 | // The directory the application uses to store the Core Data store file. This code uses a directory named "xxIsMyPrecious.AVPlayerTest" in the application's documents directory. 55 | return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; 56 | } 57 | 58 | - (NSManagedObjectModel *)managedObjectModel { 59 | // The managed object model for the application. It is a fatal error for the application not to be able to find and load its model. 60 | if (_managedObjectModel != nil) { 61 | return _managedObjectModel; 62 | } 63 | NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"AVPlayerTest" withExtension:@"momd"]; 64 | _managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; 65 | return _managedObjectModel; 66 | } 67 | 68 | - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { 69 | // The persistent store coordinator for the application. This implementation creates and returns a coordinator, having added the store for the application to it. 70 | if (_persistentStoreCoordinator != nil) { 71 | return _persistentStoreCoordinator; 72 | } 73 | 74 | // Create the coordinator and store 75 | 76 | _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; 77 | NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"AVPlayerTest.sqlite"]; 78 | NSError *error = nil; 79 | NSString *failureReason = @"There was an error creating or loading the application's saved data."; 80 | if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) { 81 | // Report any error we got. 82 | NSMutableDictionary *dict = [NSMutableDictionary dictionary]; 83 | dict[NSLocalizedDescriptionKey] = @"Failed to initialize the application's saved data"; 84 | dict[NSLocalizedFailureReasonErrorKey] = failureReason; 85 | dict[NSUnderlyingErrorKey] = error; 86 | error = [NSError errorWithDomain:@"YOUR_ERROR_DOMAIN" code:9999 userInfo:dict]; 87 | // Replace this with code to handle the error appropriately. 88 | // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 89 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]); 90 | abort(); 91 | } 92 | 93 | return _persistentStoreCoordinator; 94 | } 95 | 96 | 97 | - (NSManagedObjectContext *)managedObjectContext { 98 | // Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.) 99 | if (_managedObjectContext != nil) { 100 | return _managedObjectContext; 101 | } 102 | 103 | NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; 104 | if (!coordinator) { 105 | return nil; 106 | } 107 | _managedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType]; 108 | [_managedObjectContext setPersistentStoreCoordinator:coordinator]; 109 | return _managedObjectContext; 110 | } 111 | 112 | #pragma mark - Core Data Saving support 113 | 114 | - (void)saveContext { 115 | NSManagedObjectContext *managedObjectContext = self.managedObjectContext; 116 | if (managedObjectContext != nil) { 117 | NSError *error = nil; 118 | if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) { 119 | // Replace this implementation with code to handle the error appropriately. 120 | // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 121 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]); 122 | abort(); 123 | } 124 | } 125 | } 126 | 127 | @end 128 | -------------------------------------------------------------------------------- /AVPlayerTest/Assets.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 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/MaximumTrackImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "MaximumTrackImage@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/MaximumTrackImage.imageset/MaximumTrackImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/MaximumTrackImage.imageset/MaximumTrackImage@2x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/MinimumTrackImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "MinimumTrackImage@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/MinimumTrackImage.imageset/MinimumTrackImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/MinimumTrackImage.imageset/MinimumTrackImage@2x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/bg_media_default.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "bg_media_default@2x.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/bg_media_default.imageset/bg_media_default@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/bg_media_default.imageset/bg_media_default@2x.jpg -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/chongbo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "重设.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/chongbo.imageset/重设.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/chongbo.imageset/重设.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/fenxiang.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "分享.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/fenxiang.imageset/分享.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/fenxiang.imageset/分享.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_minimize_btn.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "full_minimize_btn@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "full_minimize_btn@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_minimize_btn.imageset/full_minimize_btn@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/full_minimize_btn.imageset/full_minimize_btn@2x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_minimize_btn.imageset/full_minimize_btn@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/full_minimize_btn.imageset/full_minimize_btn@3x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_minimize_btn_hl.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "full_minimize_btn_hl@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "full_minimize_btn_hl@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_minimize_btn_hl.imageset/full_minimize_btn_hl@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/full_minimize_btn_hl.imageset/full_minimize_btn_hl@2x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_minimize_btn_hl.imageset/full_minimize_btn_hl@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/full_minimize_btn_hl.imageset/full_minimize_btn_hl@3x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_pause_btn.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "full_pause_btn@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "full_pause_btn@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_pause_btn.imageset/full_pause_btn@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/full_pause_btn.imageset/full_pause_btn@2x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_pause_btn.imageset/full_pause_btn@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/full_pause_btn.imageset/full_pause_btn@3x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_pause_btn_hl.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "full_pause_btn_hl@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "full_pause_btn_hl@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_pause_btn_hl.imageset/full_pause_btn_hl@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/full_pause_btn_hl.imageset/full_pause_btn_hl@2x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_pause_btn_hl.imageset/full_pause_btn_hl@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/full_pause_btn_hl.imageset/full_pause_btn_hl@3x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_play_btn.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "full_play_btn@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "full_play_btn@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_play_btn.imageset/full_play_btn@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/full_play_btn.imageset/full_play_btn@2x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_play_btn.imageset/full_play_btn@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/full_play_btn.imageset/full_play_btn@3x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_play_btn_hl.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "full_play_btn_hl@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "full_play_btn_hl@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_play_btn_hl.imageset/full_play_btn_hl@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/full_play_btn_hl.imageset/full_play_btn_hl@2x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/full_play_btn_hl.imageset/full_play_btn_hl@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/full_play_btn_hl.imageset/full_play_btn_hl@3x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/imageBackground.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "头像.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/imageBackground.imageset/头像.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/imageBackground.imageset/头像.jpg -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/mini_launchFullScreen_btn.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "mini_launchFullScreen_btn@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "mini_launchFullScreen_btn@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/mini_launchFullScreen_btn.imageset/mini_launchFullScreen_btn@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/mini_launchFullScreen_btn.imageset/mini_launchFullScreen_btn@2x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/mini_launchFullScreen_btn.imageset/mini_launchFullScreen_btn@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/mini_launchFullScreen_btn.imageset/mini_launchFullScreen_btn@3x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/mini_launchFullScreen_btn_hl.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "mini_launchFullScreen_btn_hl@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "mini_launchFullScreen_btn_hl@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/mini_launchFullScreen_btn_hl.imageset/mini_launchFullScreen_btn_hl@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/mini_launchFullScreen_btn_hl.imageset/mini_launchFullScreen_btn_hl@2x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/mini_launchFullScreen_btn_hl.imageset/mini_launchFullScreen_btn_hl@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/mini_launchFullScreen_btn_hl.imageset/mini_launchFullScreen_btn_hl@3x.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/play.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "播放按钮.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/play.imageset/播放按钮.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/play.imageset/播放按钮.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/play1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "播放.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/play1.imageset/播放.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/play1.imageset/播放.png -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/thumbImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "thumbImage@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AVPlayerTest/Assets.xcassets/thumbImage.imageset/thumbImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CLccxx/CLAVPlayer/c8c1696b44f00ce8cdd61874ae3b86456ea27e40/AVPlayerTest/Assets.xcassets/thumbImage.imageset/thumbImage@2x.png -------------------------------------------------------------------------------- /AVPlayerTest/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /AVPlayerTest/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /AVPlayerTest/CLAVPlayerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLAVPlayerView.h 3 | // AVPlayerTest 4 | // 5 | // Created by 杨博兴 on 16/10/27. 6 | // Copyright © 2016年 xx_cc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CLAVPlayerView : UIView 12 | 13 | /** 需要播放的视频资源 */ 14 | @property(nonatomic,strong)NSString *urlString; 15 | 16 | /* 包含在哪一个控制器中 */ 17 | @property (nonatomic, weak) UIViewController *contrainerViewController; 18 | 19 | /** 快速创建 */ 20 | + (instancetype)videoPlayView; 21 | 22 | 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /AVPlayerTest/CLAVPlayerView.m: -------------------------------------------------------------------------------- 1 | // 2 | // CLAVPlayerView.m 3 | // AVPlayerTest 4 | // 5 | // Created by 杨博兴 on 16/10/27. 6 | // Copyright © 2016年 xx_cc. All rights reserved. 7 | // 8 | 9 | #import "CLAVPlayerView.h" 10 | #import 11 | #import "CLFullViewController.h" 12 | 13 | @interface CLAVPlayerView () 14 | 15 | /** 背景imageView */ 16 | @property (weak, nonatomic) IBOutlet UIImageView *imageView; 17 | /** 工具条*/ 18 | @property (weak, nonatomic) IBOutlet UIView *toolView; 19 | /** 开始暂停按钮 */ 20 | @property (strong, nonatomic) IBOutlet UIButton *playOrPauseBtn; 21 | /** 滑动条 */ 22 | @property (strong, nonatomic) IBOutlet UISlider *progressSlider; 23 | /** 时间Label*/ 24 | @property (strong, nonatomic) IBOutlet UILabel *timeLabel; 25 | /** 总时间label */ 26 | @property (weak, nonatomic) IBOutlet UILabel *allTimeLabel; 27 | /** 全屏按钮 */ 28 | @property (weak, nonatomic) IBOutlet UIButton *fullScreen; 29 | /** 屏幕中央的开始按钮 */ 30 | @property (weak, nonatomic) IBOutlet UIButton *playOrPauseBigBtn; 31 | 32 | /** playerLayer */ 33 | @property(nonatomic,strong)AVPlayerLayer *playerLayer; 34 | /** player */ 35 | @property(nonatomic,strong)AVPlayer *player; 36 | /** playerItem */ 37 | @property(nonatomic,strong)AVPlayerItem *playerItem; 38 | 39 | /** 是否显示toolView */ 40 | @property(nonatomic,assign)BOOL isShowToolView; 41 | 42 | /** toolView显示时间的timer */ 43 | @property(nonatomic,strong)NSTimer *showTime; 44 | 45 | /** slider和播放时间定时器 */ 46 | @property(nonatomic,strong)NSTimer *progressTimer; 47 | 48 | /** 全屏播放控制器 */ 49 | @property(nonatomic,strong)CLFullViewController *fullVc; 50 | 51 | /** 播放完毕遮盖View */ 52 | @property (weak, nonatomic) IBOutlet UIView *coverView; 53 | 54 | @end 55 | 56 | @implementation CLAVPlayerView 57 | 58 | 59 | -(NSTimer *)progressTimer 60 | { 61 | if (_progressTimer == nil) { 62 | _progressTimer = [NSTimer timerWithTimeInterval:1.0 target:self selector:@selector(updateProgressInfo) userInfo:nil repeats:YES]; 63 | [[NSRunLoop mainRunLoop]addTimer:self.progressTimer forMode:NSRunLoopCommonModes]; 64 | } 65 | return _progressTimer; 66 | } 67 | 68 | 69 | + (instancetype)videoPlayView 70 | { 71 | return [[[NSBundle mainBundle]loadNibNamed:@"CLAVPlayerView" owner:nil options:nil]lastObject]; 72 | } 73 | 74 | /** 加载xib来到awakeFromNib */ 75 | -(void)awakeFromNib 76 | { 77 | // 隐藏遮盖版 78 | self.coverView.hidden = YES; 79 | 80 | //imageView添加手势 81 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapAction:)]; 82 | [self.imageView addGestureRecognizer:tap]; 83 | // 初始化player 和playerLayer 84 | self.player = [[AVPlayer alloc]init]; 85 | self.playerLayer = [AVPlayerLayer playerLayerWithPlayer:self.player]; 86 | // imageView上添加playerLayer 87 | [self.imageView.layer addSublayer:self.playerLayer]; 88 | 89 | // 设置工具栏状态 90 | self.toolView.alpha = 0; 91 | self.isShowToolView = NO; 92 | 93 | // 设置Slider 94 | [self.progressSlider setThumbImage:[UIImage imageNamed:@"thumbImage"] forState:UIControlStateNormal]; 95 | [self.progressSlider setMaximumTrackImage:[UIImage imageNamed:@"MaximumTrackImage"] forState:UIControlStateNormal]; 96 | [self.progressSlider setMinimumTrackImage:[UIImage imageNamed:@"MinimumTrackImage"] forState:UIControlStateNormal]; 97 | // 设置按钮状态 98 | self.playOrPauseBtn.selected = NO; 99 | } 100 | /** layoutSubViews 布局子控件 */ 101 | -(void)layoutSubviews 102 | { 103 | [super layoutSubviews]; 104 | self.playerLayer.frame = self.imageView.bounds; 105 | } 106 | /** 需要播放的视频资源set方法 */ 107 | -(void)setUrlString:(NSString *)urlString 108 | { 109 | _urlString = urlString; 110 | NSURL *url = [NSURL URLWithString:urlString]; 111 | self.playerItem = [AVPlayerItem playerItemWithURL:url]; 112 | } 113 | /** 中间播放按钮点击 */ 114 | - (IBAction)playOrPauseBigBtnClick:(UIButton *)sender { 115 | sender.hidden = YES; 116 | self.playOrPauseBtn.selected = YES; 117 | // 替换界面 118 | [self.player replaceCurrentItemWithPlayerItem:self.playerItem]; 119 | [self.player play]; 120 | [self addProgressTimer]; 121 | } 122 | 123 | /** imageView的tap手势方法 */ 124 | -(void)tapAction:(UITapGestureRecognizer *)tap 125 | { 126 | if (self.player.status == AVPlayerStatusUnknown) { 127 | [self playOrPauseBigBtnClick:self.playOrPauseBigBtn]; 128 | return; 129 | } 130 | self.isShowToolView = !self.isShowToolView; 131 | if (self.isShowToolView){ 132 | [UIView animateWithDuration:0.5 animations:^{ 133 | self.toolView.alpha = 1; 134 | }]; 135 | if (self.playOrPauseBtn.selected) { 136 | [self addShowTime]; 137 | } 138 | }else{ 139 | [self removeShowTime]; 140 | [UIView animateWithDuration:0.5 animations:^{ 141 | self.toolView.alpha = 0; 142 | }]; 143 | } 144 | } 145 | 146 | /** toolView显示时开始计时,5s后隐藏toolView */ 147 | -(void)addShowTime 148 | { 149 | self.showTime = [NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(upDateToolView) userInfo:nil repeats:NO]; 150 | [[NSRunLoop mainRunLoop]addTimer:self.showTime forMode:NSRunLoopCommonModes]; 151 | } 152 | /** 将toolView隐藏 */ 153 | -(void)upDateToolView 154 | { 155 | self.isShowToolView = !self.isShowToolView; 156 | [UIView animateWithDuration:0.5 animations:^{ 157 | self.toolView.alpha = 0; 158 | }]; 159 | NSLog(@"timer显示或者隐藏"); 160 | } 161 | -(void)removeShowTime 162 | { 163 | [self.showTime invalidate]; 164 | self.showTime = nil; 165 | } 166 | /** toolView上暂停按钮的点击事件 */ 167 | - (IBAction)playOrPauseBtnClick:(UIButton *)sender { 168 | // 播放状态按钮selected为YES,暂停状态selected为NO。 169 | sender.selected = !sender.selected; 170 | if (!sender.selected) { 171 | self.toolView.alpha = 1; 172 | [self removeShowTime]; 173 | [self.player pause]; 174 | [self removeProgressTimer]; 175 | }else{ 176 | [self addShowTime]; 177 | [self.player play]; 178 | [self addProgressTimer]; 179 | } 180 | } 181 | 182 | /** slider定时器添加 */ 183 | -(void)addProgressTimer 184 | { 185 | // self.progressTimer = [NSTimer timerWithTimeInterval:1.0 target:self selector:@selector(updateProgressInfo) userInfo:nil repeats:YES]; 186 | // [[NSRunLoop mainRunLoop]addTimer:self.progressTimer forMode:NSRunLoopCommonModes]; 187 | 188 | [self progressTimer]; 189 | } 190 | /** 移除slider定时器 */ 191 | -(void)removeProgressTimer 192 | { 193 | [self.progressTimer invalidate]; 194 | self.progressTimer = nil; 195 | } 196 | /** 更新slider和timeLabel */ 197 | - (void)updateProgressInfo 198 | { 199 | NSTimeInterval currentTime = CMTimeGetSeconds(self.player.currentTime); 200 | NSTimeInterval durationTime = CMTimeGetSeconds(self.player.currentItem.duration); 201 | 202 | self.timeLabel.text = [self timeToStringWithTimeInterval:currentTime]; 203 | self.allTimeLabel.text = [self timeToStringWithTimeInterval:durationTime]; 204 | self.progressSlider.value = CMTimeGetSeconds(self.player.currentTime) / CMTimeGetSeconds(self.player.currentItem.duration); 205 | 206 | 207 | if (self.progressSlider.value == 1) { 208 | [self removeProgressTimer]; 209 | self.coverView.hidden = NO; 210 | NSLog(@"播放完了"); 211 | } 212 | 213 | } 214 | 215 | /** 转换播放时间和总时间的方法 */ 216 | -(NSString *)timeToStringWithTimeInterval:(NSTimeInterval)interval; 217 | { 218 | NSInteger Min = interval / 60; 219 | NSInteger Sec = (NSInteger)interval % 60; 220 | NSString *intervalString = [NSString stringWithFormat:@"%02ld:%02ld",Min,Sec]; 221 | return intervalString; 222 | } 223 | 224 | /** slider拖动和点击事件 */ 225 | - (IBAction)touchDownSlider:(UISlider *)sender { 226 | // 按下去 移除监听器 227 | [self removeProgressTimer]; 228 | [self removeShowTime]; 229 | } 230 | - (IBAction)valueChangedSlider:(UISlider *)sender { 231 | 232 | // 计算slider拖动的点对应的播放时间 233 | NSTimeInterval currentTime = CMTimeGetSeconds(self.player.currentItem.duration) * sender.value; 234 | self.timeLabel.text = [self timeToStringWithTimeInterval:currentTime]; 235 | } 236 | - (IBAction)touchUpInside:(UISlider *)sender { 237 | [self addProgressTimer]; 238 | //计算当前slider拖动对应的播放时间 239 | NSTimeInterval currentTime = CMTimeGetSeconds(self.player.currentItem.duration) * sender.value; 240 | // 播放移动到当前播放时间 241 | [self.player seekToTime:CMTimeMakeWithSeconds(currentTime, NSEC_PER_SEC) toleranceBefore:kCMTimeZero toleranceAfter:kCMTimeZero]; 242 | [self addShowTime]; 243 | } 244 | 245 | 246 | 247 | 248 | 249 | /** 全屏按钮点击事件 */ 250 | - (IBAction)fullViewBtnClick:(UIButton *)sender { 251 | sender.selected = !sender.selected; 252 | [self videoplayViewSwitchOrientation:sender.selected]; 253 | } 254 | /** 弹出全屏播放器 */ 255 | - (void)videoplayViewSwitchOrientation:(BOOL)isFull 256 | { 257 | if (isFull) { 258 | [self.contrainerViewController presentViewController:self.fullVc animated:NO completion:^{ 259 | [self.fullVc.view addSubview:self]; 260 | self.center = self.fullVc.view.center; 261 | 262 | [UIView animateWithDuration:0.15 delay:0.0 options:UIViewAnimationOptionLayoutSubviews animations:^{ 263 | self.frame = self.fullVc.view.bounds; 264 | } completion:nil]; 265 | }]; 266 | } else { 267 | [self.fullVc dismissViewControllerAnimated:NO completion:^{ 268 | [self.contrainerViewController.view addSubview:self]; 269 | 270 | [UIView animateWithDuration:0.15 delay:0.0 options:UIViewAnimationOptionLayoutSubviews animations:^{ 271 | self.frame = CGRectMake(0, 200, self.contrainerViewController.view.bounds.size.width, self.contrainerViewController.view.bounds.size.width * 9 / 16); 272 | } completion:nil]; 273 | }]; 274 | } 275 | } 276 | #pragma mark - 懒加载代码 277 | - (CLFullViewController *)fullVc 278 | { 279 | if (_fullVc == nil) { 280 | _fullVc = [[CLFullViewController alloc] init]; 281 | } 282 | return _fullVc; 283 | } 284 | 285 | /** 重播按钮点击 */ 286 | - (IBAction)repeatBtnClick:(UIButton *)sender { 287 | 288 | // [self playOrPauseBigBtnClick:self.playOrPauseBigBtn]; 289 | self.progressSlider.value = 0; 290 | [self touchUpInside:self.progressSlider]; 291 | self.coverView.hidden = YES; 292 | [self playOrPauseBigBtnClick:self.playOrPauseBigBtn]; 293 | } 294 | 295 | 296 | 297 | @end 298 | -------------------------------------------------------------------------------- /AVPlayerTest/CLAVPlayerView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 29 | 30 | 31 | 32 | 43 | 56 | 62 | 71 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 135 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | -------------------------------------------------------------------------------- /AVPlayerTest/CLFullViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLFullViewController.h 3 | // AVPlayerTest 4 | // 5 | // Created by 杨博兴 on 16/10/27. 6 | // Copyright © 2016年 xx_cc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CLFullViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AVPlayerTest/CLFullViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CLFullViewController.m 3 | // AVPlayerTest 4 | // 5 | // Created by 杨博兴 on 16/10/27. 6 | // Copyright © 2016年 xx_cc. All rights reserved. 7 | // 8 | 9 | #import "CLFullViewController.h" 10 | 11 | @interface CLFullViewController () 12 | 13 | @end 14 | 15 | @implementation CLFullViewController 16 | 17 | - (UIInterfaceOrientationMask)supportedInterfaceOrientations 18 | { 19 | return UIInterfaceOrientationMaskLandscape; 20 | } 21 | 22 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation 23 | { 24 | return YES; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /AVPlayerTest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 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 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | NSAppTransportSecurity 40 | 41 | NSAllowsArbitraryLoads 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /AVPlayerTest/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // AVPlayerTest 4 | // 5 | // Created by 杨博兴 on 16/10/27. 6 | // Copyright © 2016年 xx_cc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /AVPlayerTest/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // AVPlayerTest 4 | // 5 | // Created by 杨博兴 on 16/10/27. 6 | // Copyright © 2016年 xx_cc. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import 11 | #import "CLAVPlayerView.h" 12 | 13 | @interface ViewController () 14 | 15 | @property(nonatomic,strong)CLAVPlayerView *playView; 16 | 17 | @end 18 | 19 | @implementation ViewController 20 | 21 | 22 | 23 | 24 | 25 | - (void)viewDidLoad { 26 | [super viewDidLoad]; 27 | 28 | // CLAVPlayerView *playView = [[[NSBundle mainBundle]loadNibNamed:@"CLAVPlayerView" owner:nil options:nil]lastObject]; 29 | 30 | [self setUpVideoPlayView]; 31 | 32 | self.playView.urlString = @"http://120.25.226.186:32812/resources/videos/minion_02.mp4"; 33 | } 34 | 35 | 36 | -(void)setUpVideoPlayView 37 | { 38 | self.playView = [CLAVPlayerView videoPlayView]; 39 | self.playView.frame = CGRectMake(0, 200, self.view.frame.size.width, self.view.frame.size.width * 9 / 16); 40 | self.playView.contrainerViewController = self; 41 | [self.view addSubview:self.playView]; 42 | 43 | } 44 | 45 | 46 | - (void)didReceiveMemoryWarning { 47 | [super didReceiveMemoryWarning]; 48 | // Dispose of any resources that can be recreated. 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /AVPlayerTest/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // AVPlayerTest 4 | // 5 | // Created by 杨博兴 on 16/10/27. 6 | // Copyright © 2016年 xx_cc. 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 | -------------------------------------------------------------------------------- /AVPlayerTestTests/AVPlayerTestTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AVPlayerTestTests.m 3 | // AVPlayerTestTests 4 | // 5 | // Created by 杨博兴 on 16/10/27. 6 | // Copyright © 2016年 xx_cc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AVPlayerTestTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation AVPlayerTestTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /AVPlayerTestTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 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 | -------------------------------------------------------------------------------- /AVPlayerTestUITests/AVPlayerTestUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AVPlayerTestUITests.m 3 | // AVPlayerTestUITests 4 | // 5 | // Created by 杨博兴 on 16/10/27. 6 | // Copyright © 2016年 xx_cc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AVPlayerTestUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation AVPlayerTestUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /AVPlayerTestUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 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 | --------------------------------------------------------------------------------