├── Pods ├── Headers │ ├── Private │ │ └── Masonry │ │ │ ├── Masonry.h │ │ │ ├── MASUtilities.h │ │ │ ├── MASConstraint.h │ │ │ ├── MASViewAttribute.h │ │ │ ├── MASViewConstraint.h │ │ │ ├── View+MASAdditions.h │ │ │ ├── MASConstraintMaker.h │ │ │ ├── MASLayoutConstraint.h │ │ │ ├── NSArray+MASAdditions.h │ │ │ ├── MASCompositeConstraint.h │ │ │ ├── MASConstraint+Private.h │ │ │ ├── View+MASShorthandAdditions.h │ │ │ ├── ViewController+MASAdditions.h │ │ │ ├── NSArray+MASShorthandAdditions.h │ │ │ └── NSLayoutConstraint+MASDebugAdditions.h │ └── Public │ │ └── Masonry │ │ ├── Masonry.h │ │ ├── MASConstraint.h │ │ ├── MASUtilities.h │ │ ├── MASConstraintMaker.h │ │ ├── MASViewAttribute.h │ │ ├── MASViewConstraint.h │ │ ├── View+MASAdditions.h │ │ ├── MASLayoutConstraint.h │ │ ├── NSArray+MASAdditions.h │ │ ├── MASCompositeConstraint.h │ │ ├── MASConstraint+Private.h │ │ ├── View+MASShorthandAdditions.h │ │ ├── ViewController+MASAdditions.h │ │ ├── NSArray+MASShorthandAdditions.h │ │ └── NSLayoutConstraint+MASDebugAdditions.h ├── Target Support Files │ ├── Masonry │ │ ├── Masonry-dummy.m │ │ ├── Masonry-prefix.pch │ │ └── Masonry.xcconfig │ └── Pods-TTAVPlayer │ │ ├── Pods-TTAVPlayer-dummy.m │ │ ├── Pods-TTAVPlayer.debug.xcconfig │ │ ├── Pods-TTAVPlayer.release.xcconfig │ │ ├── Pods-TTAVPlayer-acknowledgements.markdown │ │ ├── Pods-TTAVPlayer-acknowledgements.plist │ │ ├── Pods-TTAVPlayer-frameworks.sh │ │ └── Pods-TTAVPlayer-resources.sh ├── Manifest.lock ├── Masonry │ ├── Masonry │ │ ├── MASLayoutConstraint.m │ │ ├── NSLayoutConstraint+MASDebugAdditions.h │ │ ├── MASLayoutConstraint.h │ │ ├── MASCompositeConstraint.h │ │ ├── Masonry.h │ │ ├── ViewController+MASAdditions.h │ │ ├── NSArray+MASShorthandAdditions.h │ │ ├── MASViewAttribute.m │ │ ├── MASViewAttribute.h │ │ ├── ViewController+MASAdditions.m │ │ ├── MASViewConstraint.h │ │ ├── MASConstraint+Private.h │ │ ├── NSArray+MASAdditions.h │ │ ├── View+MASShorthandAdditions.h │ │ ├── View+MASAdditions.h │ │ ├── MASCompositeConstraint.m │ │ ├── MASConstraintMaker.h │ │ ├── View+MASAdditions.m │ │ └── NSLayoutConstraint+MASDebugAdditions.m │ └── LICENSE └── Pods.xcodeproj │ └── xcuserdata │ └── claudeli.xcuserdatad │ └── xcschemes │ ├── xcschememanagement.plist │ ├── Masonry.xcscheme │ └── Pods-TTAVPlayer.xcscheme ├── AVPlayer ├── .DS_Store ├── Base.lproj │ ├── .DS_Store │ ├── Main.storyboard │ └── LaunchScreen.storyboard ├── VideoPlayer │ ├── .DS_Store │ ├── Image │ │ ├── Player_后退@2x.png │ │ ├── MoviePlayer_Full@2x.png │ │ ├── MoviePlayer_Play@2x.png │ │ ├── MoviePlayer_Stop@2x.png │ │ ├── MoviePlayer_小屏@2x.png │ │ ├── MoviePlayer_已锁@2x.png │ │ ├── MoviePlayer_快进@2x.png │ │ ├── MoviePlayer_快退@2x.png │ │ ├── MoviePlayer_锁屏@2x.png │ │ ├── MoviePlayer_Slider@2x.png │ │ ├── MoviePlayer_Play_Big@2x.png │ │ └── MoviePlayer_Stop_Big@2x.png │ ├── Tools │ │ ├── NSString+time.h │ │ ├── CLRotatingScreen.h │ │ ├── NSString+time.m │ │ └── CLRotatingScreen.m │ └── VideoPlayer.h ├── ViewController.h ├── AVPlayer.xcdatamodeld │ ├── .xccurrentversion │ └── AVPlayer.xcdatamodel │ │ └── contents ├── UIColor+color.h ├── main.m ├── PlayerViewController.h ├── AppDelegate.h ├── AVPlayer.pch ├── UIColor+color.m ├── ViewController.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── PlayerViewController.m ├── PlayerViewController.xib └── AppDelegate.m ├── 20141121215131793.png ├── 20141121215205505.png ├── TTAVPlayer ├── Assets.xcassets │ ├── Contents.json │ ├── TTAVPlayerIcon │ │ ├── Contents.json │ │ ├── TTPlayerIcon_loading.imageset │ │ │ ├── TTPlayerIcon_loading@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_big_last.imageset │ │ │ ├── TTPlayerIcon_big_last@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_big_lock.imageset │ │ │ ├── TTPlayerIcon_big_lock@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_big_next.imageset │ │ │ ├── TTPlayerIcon_big_next@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_big_play.imageset │ │ │ ├── TTPlayerIcon_big_play@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_stop_big.imageset │ │ │ ├── TTPlayerIcon_stop_big@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_big_goback.imageset │ │ │ ├── TTPlayerIcon_big_goback@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_big_loops.imageset │ │ │ ├── TTPlayerIcon_big_loops@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_big_pause.imageset │ │ │ ├── TTPlayerIcon_big_pause@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_big_point.imageset │ │ │ ├── TTPlayerIcon_big_point@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_big_share.imageset │ │ │ ├── TTPlayerIcon_big_share@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_big_unLast.imageset │ │ │ ├── TTPlayerIcon_big_unLast@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_big_unLock.imageset │ │ │ ├── TTPlayerIcon_big_unLock@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_big_unNext.imageset │ │ │ ├── TTPlayerIcon_big_unNext@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_small_play.imageset │ │ │ ├── TTPlayerIcon_small_play@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_small_pause.imageset │ │ │ ├── TTPlayerIcon_small_pause@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_small_point.imageset │ │ │ ├── TTPlayerIcon_small_point@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_small_sweep.imageset │ │ │ ├── TTPlayerIcon_small_sweep@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_big_tiltLine.imageset │ │ │ ├── TTPlayerIcon_big_tiltLine@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_small_rotate.imageset │ │ │ ├── TTPlayerIcon_small_rotate@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_big_singleOne.imageset │ │ │ ├── TTPlayerIcon_big_singleOne@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_training_last.imageset │ │ │ ├── TTPlayerIcon_training_last@2x.png │ │ │ ├── TTPlayerIcon_training_last@3x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_training_mask.imageset │ │ │ ├── TTPlayerIcon_training_mask@2x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_training_next.imageset │ │ │ ├── TTPlayerIcon_training_next@2x.png │ │ │ ├── TTPlayerIcon_training_next@3x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_training_play.imageset │ │ │ ├── TTPlayerIcon_training_play@2x.png │ │ │ ├── TTPlayerIcon_training_play@3x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_training_crown.imageset │ │ │ ├── TTPlayerIcon_training_crown@2x.png │ │ │ ├── TTPlayerIcon_training_crown@3x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_training_pause.imageset │ │ │ ├── TTPlayerIcon_training_pause@2x.png │ │ │ ├── TTPlayerIcon_training_pause@3x.png │ │ │ └── Contents.json │ │ ├── TTPlayerIcon_training_everyday.imageset │ │ │ ├── TTPlayerIcon_training_everyday@2x.png │ │ │ ├── TTPlayerIcon_training_everyday@3x.png │ │ │ └── Contents.json │ │ └── TTPlayerIcon_training_bigPause2.imageset │ │ │ ├── TTPlayerIcon_training_bigPause2@2x.png │ │ │ ├── TTPlayerIcon_training_bigPause2@3x.png │ │ │ └── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── MyViewController.h ├── TTAVPlayerSDK │ ├── Tools │ │ ├── NSObject+TTKVO.h │ │ ├── UIView+UIViewController.h │ │ ├── NSString+TTPlayer.h │ │ ├── UIView+UIViewController.m │ │ ├── NSString+TTPlayer.m │ │ ├── TTAVPlayerGestureView.h │ │ └── NSObject+TTKVO.m │ ├── TTPlayerLandscapeController.h │ ├── TTVideoItem.m │ ├── TTAVPlayerView+Layout.h │ ├── TTPlayerManager.m │ ├── TTVideoItem.h │ ├── TTLandscapePlayerController.h │ ├── TTPlayerManager.h │ ├── TTPlayerViewController.h │ ├── TTAVPlayerSDK.h │ ├── TTPlayerLandscapeController.m │ ├── TTPlayerViewController.xib │ ├── TTLandscapePlayerController.xib │ ├── TTAVPlayer.h │ ├── TTLandscapePlayerController.m │ └── TTAVPlayerView.h ├── TTTabBarController.h ├── ViewController.h ├── TTAVPlayer.xcdatamodeld │ ├── .xccurrentversion │ └── TTAVPlayer.xcdatamodel │ │ └── contents ├── main.m ├── AppDelegate.h ├── TTTabBarController.m ├── MyViewController.m ├── Info.plist ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── ViewController.m └── AppDelegate.m ├── Podfile ├── AVPlayer.xcodeproj ├── xcuserdata │ └── ClaudeLi.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── AVPlayer.xcscheme └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ └── ClaudeLi.xcuserdatad │ └── UserInterfaceState.xcuserstate ├── TTAVPlayer.xcworkspace ├── xcuserdata │ └── claudeli.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist └── contents.xcworkspacedata ├── TTAVPlayer.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── claudeli.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── claudeli.xcuserdatad │ └── xcschemes │ ├── xcschememanagement.plist │ └── TTAVPlayer.xcscheme ├── Podfile.lock └── README.md /Pods/Headers/Private/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/Masonry.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/Masonry.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASUtilities.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASUtilities.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint.h -------------------------------------------------------------------------------- /AVPlayer/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/AVPlayer/.DS_Store -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewAttribute.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraintMaker.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewAttribute.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASAdditions.h -------------------------------------------------------------------------------- /20141121215131793.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/20141121215131793.png -------------------------------------------------------------------------------- /20141121215205505.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/20141121215205505.png -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraintMaker.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASLayoutConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASLayoutConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASCompositeConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint+Private.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASCompositeConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint+Private.h -------------------------------------------------------------------------------- /AVPlayer/Base.lproj/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/AVPlayer/Base.lproj/.DS_Store -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/AVPlayer/VideoPlayer/.DS_Store -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/Image/Player_后退@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/AVPlayer/VideoPlayer/Image/Player_后退@2x.png -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/Image/MoviePlayer_Full@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/AVPlayer/VideoPlayer/Image/MoviePlayer_Full@2x.png -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/Image/MoviePlayer_Play@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/AVPlayer/VideoPlayer/Image/MoviePlayer_Play@2x.png -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/Image/MoviePlayer_Stop@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/AVPlayer/VideoPlayer/Image/MoviePlayer_Stop@2x.png -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/Image/MoviePlayer_小屏@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/AVPlayer/VideoPlayer/Image/MoviePlayer_小屏@2x.png -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/Image/MoviePlayer_已锁@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/AVPlayer/VideoPlayer/Image/MoviePlayer_已锁@2x.png -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/Image/MoviePlayer_快进@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/AVPlayer/VideoPlayer/Image/MoviePlayer_快进@2x.png -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/Image/MoviePlayer_快退@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/AVPlayer/VideoPlayer/Image/MoviePlayer_快退@2x.png -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/Image/MoviePlayer_锁屏@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/AVPlayer/VideoPlayer/Image/MoviePlayer_锁屏@2x.png -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/Image/MoviePlayer_Slider@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/AVPlayer/VideoPlayer/Image/MoviePlayer_Slider@2x.png -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # platform :ios, '7.0' 2 | source 'https://github.com/CocoaPods/Specs.git' 3 | 4 | target 'TTAVPlayer' do 5 | pod 'Masonry', '~> 1.0.2' 6 | end 7 | -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/Image/MoviePlayer_Play_Big@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/AVPlayer/VideoPlayer/Image/MoviePlayer_Play_Big@2x.png -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/Image/MoviePlayer_Stop_Big@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/AVPlayer/VideoPlayer/Image/MoviePlayer_Stop_Big@2x.png -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Masonry : NSObject 3 | @end 4 | @implementation PodsDummy_Masonry 5 | @end 6 | -------------------------------------------------------------------------------- /AVPlayer.xcodeproj/xcuserdata/ClaudeLi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TTAVPlayer/Pods-TTAVPlayer-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_TTAVPlayer : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_TTAVPlayer 5 | @end 6 | -------------------------------------------------------------------------------- /TTAVPlayer.xcworkspace/xcuserdata/claudeli.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer.xcworkspace/xcuserdata/claudeli.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /AVPlayer.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TTAVPlayer.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_loading.imageset/TTPlayerIcon_loading@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_loading.imageset/TTPlayerIcon_loading@2x.png -------------------------------------------------------------------------------- /AVPlayer.xcodeproj/project.xcworkspace/xcuserdata/ClaudeLi.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/AVPlayer.xcodeproj/project.xcworkspace/xcuserdata/ClaudeLi.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_last.imageset/TTPlayerIcon_big_last@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_last.imageset/TTPlayerIcon_big_last@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_lock.imageset/TTPlayerIcon_big_lock@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_lock.imageset/TTPlayerIcon_big_lock@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_next.imageset/TTPlayerIcon_big_next@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_next.imageset/TTPlayerIcon_big_next@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_play.imageset/TTPlayerIcon_big_play@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_play.imageset/TTPlayerIcon_big_play@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_stop_big.imageset/TTPlayerIcon_stop_big@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_stop_big.imageset/TTPlayerIcon_stop_big@2x.png -------------------------------------------------------------------------------- /TTAVPlayer.xcodeproj/project.xcworkspace/xcuserdata/claudeli.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer.xcodeproj/project.xcworkspace/xcuserdata/claudeli.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_goback.imageset/TTPlayerIcon_big_goback@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_goback.imageset/TTPlayerIcon_big_goback@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_loops.imageset/TTPlayerIcon_big_loops@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_loops.imageset/TTPlayerIcon_big_loops@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_pause.imageset/TTPlayerIcon_big_pause@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_pause.imageset/TTPlayerIcon_big_pause@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_point.imageset/TTPlayerIcon_big_point@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_point.imageset/TTPlayerIcon_big_point@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_share.imageset/TTPlayerIcon_big_share@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_share.imageset/TTPlayerIcon_big_share@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_unLast.imageset/TTPlayerIcon_big_unLast@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_unLast.imageset/TTPlayerIcon_big_unLast@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_unLock.imageset/TTPlayerIcon_big_unLock@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_unLock.imageset/TTPlayerIcon_big_unLock@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_unNext.imageset/TTPlayerIcon_big_unNext@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_unNext.imageset/TTPlayerIcon_big_unNext@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_small_play.imageset/TTPlayerIcon_small_play@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_small_play.imageset/TTPlayerIcon_small_play@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_small_pause.imageset/TTPlayerIcon_small_pause@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_small_pause.imageset/TTPlayerIcon_small_pause@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_small_point.imageset/TTPlayerIcon_small_point@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_small_point.imageset/TTPlayerIcon_small_point@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_small_sweep.imageset/TTPlayerIcon_small_sweep@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_small_sweep.imageset/TTPlayerIcon_small_sweep@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_tiltLine.imageset/TTPlayerIcon_big_tiltLine@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_tiltLine.imageset/TTPlayerIcon_big_tiltLine@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_small_rotate.imageset/TTPlayerIcon_small_rotate@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_small_rotate.imageset/TTPlayerIcon_small_rotate@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_singleOne.imageset/TTPlayerIcon_big_singleOne@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_singleOne.imageset/TTPlayerIcon_big_singleOne@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_last.imageset/TTPlayerIcon_training_last@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_last.imageset/TTPlayerIcon_training_last@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_last.imageset/TTPlayerIcon_training_last@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_last.imageset/TTPlayerIcon_training_last@3x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_mask.imageset/TTPlayerIcon_training_mask@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_mask.imageset/TTPlayerIcon_training_mask@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_next.imageset/TTPlayerIcon_training_next@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_next.imageset/TTPlayerIcon_training_next@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_next.imageset/TTPlayerIcon_training_next@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_next.imageset/TTPlayerIcon_training_next@3x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_play.imageset/TTPlayerIcon_training_play@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_play.imageset/TTPlayerIcon_training_play@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_play.imageset/TTPlayerIcon_training_play@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_play.imageset/TTPlayerIcon_training_play@3x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_crown.imageset/TTPlayerIcon_training_crown@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_crown.imageset/TTPlayerIcon_training_crown@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_crown.imageset/TTPlayerIcon_training_crown@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_crown.imageset/TTPlayerIcon_training_crown@3x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_pause.imageset/TTPlayerIcon_training_pause@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_pause.imageset/TTPlayerIcon_training_pause@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_pause.imageset/TTPlayerIcon_training_pause@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_pause.imageset/TTPlayerIcon_training_pause@3x.png -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Masonry (1.0.2) 3 | 4 | DEPENDENCIES: 5 | - Masonry (~> 1.0.2) 6 | 7 | SPEC CHECKSUMS: 8 | Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e 9 | 10 | PODFILE CHECKSUM: 2f2140897f89d009ba1077032ea468b9f33c44a6 11 | 12 | COCOAPODS: 1.2.0.beta.1 13 | -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_everyday.imageset/TTPlayerIcon_training_everyday@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_everyday.imageset/TTPlayerIcon_training_everyday@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_everyday.imageset/TTPlayerIcon_training_everyday@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_everyday.imageset/TTPlayerIcon_training_everyday@3x.png -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Masonry (1.0.2) 3 | 4 | DEPENDENCIES: 5 | - Masonry (~> 1.0.2) 6 | 7 | SPEC CHECKSUMS: 8 | Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e 9 | 10 | PODFILE CHECKSUM: 2f2140897f89d009ba1077032ea468b9f33c44a6 11 | 12 | COCOAPODS: 1.2.0.beta.1 13 | -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_bigPause2.imageset/TTPlayerIcon_training_bigPause2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_bigPause2.imageset/TTPlayerIcon_training_bigPause2@2x.png -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_bigPause2.imageset/TTPlayerIcon_training_bigPause2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClaudeLi/AVPlayer/HEAD/TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_bigPause2.imageset/TTPlayerIcon_training_bigPause2@3x.png -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /AVPlayer/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // AVPlayer 4 | // 5 | // Created by ClaudeLi on 16/4/13. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /TTAVPlayer/MyViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyViewController.h 3 | // TTAVPlayer 4 | // 5 | // Created by ClaudeLi on 2017/2/7. 6 | // Copyright © 2017年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MyViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/Tools/NSObject+TTKVO.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+TTKVO.h 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 2017/1/12. 6 | // Copyright © 2017年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSObject (TTKVO) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /TTAVPlayer/TTTabBarController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TTTabBarController.h 3 | // TTAVPlayer 4 | // 5 | // Created by ClaudeLi on 2016/12/22. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TTTabBarController : UITabBarController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /TTAVPlayer/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // TTAVPlayer 4 | // 5 | // Created by ClaudeLi on 2016/12/20. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /TTAVPlayer.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASLayoutConstraint.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASLayoutConstraint.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASLayoutConstraint.h" 10 | 11 | @implementation MASLayoutConstraint 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AVPlayer/AVPlayer.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | AVPlayer.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayer.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | TTAVPlayer.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayer.xcdatamodeld/TTAVPlayer.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/Tools/UIView+UIViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+UIViewController.h 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 16/6/21. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (UIViewController) 12 | 13 | - (UIViewController *)viewController; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /AVPlayer/UIColor+color.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+color.h 3 | // Block 4 | // 5 | // Created by ClaudeLi on 16/3/23. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIColor (color) 12 | // 随机色 13 | + (UIColor *)randomColor; 14 | 15 | // 6位字符串颜色 16 | + (UIColor *)colorWithHexString:(NSString *)stringToConvert; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /AVPlayer/AVPlayer.xcdatamodeld/AVPlayer.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/Tools/NSString+time.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+time.h 3 | // AudioPlayer 4 | // 5 | // Created by ClaudeLi on 16/4/12. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface NSString (time) 13 | 14 | // 播放器_时间转换 15 | + (NSString *)convertTime:(CGFloat)second; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /AVPlayer/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // AVPlayer 4 | // 5 | // Created by ClaudeLi on 16/4/13. 6 | // Copyright © 2016年 ClaudeLi. 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 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/Tools/NSString+TTPlayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+TTPlayer.h 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 2016/12/20. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface NSString (TTPlayer) 13 | 14 | + (NSString *)stringWithConvertTime:(CGFloat)second; 15 | 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /TTAVPlayer/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TTAVPlayer 4 | // 5 | // Created by ClaudeLi on 2016/12/20. 6 | // Copyright © 2016年 ClaudeLi. 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 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/TTPlayerLandscapeController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TTPlayerLandscapeController.h 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 2016/12/21. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "TTAVPlayerView.h" 11 | 12 | @interface TTPlayerLandscapeController : UIViewController 13 | 14 | @property (nonatomic, assign) TTPlayerOrientation orientation; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSLayoutConstraint+MASDebugAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * makes debug and log output of NSLayoutConstraints more readable 13 | */ 14 | @interface NSLayoutConstraint (MASDebugAdditions) 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_last.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_big_last@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_lock.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_big_lock@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_next.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_big_next@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_play.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_big_play@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_loading.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_loading@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_stop_big.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_stop_big@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_goback.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_big_goback@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_loops.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_big_loops@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_pause.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_big_pause@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_point.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_big_point@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_share.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_big_share@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_unLast.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_big_unLast@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_unLock.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_big_unLock@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_unNext.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_big_unNext@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_small_play.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_small_play@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_singleOne.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_big_singleOne@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_big_tiltLine.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_big_tiltLine@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_small_pause.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_small_pause@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_small_point.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_small_point@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_small_rotate.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_small_rotate@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_small_sweep.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_small_sweep@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_mask.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_training_mask@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 | } -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/TTVideoItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // TTVideoItem.m 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 2016/12/23. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "TTVideoItem.h" 10 | 11 | @implementation TTVideoItem 12 | 13 | - (void)setValue:(id)value forUndefinedKey:(NSString *)key 14 | { 15 | if ([key isEqual:@""]) { 16 | 17 | } 18 | } 19 | 20 | - (id)valueForUndefinedKey:(NSString *)key 21 | { 22 | return nil; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /TTAVPlayer/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // TTAVPlayer 4 | // 5 | // Created by ClaudeLi on 2016/12/20. 6 | // Copyright © 2016年 ClaudeLi. 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) NSPersistentContainer *persistentContainer; 17 | 18 | - (void)saveContext; 19 | 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /AVPlayer/PlayerViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlayerViewController.h 3 | // AVPlayer 4 | // 5 | // Created by ClaudeLi on 16/4/13. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "VideoPlayer.h" 11 | 12 | @interface PlayerViewController : UIViewController 13 | @property (weak, nonatomic) IBOutlet UIView *headerView; 14 | @property (weak, nonatomic) IBOutlet VideoPlayer *videoPlayer; 15 | 16 | @property (weak, nonatomic) IBOutlet NSLayoutConstraint *headerHeight; 17 | @end 18 | -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_crown.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_training_crown@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "TTPlayerIcon_training_crown@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_last.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_training_last@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "TTPlayerIcon_training_last@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_next.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_training_next@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "TTPlayerIcon_training_next@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_pause.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_training_pause@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "TTPlayerIcon_training_pause@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_play.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_training_play@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "TTPlayerIcon_training_play@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_everyday.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_training_everyday@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "TTPlayerIcon_training_everyday@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/TTAVPlayerIcon/TTPlayerIcon_training_bigPause2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "TTPlayerIcon_training_bigPause2@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "TTPlayerIcon_training_bigPause2@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/Tools/CLRotatingScreen.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLRotatingScreen.h 3 | // tiaooo 4 | // 5 | // Created by ClaudeLi on 16/3/31. 6 | // Copyright © 2016年 dali. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface CLRotatingScreen : NSObject 13 | 14 | /** 15 | * 切换横竖屏 16 | * 17 | * @param orientation :UIInterfaceOrientation 18 | */ 19 | + (void)forceOrientation: (UIInterfaceOrientation)orientation; 20 | 21 | /** 22 | * 判断是否竖屏 23 | * 24 | * @return 布尔值 25 | */ 26 | + (BOOL)isOrientationLandscape; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /TTAVPlayer.xcworkspace/xcuserdata/claudeli.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/TTAVPlayerView+Layout.h: -------------------------------------------------------------------------------- 1 | // 2 | // TTAVPlayerView+Layout.h 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 2016/12/21. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "TTAVPlayerView.h" 10 | 11 | @interface TTAVPlayerView (Layout) 12 | 13 | - (void)_initial; 14 | 15 | - (void)_setPortraitLayout; 16 | 17 | - (void)_setLandscapeLayout; 18 | 19 | - (void)_clearVaules; 20 | 21 | - (void)_showBar; 22 | 23 | - (void)_showBar:(BOOL)isReset; 24 | 25 | - (void)_hideBar; 26 | 27 | - (void)removeTimer; 28 | 29 | - (void)showTipsWithTime:(CGFloat)time; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASLayoutConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * When you are debugging or printing the constraints attached to a view this subclass 13 | * makes it easier to identify which constraints have been created via Masonry 14 | */ 15 | @interface MASLayoutConstraint : NSLayoutConstraint 16 | 17 | /** 18 | * a key to associate with this constraint 19 | */ 20 | @property (nonatomic, strong) id mas_key; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/TTPlayerManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // TTPlayerManager.m 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 2016/12/22. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "TTPlayerManager.h" 10 | 11 | static TTPlayerManager *manager; 12 | @implementation TTPlayerManager 13 | 14 | + (TTPlayerManager *)playerManager{ 15 | static dispatch_once_t onceToken; 16 | dispatch_once(&onceToken, ^{ 17 | manager = [[TTPlayerManager alloc] init]; 18 | manager.listPlayMode = YES; 19 | manager.deauftPlayMode = NO; 20 | }); 21 | return manager; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASCompositeConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | #import "MASUtilities.h" 11 | 12 | /** 13 | * A group of MASConstraint objects 14 | */ 15 | @interface MASCompositeConstraint : MASConstraint 16 | 17 | /** 18 | * Creates a composite with a predefined array of children 19 | * 20 | * @param children child MASConstraints 21 | * 22 | * @return a composite constraint 23 | */ 24 | - (id)initWithChildren:(NSArray *)children; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /AVPlayer.xcodeproj/xcuserdata/ClaudeLi.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AVPlayer.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | D32A41201CBDF99D00BB2C4B 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /TTAVPlayer.xcodeproj/xcuserdata/claudeli.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | TTAVPlayer.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | D31C9EFC1E0930E5009A0B05 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TTAVPlayer/Pods-TTAVPlayer.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Masonry" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Masonry" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"Masonry" -framework "Foundation" -framework "UIKit" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TTAVPlayer/Pods-TTAVPlayer.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Masonry" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Masonry" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"Masonry" -framework "Foundation" -framework "UIKit" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/TTVideoItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // TTVideoItem.h 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 2016/12/23. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TTVideoItem : NSObject 12 | 13 | @property (nonatomic, assign) BOOL isNetwork; 14 | @property (nonatomic, copy) NSString *playUrl; // 播放地址 15 | @property (nonatomic, copy) NSString *url; // 网络地址 16 | 17 | @property (nonatomic, copy) NSString *vid; // 视频id 18 | @property (nonatomic, copy) NSString *title; // 视频title 19 | @property (nonatomic, copy) NSString *cover; // 封面 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/TTLandscapePlayerController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TTLandscapePlayerController.h 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 2017/1/10. 6 | // Copyright © 2017年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "TTAVPlayerView.h" 11 | 12 | @class TTVideoItem; 13 | @interface TTLandscapePlayerController : UIViewController 14 | 15 | @property (nonatomic, assign) TTAVPlayerType type; 16 | @property (nonatomic, strong) TTVideoItem *item; 17 | @property (nonatomic, copy) NSArray *itemArray; 18 | @property (nonatomic, assign) NSInteger index; 19 | 20 | - (instancetype)initWithType:(TTAVPlayerType)type; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/TTPlayerManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // TTPlayerManager.h 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 2016/12/22. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #define TTAVManager [TTPlayerManager playerManager] 13 | 14 | @interface TTPlayerManager : NSObject 15 | 16 | @property (nonatomic, assign) BOOL listPlayMode; 17 | @property (nonatomic, assign) BOOL deauftPlayMode; 18 | 19 | @property (nonatomic, assign) BOOL isAllowedToPlay; 20 | 21 | @property (nonatomic, assign) BOOL isListRotate; 22 | 23 | + (TTPlayerManager *)playerManager; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Masonry 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry" 4 | OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/Tools/UIView+UIViewController.m: -------------------------------------------------------------------------------- 1 | 2 | 3 | // 4 | // UIView+UIViewController.m 5 | // Tiaooo 6 | // 7 | // Created by ClaudeLi on 16/6/21. 8 | // Copyright © 2016年 ClaudeLi. All rights reserved. 9 | // 10 | 11 | #import "UIView+UIViewController.h" 12 | 13 | @implementation UIView (UIViewController) 14 | 15 | - (UIViewController *)viewController { 16 | for (UIView *view = self; view; view = view.superview) { 17 | UIResponder *nextResponder = [view nextResponder]; 18 | if ([nextResponder isKindOfClass:[UIViewController class]]) { 19 | return (UIViewController *)nextResponder; 20 | } 21 | } 22 | return nil; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/Tools/NSString+time.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+time.m 3 | // AudioPlayer 4 | // 5 | // Created by ClaudeLi on 16/4/12. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "NSString+time.h" 10 | 11 | @implementation NSString (time) 12 | 13 | + (NSString *)convertTime:(CGFloat)second{ 14 | NSDate *d = [NSDate dateWithTimeIntervalSince1970:second]; 15 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; 16 | if (second/3600 >= 1) { 17 | [formatter setDateFormat:@"HH:mm:ss"]; 18 | } else { 19 | [formatter setDateFormat:@"mm:ss"]; 20 | } 21 | NSString *showtimeNew = [formatter stringFromDate:d]; 22 | return showtimeNew; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /AVPlayer/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // AVPlayer 4 | // 5 | // Created by ClaudeLi on 16/4/13. 6 | // Copyright © 2016年 ClaudeLi. 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 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/Tools/NSString+TTPlayer.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+TTPlayer.m 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 2016/12/20. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "NSString+TTPlayer.h" 10 | 11 | @implementation NSString (TTPlayer) 12 | 13 | + (NSString *)stringWithConvertTime:(CGFloat)second{ 14 | NSDate *d = [NSDate dateWithTimeIntervalSince1970:second]; 15 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; 16 | if (second/3600.0 >= 1.0) { 17 | [formatter setDateFormat:@"HH:mm:ss"]; 18 | } else { 19 | [formatter setDateFormat:@"mm:ss"]; 20 | } 21 | NSString *showtimeNew = [formatter stringFromDate:d]; 22 | return showtimeNew; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/Tools/TTAVPlayerGestureView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TTAVPlayerGestureView.h 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 16/11/16. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TTAVPlayerGestureView : UIView 12 | 13 | /** 14 | * 单击时/双击时,判断tap的numberOfTapsRequired 15 | */ 16 | @property (nonatomic, copy)void (^userTapGestureBlock)(NSUInteger number); 17 | /** 18 | * 开始触摸 19 | */ 20 | @property (nonatomic, copy)CGFloat (^touchesBeganWithPointBlock)(); 21 | 22 | /** 23 | * 左右移动 24 | */ 25 | @property (nonatomic, copy)void (^toucheMoveWithPointBlock)(CGFloat value, BOOL isFast); 26 | 27 | /** 28 | * 结束触摸 29 | */ 30 | @property (nonatomic, copy)void (^touchesEndWithPointBlock)(CGFloat value); 31 | 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/claudeli.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Masonry.xcscheme 8 | 9 | isShown 10 | 11 | 12 | Pods-TTAVPlayer.xcscheme 13 | 14 | isShown 15 | 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 1CEED4F31FC69BFE384F5AD698E5EDF9 21 | 22 | primary 23 | 24 | 25 | 9DC8D9E02903E93BD0B2FEC9D846EA20 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | // 2 | // Masonry.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Masonry. 12 | FOUNDATION_EXPORT double MasonryVersionNumber; 13 | 14 | //! Project version string for Masonry. 15 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; 16 | 17 | #import "MASUtilities.h" 18 | #import "View+MASAdditions.h" 19 | #import "View+MASShorthandAdditions.h" 20 | #import "ViewController+MASAdditions.h" 21 | #import "NSArray+MASAdditions.h" 22 | #import "NSArray+MASShorthandAdditions.h" 23 | #import "MASConstraint.h" 24 | #import "MASCompositeConstraint.h" 25 | #import "MASViewAttribute.h" 26 | #import "MASViewConstraint.h" 27 | #import "MASConstraintMaker.h" 28 | #import "MASLayoutConstraint.h" 29 | #import "NSLayoutConstraint+MASDebugAdditions.h" 30 | -------------------------------------------------------------------------------- /TTAVPlayer/TTTabBarController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TTTabBarController.m 3 | // TTAVPlayer 4 | // 5 | // Created by ClaudeLi on 2016/12/22. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "TTTabBarController.h" 10 | 11 | @interface TTTabBarController () 12 | 13 | @end 14 | 15 | @implementation TTTabBarController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | - (BOOL)shouldAutorotate 28 | { 29 | return NO; 30 | } 31 | -(UIInterfaceOrientationMask)supportedInterfaceOrientations 32 | { 33 | return UIInterfaceOrientationMaskPortrait ; 34 | } 35 | -(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation 36 | { 37 | return UIInterfaceOrientationPortrait; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+MASAdditions.h 3 | // Masonry 4 | // 5 | // Created by Craig Siemens on 2015-06-23. 6 | // 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | #ifdef MAS_VIEW_CONTROLLER 14 | 15 | @interface MAS_VIEW_CONTROLLER (MASAdditions) 16 | 17 | /** 18 | * following properties return a new MASViewAttribute with appropriate UILayoutGuide and NSLayoutAttribute 19 | */ 20 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide; 21 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide; 22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom; 26 | 27 | 28 | @end 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/TTPlayerViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TTPlayerViewController.h 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 2016/12/21. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "TTAVPlayerView.h" 11 | @class TTVideoItem; 12 | @interface TTPlayerViewController : UIViewController 13 | 14 | @property (nonatomic, strong) UIView *parentView; 15 | @property (nonatomic, assign) CGRect frame; 16 | 17 | @property (nonatomic, assign) TTAVPlayerType type; 18 | @property (nonatomic, copy) NSArray *itemArray; 19 | @property (nonatomic, assign) NSInteger index; 20 | @property (nonatomic, strong) TTVideoItem *item; 21 | 22 | @property (nonatomic, assign) BOOL isFullScreen; 23 | @property (nonatomic, assign) BOOL isLeaved; 24 | 25 | @property (nonatomic, copy) void(^playerToStop)(); 26 | @property (nonatomic, copy) void(^didSelectIndex)(NSInteger index); 27 | 28 | - (instancetype)initWithType:(TTAVPlayerType)type; 29 | 30 | - (void)pause; 31 | 32 | - (void)paused; 33 | 34 | - (void)close; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/TTAVPlayerSDK.h: -------------------------------------------------------------------------------- 1 | // 2 | // TTAVPlayerSDK.h 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 2016/12/21. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #ifndef TTAVPlayerSDK_h 10 | #define TTAVPlayerSDK_h 11 | 12 | #import 13 | #import "TTVideoItem.h" 14 | #import "TTPlayerViewController.h" 15 | #import "TTLandscapePlayerController.h" 16 | #import "UIView+UIViewController.h" 17 | 18 | #ifdef DEBUG 19 | #define TTLog(format, ...) printf("\n[%s] %s [in line %d] => %s\n", __TIME__, __FUNCTION__, __LINE__, [[NSString stringWithFormat:format, ## __VA_ARGS__] UTF8String]); 20 | #else 21 | #define TTLog(format, ...) 22 | #endif 23 | 24 | #define TT_WS(weakSelf) __weak __typeof(&*self)weakSelf = self; 25 | 26 | #define IOS8 ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0 ? YES : NO) 27 | 28 | #define TTColor_MinimumColor [UIColor greenColor] 29 | 30 | #define TTColor_TitleColor [UIColor yellowColor] 31 | 32 | #define TT_intToString(i) [NSString stringWithFormat:@"%ld", (long)i] 33 | 34 | #endif /* TTAVPlayerSDK_h */ 35 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/Tools/NSObject+TTKVO.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+TTKVO.m 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 2017/1/12. 6 | // Copyright © 2017年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "NSObject+TTKVO.h" 10 | #import 11 | 12 | @implementation NSObject (TTKVO) 13 | 14 | + (void)load 15 | { 16 | [self switchMethod]; 17 | } 18 | 19 | // 交换后的方法 20 | - (void)removeDasen:(NSObject *)observer forKeyPath:(NSString *)keyPath 21 | { 22 | @try { 23 | [self removeDasen:observer forKeyPath:keyPath]; 24 | } @catch (NSException *exception) { 25 | NSLog(@"%@", exception); 26 | } @finally { 27 | } 28 | } 29 | 30 | + (void)switchMethod 31 | { 32 | SEL removeSel = @selector(removeObserver:forKeyPath:); 33 | SEL myRemoveSel = @selector(removeDasen:forKeyPath:); 34 | 35 | Method systemRemoveMethod = class_getClassMethod([self class],removeSel); 36 | Method DasenRemoveMethod = class_getClassMethod([self class], myRemoveSel); 37 | 38 | method_exchangeImplementations(systemRemoveMethod, DasenRemoveMethod); 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Pods/Masonry/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/TTPlayerLandscapeController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TTPlayerLandscapeController.m 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 2016/12/21. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "TTPlayerLandscapeController.h" 10 | 11 | @interface TTPlayerLandscapeController () 12 | 13 | @end 14 | 15 | @implementation TTPlayerLandscapeController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | // 支持转屏 28 | -(BOOL)shouldAutorotate 29 | { 30 | return YES; 31 | } 32 | 33 | -(UIInterfaceOrientationMask)supportedInterfaceOrientations 34 | { // 返回默认情况 35 | return UIInterfaceOrientationMaskLandscape; 36 | } 37 | -(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation 38 | { // 返回默认情况 39 | if (self.orientation == TTPlayerOrientationHomeLeft) { 40 | return UIInterfaceOrientationLandscapeLeft; 41 | } 42 | return UIInterfaceOrientationLandscapeRight; 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /AVPlayer/AVPlayer.pch: -------------------------------------------------------------------------------- 1 | // 2 | // AVPlayer.pch 3 | // AVPlayer 4 | // 5 | // Created by ClaudeLi on 16/4/13. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #ifndef AVPlayer_pch 10 | #define AVPlayer_pch 11 | 12 | #import "UIColor+color.h" 13 | 14 | /* 屏幕宽高 */ 15 | #define KScreenWidth [UIScreen mainScreen].bounds.size.width 16 | #define KScreenHeight [UIScreen mainScreen].bounds.size.height 17 | 18 | #define WS(weakSelf) __weak __typeof(&*self)weakSelf = self; 19 | 20 | #define KTabBarHeight 49.0f // tabBar高度 21 | #define KNavigatHeight 64.f // 导航栏高度 22 | #define KStateHeight 20.0f // 状态栏 23 | #define NavHeight KNavigatHeight - KStateHeight 24 | 25 | #define TableViewRowHeight 60.0f // tableView RowHight 26 | 27 | /* 坐标变量 */ 28 | #define Frame_x_0 0.0f // 坐标 -> x 29 | #define Frame_y_0 0.0f // 30 | 31 | 32 | #ifdef DEBUG 33 | #define NSLog( s, ... ) NSLog( @"<%p %@:(line-%d)> %@", self, [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) 34 | 35 | #else 36 | # define NSLog(...) 37 | #endif 38 | 39 | 40 | #define integerToString(a) [NSString stringWithFormat:@"%ld", (long)(a)] 41 | 42 | #endif /* AVPlayer_pch */ 43 | -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/Tools/CLRotatingScreen.m: -------------------------------------------------------------------------------- 1 | // 2 | // CLRotatingScreen.m 3 | // tiaooo 4 | // 5 | // Created by ClaudeLi on 16/3/31. 6 | // Copyright © 2016年 dali. All rights reserved. 7 | // 8 | 9 | #import "CLRotatingScreen.h" 10 | 11 | @implementation CLRotatingScreen 12 | 13 | + (void)forceOrientation: (UIInterfaceOrientation)orientation { 14 | if ([[UIDevice currentDevice] respondsToSelector:@selector(setOrientation:)]) { 15 | SEL selector = NSSelectorFromString(@"setOrientation:"); 16 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[UIDevice instanceMethodSignatureForSelector:selector]]; 17 | [invocation setSelector:selector]; 18 | [invocation setTarget: [UIDevice currentDevice]]; 19 | int val = orientation; 20 | [invocation setArgument:&val atIndex:2]; 21 | [invocation invoke]; 22 | } 23 | } 24 | 25 | + (BOOL)isOrientationLandscape { 26 | //if (UIDeviceOrientationIsLandscape([[UIDevice currentDevice] orientation])) { 27 | if (UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) { 28 | return YES; 29 | } else { 30 | return NO; 31 | } 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASShorthandAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 22/07/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "NSArray+MASAdditions.h" 10 | 11 | #ifdef MAS_SHORTHAND 12 | 13 | /** 14 | * Shorthand array additions without the 'mas_' prefixes, 15 | * only enabled if MAS_SHORTHAND is defined 16 | */ 17 | @interface NSArray (MASShorthandAdditions) 18 | 19 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; 20 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; 21 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; 22 | 23 | @end 24 | 25 | @implementation NSArray (MASShorthandAdditions) 26 | 27 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { 28 | return [self mas_makeConstraints:block]; 29 | } 30 | 31 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { 32 | return [self mas_updateConstraints:block]; 33 | } 34 | 35 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { 36 | return [self mas_remakeConstraints:block]; 37 | } 38 | 39 | @end 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /AVPlayer/UIColor+color.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+color.m 3 | // Block 4 | // 5 | // Created by ClaudeLi on 16/3/23. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "UIColor+color.h" 10 | 11 | @implementation UIColor (color) 12 | 13 | // 随机色 14 | +(UIColor *) randomColor 15 | 16 | { 17 | CGFloat hue = ( arc4random() % 256 / 256.0 ); //0.0 to 1.0 18 | CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0,away from white 19 | CGFloat brightness = ( arc4random() % 128 / 256.0 ) + 0.5; //0.5 to 1.0,away from black 20 | return [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:1]; 21 | } 22 | 23 | + (UIColor *)colorWithRGBHex:(UInt32)hex { 24 | int r = (hex >> 16) & 0xFF; 25 | int g = (hex >> 8) & 0xFF; 26 | int b = (hex) & 0xFF; 27 | 28 | return [UIColor colorWithRed:r / 255.0f 29 | green:g / 255.0f 30 | blue:b / 255.0f 31 | alpha:1.0f]; 32 | } 33 | 34 | +(UIColor *)colorWithHexString:(NSString *)stringToConvert 35 | { 36 | NSScanner *scanner = [NSScanner scannerWithString:stringToConvert]; 37 | unsigned hexNum; 38 | if (![scanner scanHexInt:&hexNum]) return nil; 39 | return [UIColor colorWithRGBHex:hexNum]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /AVPlayer/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // AVPlayer 4 | // 5 | // Created by ClaudeLi on 16/4/13. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "PlayerViewController.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view, typically from a nib. 21 | self.view.backgroundColor = [UIColor grayColor]; 22 | 23 | UIButton* button = [UIButton new]; 24 | button.frame = CGRectMake(100, 100, 100, 50); 25 | button.backgroundColor = [UIColor redColor]; 26 | [button setTitle:@"text" forState:UIControlStateNormal]; 27 | [button addTarget:self action:@selector(clickButtonAction) forControlEvents:UIControlEventTouchUpInside]; 28 | [self.view addSubview:button]; 29 | } 30 | 31 | - (BOOL)shouldAutorotate{ 32 | return NO; 33 | } 34 | 35 | - (void)clickButtonAction{ 36 | PlayerViewController *player = [[PlayerViewController alloc] init]; 37 | [self presentViewController:player animated:YES completion:nil]; 38 | } 39 | 40 | - (void)didReceiveMemoryWarning { 41 | [super didReceiveMemoryWarning]; 42 | // Dispose of any resources that can be recreated. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TTAVPlayer/Pods-TTAVPlayer-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## Masonry 5 | 6 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | Generated by CocoaPods - https://cocoapods.org 26 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASViewAttribute.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASAttribute.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASViewAttribute.h" 10 | 11 | @implementation MASViewAttribute 12 | 13 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute { 14 | self = [self initWithView:view item:view layoutAttribute:layoutAttribute]; 15 | return self; 16 | } 17 | 18 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute { 19 | self = [super init]; 20 | if (!self) return nil; 21 | 22 | _view = view; 23 | _item = item; 24 | _layoutAttribute = layoutAttribute; 25 | 26 | return self; 27 | } 28 | 29 | - (BOOL)isSizeAttribute { 30 | return self.layoutAttribute == NSLayoutAttributeWidth 31 | || self.layoutAttribute == NSLayoutAttributeHeight; 32 | } 33 | 34 | - (BOOL)isEqual:(MASViewAttribute *)viewAttribute { 35 | if ([viewAttribute isKindOfClass:self.class]) { 36 | return self.view == viewAttribute.view 37 | && self.layoutAttribute == viewAttribute.layoutAttribute; 38 | } 39 | return [super isEqual:viewAttribute]; 40 | } 41 | 42 | - (NSUInteger)hash { 43 | return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/TTPlayerViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASAttribute.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * An immutable tuple which stores the view and the related NSLayoutAttribute. 13 | * Describes part of either the left or right hand side of a constraint equation 14 | */ 15 | @interface MASViewAttribute : NSObject 16 | 17 | /** 18 | * The view which the reciever relates to. Can be nil if item is not a view. 19 | */ 20 | @property (nonatomic, weak, readonly) MAS_VIEW *view; 21 | 22 | /** 23 | * The item which the reciever relates to. 24 | */ 25 | @property (nonatomic, weak, readonly) id item; 26 | 27 | /** 28 | * The attribute which the reciever relates to 29 | */ 30 | @property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute; 31 | 32 | /** 33 | * Convenience initializer. 34 | */ 35 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute; 36 | 37 | /** 38 | * The designated initializer. 39 | */ 40 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute; 41 | 42 | /** 43 | * Determine whether the layoutAttribute is a size attribute 44 | * 45 | * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight 46 | */ 47 | - (BOOL)isSizeAttribute; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/TTLandscapePlayerController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/ViewController+MASAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+MASAdditions.m 3 | // Masonry 4 | // 5 | // Created by Craig Siemens on 2015-06-23. 6 | // 7 | // 8 | 9 | #import "ViewController+MASAdditions.h" 10 | 11 | #ifdef MAS_VIEW_CONTROLLER 12 | 13 | @implementation MAS_VIEW_CONTROLLER (MASAdditions) 14 | 15 | - (MASViewAttribute *)mas_topLayoutGuide { 16 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 17 | } 18 | - (MASViewAttribute *)mas_topLayoutGuideTop { 19 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 20 | } 21 | - (MASViewAttribute *)mas_topLayoutGuideBottom { 22 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 23 | } 24 | 25 | - (MASViewAttribute *)mas_bottomLayoutGuide { 26 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 27 | } 28 | - (MASViewAttribute *)mas_bottomLayoutGuideTop { 29 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 30 | } 31 | - (MASViewAttribute *)mas_bottomLayoutGuideBottom { 32 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 33 | } 34 | 35 | 36 | 37 | @end 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASViewAttribute.h" 10 | #import "MASConstraint.h" 11 | #import "MASLayoutConstraint.h" 12 | #import "MASUtilities.h" 13 | 14 | /** 15 | * A single constraint. 16 | * Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view 17 | */ 18 | @interface MASViewConstraint : MASConstraint 19 | 20 | /** 21 | * First item/view and first attribute of the NSLayoutConstraint 22 | */ 23 | @property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute; 24 | 25 | /** 26 | * Second item/view and second attribute of the NSLayoutConstraint 27 | */ 28 | @property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute; 29 | 30 | /** 31 | * initialises the MASViewConstraint with the first part of the equation 32 | * 33 | * @param firstViewAttribute view.mas_left, view.mas_width etc. 34 | * 35 | * @return a new view constraint 36 | */ 37 | - (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute; 38 | 39 | /** 40 | * Returns all MASViewConstraints installed with this view as a first item. 41 | * 42 | * @param view A view to retrieve constraints for. 43 | * 44 | * @return An array of MASViewConstraints. 45 | */ 46 | + (NSArray *)installedConstraintsForView:(MAS_VIEW *)view; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /AVPlayer/VideoPlayer/VideoPlayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // VideoPlayer.h 3 | // AVPlayer 4 | // 5 | // Created by ClaudeLi on 16/4/13. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | /** 13 | * 手势类型 14 | */ 15 | typedef NS_ENUM(NSInteger, TouchPlayerViewMode) { 16 | /** 17 | * 轻触 18 | */ 19 | TouchPlayerViewModeNone, 20 | /** 21 | * 横滑(快进&快退) 22 | */ 23 | TouchPlayerViewModeHorizontal, 24 | /** 25 | * 未知 26 | */ 27 | TouchPlayerViewModeUnknow, 28 | }; 29 | 30 | @interface VideoPlayer : UIView 31 | { 32 | TouchPlayerViewMode _touchMode; 33 | } 34 | /** 35 | * AVPlayer播放器 36 | */ 37 | @property (nonatomic, strong) AVPlayer *player; 38 | /** 39 | * 播放状态,YES为正在播放,NO为暂停 40 | */ 41 | @property (nonatomic, assign) BOOL isPlaying; 42 | /** 43 | * 是否横屏,默认NO -> 竖屏 44 | */ 45 | @property (nonatomic, assign) BOOL isLandscape; 46 | /** 47 | * 是否锁定屏幕 48 | */ 49 | @property (nonatomic, assign) BOOL isLockScreen; 50 | 51 | /** 52 | * 传入视频地址 53 | * 54 | * @param string 视频url 55 | */ 56 | - (void)updatePlayerWith:(NSURL *)url; 57 | 58 | /** 59 | * 移除通知&KVO 60 | */ 61 | - (void)removeObserverAndNotification; 62 | 63 | /** 64 | * 横屏Layout 65 | */ 66 | - (void)setlandscapeLayout; 67 | 68 | /** 69 | * 竖屏Layout 70 | */ 71 | - (void)setPortraitLayout; 72 | 73 | /** 74 | * 播放 75 | */ 76 | - (void)play; 77 | 78 | /** 79 | * 暂停 80 | */ 81 | - (void)pause; 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /AVPlayer/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 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "83.5x83.5", 66 | "scale" : "2x" 67 | } 68 | ], 69 | "info" : { 70 | "version" : 1, 71 | "author" : "xcode" 72 | } 73 | } -------------------------------------------------------------------------------- /AVPlayer/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIViewControllerBasedStatusBarAppearance 6 | 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | com.claudeli.demo 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | 32 | UILaunchStoryboardName 33 | LaunchScreen 34 | UIMainStoryboardFile 35 | Main 36 | UIRequiredDeviceCapabilities 37 | 38 | armv7 39 | 40 | UISupportedInterfaceOrientations 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /AVPlayer/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 | -------------------------------------------------------------------------------- /AVPlayer/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 | -------------------------------------------------------------------------------- /TTAVPlayer/MyViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyViewController.m 3 | // TTAVPlayer 4 | // 5 | // Created by ClaudeLi on 2017/2/7. 6 | // Copyright © 2017年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "MyViewController.h" 10 | #import "TTAVPlayerSDK.h" 11 | 12 | @interface MyViewController () 13 | 14 | @end 15 | 16 | @implementation MyViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view. 21 | } 22 | 23 | - (IBAction)gotoLandscapePlayer:(id)sender { 24 | TTLandscapePlayerController *player = [[TTLandscapePlayerController alloc] initWithType:TTAVPlayerTypeLandscapePlayer]; 25 | player.itemArray = [self getVideoItemArray]; 26 | player.index = 0; 27 | [self presentViewController:player animated:YES completion:nil]; 28 | } 29 | 30 | - (NSArray *)getVideoItemArray{ 31 | // 获取测试数据Url数组 32 | NSString *path = [[NSBundle mainBundle] pathForResource:@"TestVideo" ofType:@"txt"]; 33 | NSData *data = [[NSData alloc]initWithContentsOfFile:path]; 34 | NSString *string = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; 35 | NSArray *urlArray = [string componentsSeparatedByString:@"\n"]; 36 | 37 | int i = 0; 38 | NSMutableArray *itemArray = [NSMutableArray array]; 39 | for (NSString *urlStr in urlArray) { 40 | TTVideoItem *item = [[TTVideoItem alloc] init]; 41 | item.url = urlStr; 42 | item.vid = TT_intToString(i); 43 | item.title = TT_intToString(i); 44 | [itemArray addObject:item]; 45 | i++; 46 | } 47 | return [itemArray copy]; 48 | } 49 | 50 | - (void)didReceiveMemoryWarning { 51 | [super didReceiveMemoryWarning]; 52 | // Dispose of any resources that can be recreated. 53 | } 54 | 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /TTAVPlayer/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 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | NSAppTransportSecurity 24 | 25 | NSAllowsArbitraryLoads 26 | 27 | 28 | UILaunchStoryboardName 29 | LaunchScreen 30 | UIMainStoryboardFile 31 | Main 32 | UIRequiredDeviceCapabilities 33 | 34 | armv7 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | UIViewControllerBasedStatusBarAppearance 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/TTAVPlayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // TTAVPlayer.h 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 16/11/14. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "TTAVPlayerView.h" 12 | 13 | @class TTVideoItem; 14 | @interface TTAVPlayer : UIView 15 | 16 | @property (nonatomic, strong) TTVideoItem *videoItem; 17 | @property (nonatomic, assign) CGFloat rate; 18 | 19 | @property (nonatomic, assign, readonly) BOOL canPlay; 20 | 21 | @property (nonatomic, copy) NSArray *itemArray; 22 | @property (nonatomic, assign) NSInteger index; 23 | 24 | - (void)play; 25 | - (void)pause; 26 | - (void)stop; 27 | 28 | - (void)cancleLoading; 29 | 30 | - (CGFloat)currentTime; 31 | - (CGFloat)totalTime; 32 | - (void)seekToTime:(float)seconds completionHandler:(void (^)(BOOL finished))completionHandler; 33 | 34 | - (void)setRate:(CGFloat)rate; 35 | 36 | @property (nonatomic, copy) void (^playerLoadedTimeBlock)(CGFloat progress); 37 | @property (nonatomic, copy) void (^playerCurrentTimeBlock)(CGFloat seconds); 38 | @property (nonatomic, copy) void (^playerTotalTimeBlock)(CGFloat seconds); 39 | @property (nonatomic, copy) void (^playerPlayEndBlock)(); 40 | @property (nonatomic, copy) void (^playerDirectionChange)(); 41 | @property (nonatomic, copy) void (^playerReadyToPlay)(); 42 | @property (nonatomic, copy) void (^playerDelayPlay)(BOOL flag); 43 | @property (nonatomic, copy) void (^playerToStop)(); 44 | @property (nonatomic, copy) void (^playerToClosePlayer)(); 45 | 46 | @property (nonatomic, copy) void(^playerEnterForegroundBlock)(); 47 | @property (nonatomic, copy) void(^playerResignActiveBlock)(); 48 | 49 | // 做视频播放时间本地记录时使用,demo中未用到 50 | @property (nonatomic, copy) void(^jumpToRecordTime)(CGFloat time); 51 | @property (nonatomic, copy) void(^jumpToRecordIndex)(NSInteger index); 52 | 53 | //- (void)removeNotifications; 54 | - (void)close; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /TTAVPlayer/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /TTAVPlayer/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 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraint+Private.h 3 | // Masonry 4 | // 5 | // Created by Nick Tymchenko on 29/04/14. 6 | // Copyright (c) 2014 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | 11 | @protocol MASConstraintDelegate; 12 | 13 | 14 | @interface MASConstraint () 15 | 16 | /** 17 | * Whether or not to check for an existing constraint instead of adding constraint 18 | */ 19 | @property (nonatomic, assign) BOOL updateExisting; 20 | 21 | /** 22 | * Usually MASConstraintMaker but could be a parent MASConstraint 23 | */ 24 | @property (nonatomic, weak) id delegate; 25 | 26 | /** 27 | * Based on a provided value type, is equal to calling: 28 | * NSNumber - setOffset: 29 | * NSValue with CGPoint - setPointOffset: 30 | * NSValue with CGSize - setSizeOffset: 31 | * NSValue with MASEdgeInsets - setInsets: 32 | */ 33 | - (void)setLayoutConstantWithValue:(NSValue *)value; 34 | 35 | @end 36 | 37 | 38 | @interface MASConstraint (Abstract) 39 | 40 | /** 41 | * Sets the constraint relation to given NSLayoutRelation 42 | * returns a block which accepts one of the following: 43 | * MASViewAttribute, UIView, NSValue, NSArray 44 | * see readme for more details. 45 | */ 46 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation; 47 | 48 | /** 49 | * Override to set a custom chaining behaviour 50 | */ 51 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; 52 | 53 | @end 54 | 55 | 56 | @protocol MASConstraintDelegate 57 | 58 | /** 59 | * Notifies the delegate when the constraint needs to be replaced with another constraint. For example 60 | * A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks 61 | */ 62 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint; 63 | 64 | - (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/claudeli.xcuserdatad/xcschemes/Masonry.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TTAVPlayer/Pods-TTAVPlayer-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | License 37 | MIT 38 | Title 39 | Masonry 40 | Type 41 | PSGroupSpecifier 42 | 43 | 44 | FooterText 45 | Generated by CocoaPods - https://cocoapods.org 46 | Title 47 | 48 | Type 49 | PSGroupSpecifier 50 | 51 | 52 | StringsTable 53 | Acknowledgements 54 | Title 55 | Acknowledgements 56 | 57 | 58 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/claudeli.xcuserdatad/xcschemes/Pods-TTAVPlayer.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/TTLandscapePlayerController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TTLandscapePlayerController.m 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 2017/1/10. 6 | // Copyright © 2017年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "TTAVPlayerSDK.h" 10 | 11 | @interface TTLandscapePlayerController () 12 | 13 | @property (nonatomic, strong) TTAVPlayerView *playerView; 14 | 15 | @end 16 | 17 | @implementation TTLandscapePlayerController 18 | 19 | - (instancetype)initWithType:(TTAVPlayerType)type{ 20 | self = [super init]; 21 | if (self) { 22 | self.type = type; 23 | } 24 | return self; 25 | } 26 | 27 | - (TTAVPlayerView *)playerView{ 28 | if (!_playerView) { 29 | _playerView = [[TTAVPlayerView alloc] init]; 30 | } 31 | return _playerView; 32 | } 33 | 34 | #pragma mark - 35 | #pragma mark -- set方法 -- 36 | - (void)setType:(TTAVPlayerType)type{ 37 | _type = type; 38 | self.playerView.type = type; 39 | } 40 | 41 | - (void)setItem:(TTVideoItem *)item{ 42 | _item = item; 43 | self.playerView.item = item; 44 | } 45 | 46 | - (void)setItemArray:(NSArray *)itemArray{ 47 | _itemArray = itemArray; 48 | self.playerView.itemArray = _itemArray; 49 | } 50 | 51 | -(void)setIndex:(NSInteger)index{ 52 | _index = index; 53 | self.playerView.index = _index; 54 | } 55 | 56 | - (void)viewDidLoad { 57 | [super viewDidLoad]; 58 | [[UIApplication sharedApplication] setStatusBarHidden:YES]; 59 | [self.view addSubview:self.playerView]; 60 | TT_WS(ws); 61 | [_playerView mas_makeConstraints:^(MASConstraintMaker *make) { 62 | make.edges.equalTo(ws.view); 63 | }]; 64 | 65 | [_playerView setClickPlayerBackBlock:^(TTPlayerOrientation fromOrientation) { 66 | [ws closePlayer]; 67 | }]; 68 | } 69 | 70 | - (void)closePlayer{ 71 | [_playerView pause]; 72 | [_playerView close]; 73 | [self dismissViewControllerAnimated:YES completion:^{ 74 | [[UIApplication sharedApplication] setStatusBarHidden:NO]; 75 | }]; 76 | } 77 | 78 | // 支持转屏 79 | -(BOOL)shouldAutorotate 80 | { 81 | return YES; 82 | } 83 | 84 | -(UIInterfaceOrientationMask)supportedInterfaceOrientations 85 | { // 返回默认情况 86 | return UIInterfaceOrientationMaskLandscape; 87 | } 88 | -(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation 89 | { 90 | // 返回默认情况 91 | return UIInterfaceOrientationLandscapeRight; 92 | } 93 | 94 | - (void)didReceiveMemoryWarning { 95 | [super didReceiveMemoryWarning]; 96 | // Dispose of any resources that can be recreated. 97 | } 98 | 99 | 100 | @end 101 | -------------------------------------------------------------------------------- /TTAVPlayer/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // TTAVPlayer 4 | // 5 | // Created by ClaudeLi on 2016/12/20. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "TTAVPlayerSDK.h" 11 | 12 | @interface ViewController () 13 | 14 | @property (nonatomic) TTPlayerViewController *player; 15 | 16 | @property (nonatomic, strong) NSMutableArray *itemArray; 17 | 18 | @end 19 | 20 | @implementation ViewController 21 | 22 | - (NSMutableArray *)itemArray{ 23 | if (!_itemArray) { 24 | _itemArray = [NSMutableArray array]; 25 | } 26 | return _itemArray; 27 | } 28 | 29 | - (TTPlayerViewController *)player{ 30 | if (!_player) { 31 | _player = [[TTPlayerViewController alloc] initWithType:TTAVPlayerTypeDefault]; 32 | _player.parentView = self.view; 33 | } 34 | return _player; 35 | } 36 | 37 | - (void)viewDidLoad { 38 | [super viewDidLoad]; 39 | // 设置Player 40 | self.player.frame = CGRectMake(0, 20, self.view.frame.size.width, self.view.frame.size.width/16.0 * 9.0); 41 | // 设置播放视频model数组, 42 | self.player.itemArray = [self getVideoItemArray]; 43 | self.player.index = 0; 44 | 45 | // // 单独视频直接传入单独model 46 | //[self.player setItem:<#(TTVideoItem *)#>]; 47 | } 48 | 49 | 50 | // 获取测试数据数组 51 | - (NSArray *)getVideoItemArray{ 52 | // 获取测试数据Url数组 53 | NSString *path = [[NSBundle mainBundle] pathForResource:@"TestVideo" ofType:@"txt"]; 54 | NSData *data = [[NSData alloc]initWithContentsOfFile:path]; 55 | NSString *string = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; 56 | NSArray *urlArray = [string componentsSeparatedByString:@"\n"]; 57 | 58 | int i = 0; 59 | NSMutableArray *itemArray = [NSMutableArray array]; 60 | for (NSString *urlStr in urlArray) { 61 | TTVideoItem *item = [[TTVideoItem alloc] init]; 62 | item.url = urlStr; 63 | item.vid = TT_intToString(i); 64 | item.title = TT_intToString(i); 65 | [itemArray addObject:item]; 66 | i++; 67 | } 68 | return [itemArray copy]; 69 | } 70 | 71 | - (void)viewDidDisappear:(BOOL)animated{ 72 | [super viewDidDisappear:animated]; 73 | if (!self.player.isFullScreen) { 74 | [self.player pause]; 75 | } 76 | } 77 | 78 | - (BOOL)shouldAutorotate 79 | { 80 | return NO; 81 | } 82 | 83 | -(UIInterfaceOrientationMask)supportedInterfaceOrientations 84 | { 85 | return UIInterfaceOrientationMaskPortrait ; 86 | } 87 | 88 | -(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation 89 | { 90 | return UIInterfaceOrientationPortrait; 91 | } 92 | 93 | - (void)didReceiveMemoryWarning { 94 | [super didReceiveMemoryWarning]; 95 | // Dispose of any resources that can be recreated. 96 | } 97 | 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASAdditions.h 3 | // 4 | // 5 | // Created by Daniel Hammond on 11/26/13. 6 | // 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | typedef NS_ENUM(NSUInteger, MASAxisType) { 14 | MASAxisTypeHorizontal, 15 | MASAxisTypeVertical 16 | }; 17 | 18 | @interface NSArray (MASAdditions) 19 | 20 | /** 21 | * Creates a MASConstraintMaker with each view in the callee. 22 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view 23 | * 24 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 25 | * 26 | * @return Array of created MASConstraints 27 | */ 28 | - (NSArray *)mas_makeConstraints:(void (^)(MASConstraintMaker *make))block; 29 | 30 | /** 31 | * Creates a MASConstraintMaker with each view in the callee. 32 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. 33 | * If an existing constraint exists then it will be updated instead. 34 | * 35 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 36 | * 37 | * @return Array of created/updated MASConstraints 38 | */ 39 | - (NSArray *)mas_updateConstraints:(void (^)(MASConstraintMaker *make))block; 40 | 41 | /** 42 | * Creates a MASConstraintMaker with each view in the callee. 43 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. 44 | * All constraints previously installed for the views will be removed. 45 | * 46 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 47 | * 48 | * @return Array of created/updated MASConstraints 49 | */ 50 | - (NSArray *)mas_remakeConstraints:(void (^)(MASConstraintMaker *make))block; 51 | 52 | /** 53 | * distribute with fixed spacing 54 | * 55 | * @param axisType which axis to distribute items along 56 | * @param fixedSpacing the spacing between each item 57 | * @param leadSpacing the spacing before the first item and the container 58 | * @param tailSpacing the spacing after the last item and the container 59 | */ 60 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; 61 | 62 | /** 63 | * distribute with fixed item size 64 | * 65 | * @param axisType which axis to distribute items along 66 | * @param fixedItemLength the fixed length of each item 67 | * @param leadSpacing the spacing before the first item and the container 68 | * @param tailSpacing the spacing after the last item and the container 69 | */ 70 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AVPlayer 2 | 视频播放,实现全屏播放及小屏播放 3 | 4 | 类似效果 5 | ![](https://github.com/ClaudeLi/AVPlayer/blob/master/20141121215131793.png) 6 | 7 | ![](https://github.com/ClaudeLi/AVPlayer/blob/master/20141121215205505.png) 8 | 9 | 1.旋转至全屏 10 | - (void)setLandscapeController:(TTPlayerOrientation)toOrientation{ 11 | CGFloat angle = -M_PI_2; 12 | if (toOrientation == TTPlayerOrientationHomeRight) { 13 | angle = -M_PI_2; 14 | }else if (toOrientation == TTPlayerOrientationHomeLeft){ 15 | angle = M_PI_2; 16 | }else{ 17 | return; 18 | } 19 | _isFullScreen = YES; 20 | landscapeViewController.orientation = toOrientation; 21 | [_parentView.viewController presentViewController:landscapeViewController animated:NO completion:^{ 22 | [self.view removeFromSuperview]; 23 | [self removeFromParentViewController]; 24 | 25 | [landscapeViewController addChildViewController:self]; 26 | [landscapeViewController.view addSubview:self.view]; 27 | 28 | [[UIApplication sharedApplication] setStatusBarHidden:YES]; 29 | [self.playerView setLandscapeLayout]; 30 | 31 | //旋转前 32 | CGAffineTransform transform = CGAffineTransformMakeRotation(angle); 33 | transform = CGAffineTransformScale(transform, 1.0, 1.0); 34 | self.view.transform = transform; 35 | self.view.center = landscapeViewController.view.center; 36 | //旋转动画 37 | [UIView animateWithDuration:[[UIApplication sharedApplication] statusBarOrientationAnimationDuration] animations:^{ 38 | self.view.transform = CGAffineTransformIdentity; 39 | self.view.frame = landscapeViewController.view.bounds; 40 | }completion:^(BOOL finished) { 41 | // [[UIApplication sharedApplication] setStatusBarHidden:NO]; 42 | }]; 43 | }]; 44 | } 45 | 46 | 2.旋转至竖屏 47 | - (void)setPortraitController:(TTPlayerOrientation)fromOrientation{ 48 | CGFloat angle = M_PI_2; 49 | if (fromOrientation == TTPlayerOrientationHomeLeft) { 50 | angle = -M_PI_2; 51 | }else if (fromOrientation == TTPlayerOrientationHomeRight){ 52 | angle = M_PI_2; 53 | }else{ 54 | return; 55 | } 56 | [landscapeViewController dismissViewControllerAnimated:NO completion:^{ 57 | [self.view removeFromSuperview]; 58 | [self removeFromParentViewController]; 59 | 60 | [_parentView.viewController addChildViewController:self]; 61 | [_parentView addSubview:self.view]; 62 | 63 | [[UIApplication sharedApplication] setStatusBarHidden:NO]; 64 | [self.playerView setPortraitLayout]; 65 | //缩放动画 66 | CGAffineTransform transform = CGAffineTransformMakeScale(1.0, 1.0); 67 | self.view.transform = transform; 68 | self.view.frame = _frame; 69 | self.view.transform = CGAffineTransformRotate(transform, angle); 70 | 71 | [UIView animateWithDuration:[[UIApplication sharedApplication] statusBarOrientationAnimationDuration] 72 | animations:^{ 73 | self.view.transform = CGAffineTransformIdentity; 74 | } 75 | completion:^(BOOL finished) { 76 | self.view.frame = _frame; 77 | }]; 78 | }]; 79 | } 80 | 81 | -------------------------------------------------------------------------------- /AVPlayer.xcodeproj/xcuserdata/ClaudeLi.xcuserdatad/xcschemes/AVPlayer.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /TTAVPlayer.xcodeproj/xcuserdata/claudeli.xcuserdatad/xcschemes/TTAVPlayer.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /TTAVPlayer/TTAVPlayerSDK/TTAVPlayerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TTAVPlayerView.h 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 2016/12/21. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSInteger, TTPlayerOrientation) { 12 | TTPlayerOrientationPortrait, 13 | TTPlayerOrientationHomeLeft, 14 | TTPlayerOrientationHomeRight, 15 | }; 16 | 17 | typedef NS_ENUM(NSInteger, TTAVPlayerType) { 18 | TTAVPlayerTypeDefault, 19 | TTAVPlayerTypeListPlayer, 20 | TTAVPlayerTypeLandscapePlayer, 21 | }; 22 | 23 | @class TTVideoItem; 24 | @interface TTAVPlayerView : UIView{ 25 | CGFloat _rateValue; 26 | NSTimer *_timer; 27 | } 28 | @property (weak, nonatomic) IBOutlet UIView *trainingView; 29 | @property (weak, nonatomic) IBOutlet UIView *carrierView; 30 | @property (weak, nonatomic) IBOutlet UIView *topView; 31 | @property (weak, nonatomic) IBOutlet UIView *bottomView; 32 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel; 33 | @property (weak, nonatomic) IBOutlet UIButton *lockBtn; 34 | @property (weak, nonatomic) IBOutlet UIView *airPlayView; 35 | @property (weak, nonatomic) IBOutlet UIButton *shareBtn; 36 | 37 | @property (weak, nonatomic) IBOutlet UIButton *rotateBtn; 38 | @property (weak, nonatomic) IBOutlet UIButton *speedBtn; 39 | @property (weak, nonatomic) IBOutlet UIButton *ratentBtn; 40 | @property (weak, nonatomic) IBOutlet UIButton *modeBtn; 41 | 42 | @property (weak, nonatomic) IBOutlet UIButton *lastBtn; 43 | @property (weak, nonatomic) IBOutlet UIButton *nextBtn; 44 | @property (weak, nonatomic) IBOutlet UIButton *playBtn; 45 | @property (weak, nonatomic) IBOutlet UILabel *currentLabel; 46 | @property (weak, nonatomic) IBOutlet UILabel *totalLabel; 47 | @property (weak, nonatomic) IBOutlet UIImageView *slashView; 48 | @property (weak, nonatomic) IBOutlet UISlider *playSlider; 49 | @property (weak, nonatomic) IBOutlet UIButton *stopBtn; 50 | @property (weak, nonatomic) IBOutlet UIProgressView *bufferProgress; 51 | @property (weak, nonatomic) IBOutlet UIImageView *loadingView; 52 | @property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottomViewHeight; 53 | @property (weak, nonatomic) IBOutlet NSLayoutConstraint *timeLabelLeft; 54 | @property (weak, nonatomic) IBOutlet NSLayoutConstraint *airPlayRight; 55 | @property (weak, nonatomic) IBOutlet UILabel *tipsView; 56 | 57 | @property (nonatomic, assign, readonly) BOOL isLock; // 是否锁屏 58 | @property (nonatomic, assign, readonly) BOOL isLoops; // 是否单曲循环 59 | @property (nonatomic, assign, readonly) BOOL isPlaying; // 是否正在播放 60 | @property (nonatomic, assign, readonly) BOOL canPlay; // 是否能播放 61 | 62 | @property (nonatomic, assign) BOOL isLandscape; // 是否横屏 63 | @property (nonatomic, assign) BOOL isShowing; // 控件是否在显示 64 | @property (nonatomic, assign) BOOL paused; // 是否暂停 65 | @property (nonatomic, assign) BOOL isLeaved; // 是否离开播放器 66 | 67 | @property (nonatomic, assign) TTAVPlayerType type; 68 | @property (nonatomic, copy) NSArray *itemArray; 69 | @property (nonatomic, assign) NSInteger index; 70 | @property (nonatomic, strong) TTVideoItem *item; 71 | 72 | @property (nonatomic, assign, readonly) TTPlayerOrientation orientation; 73 | @property (nonatomic, copy) void(^playerOrientationChanged)(TTPlayerOrientation orientation, BOOL isLandscape); 74 | @property (nonatomic, copy) void(^clickPlayerFullScreen)(); 75 | @property (nonatomic, copy) void(^clickPlayerBackBlock)(TTPlayerOrientation fromOrientation); 76 | @property (nonatomic, copy) void(^playerToStop)(); 77 | 78 | @property (nonatomic, copy) void(^didSelectIndex)(NSInteger index); 79 | 80 | - (void)play; 81 | - (void)pause; 82 | - (void)stop; 83 | 84 | - (void)close; 85 | 86 | - (void)setPortraitLayout; 87 | - (void)setLandscapeLayout; 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TTAVPlayer/Pods-TTAVPlayer-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1"" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 91 | wait 92 | fi 93 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MASShorthandAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 22/07/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "View+MASAdditions.h" 10 | 11 | #ifdef MAS_SHORTHAND 12 | 13 | /** 14 | * Shorthand view additions without the 'mas_' prefixes, 15 | * only enabled if MAS_SHORTHAND is defined 16 | */ 17 | @interface MAS_VIEW (MASShorthandAdditions) 18 | 19 | @property (nonatomic, strong, readonly) MASViewAttribute *left; 20 | @property (nonatomic, strong, readonly) MASViewAttribute *top; 21 | @property (nonatomic, strong, readonly) MASViewAttribute *right; 22 | @property (nonatomic, strong, readonly) MASViewAttribute *bottom; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *leading; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *trailing; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *width; 26 | @property (nonatomic, strong, readonly) MASViewAttribute *height; 27 | @property (nonatomic, strong, readonly) MASViewAttribute *centerX; 28 | @property (nonatomic, strong, readonly) MASViewAttribute *centerY; 29 | @property (nonatomic, strong, readonly) MASViewAttribute *baseline; 30 | @property (nonatomic, strong, readonly) MASViewAttribute *(^attribute)(NSLayoutAttribute attr); 31 | 32 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 33 | 34 | @property (nonatomic, strong, readonly) MASViewAttribute *firstBaseline; 35 | @property (nonatomic, strong, readonly) MASViewAttribute *lastBaseline; 36 | 37 | #endif 38 | 39 | #if TARGET_OS_IPHONE || TARGET_OS_TV 40 | 41 | @property (nonatomic, strong, readonly) MASViewAttribute *leftMargin; 42 | @property (nonatomic, strong, readonly) MASViewAttribute *rightMargin; 43 | @property (nonatomic, strong, readonly) MASViewAttribute *topMargin; 44 | @property (nonatomic, strong, readonly) MASViewAttribute *bottomMargin; 45 | @property (nonatomic, strong, readonly) MASViewAttribute *leadingMargin; 46 | @property (nonatomic, strong, readonly) MASViewAttribute *trailingMargin; 47 | @property (nonatomic, strong, readonly) MASViewAttribute *centerXWithinMargins; 48 | @property (nonatomic, strong, readonly) MASViewAttribute *centerYWithinMargins; 49 | 50 | #endif 51 | 52 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; 53 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; 54 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; 55 | 56 | @end 57 | 58 | #define MAS_ATTR_FORWARD(attr) \ 59 | - (MASViewAttribute *)attr { \ 60 | return [self mas_##attr]; \ 61 | } 62 | 63 | @implementation MAS_VIEW (MASShorthandAdditions) 64 | 65 | MAS_ATTR_FORWARD(top); 66 | MAS_ATTR_FORWARD(left); 67 | MAS_ATTR_FORWARD(bottom); 68 | MAS_ATTR_FORWARD(right); 69 | MAS_ATTR_FORWARD(leading); 70 | MAS_ATTR_FORWARD(trailing); 71 | MAS_ATTR_FORWARD(width); 72 | MAS_ATTR_FORWARD(height); 73 | MAS_ATTR_FORWARD(centerX); 74 | MAS_ATTR_FORWARD(centerY); 75 | MAS_ATTR_FORWARD(baseline); 76 | 77 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 78 | 79 | MAS_ATTR_FORWARD(firstBaseline); 80 | MAS_ATTR_FORWARD(lastBaseline); 81 | 82 | #endif 83 | 84 | #if TARGET_OS_IPHONE || TARGET_OS_TV 85 | 86 | MAS_ATTR_FORWARD(leftMargin); 87 | MAS_ATTR_FORWARD(rightMargin); 88 | MAS_ATTR_FORWARD(topMargin); 89 | MAS_ATTR_FORWARD(bottomMargin); 90 | MAS_ATTR_FORWARD(leadingMargin); 91 | MAS_ATTR_FORWARD(trailingMargin); 92 | MAS_ATTR_FORWARD(centerXWithinMargins); 93 | MAS_ATTR_FORWARD(centerYWithinMargins); 94 | 95 | #endif 96 | 97 | - (MASViewAttribute *(^)(NSLayoutAttribute))attribute { 98 | return [self mas_attribute]; 99 | } 100 | 101 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { 102 | return [self mas_makeConstraints:block]; 103 | } 104 | 105 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { 106 | return [self mas_updateConstraints:block]; 107 | } 108 | 109 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { 110 | return [self mas_remakeConstraints:block]; 111 | } 112 | 113 | @end 114 | 115 | #endif 116 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MASAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | /** 14 | * Provides constraint maker block 15 | * and convience methods for creating MASViewAttribute which are view + NSLayoutAttribute pairs 16 | */ 17 | @interface MAS_VIEW (MASAdditions) 18 | 19 | /** 20 | * following properties return a new MASViewAttribute with current view and appropriate NSLayoutAttribute 21 | */ 22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_left; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_top; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_right; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottom; 26 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leading; 27 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailing; 28 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_width; 29 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_height; 30 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerX; 31 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerY; 32 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_baseline; 33 | @property (nonatomic, strong, readonly) MASViewAttribute *(^mas_attribute)(NSLayoutAttribute attr); 34 | 35 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 36 | 37 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_firstBaseline; 38 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_lastBaseline; 39 | 40 | #endif 41 | 42 | #if TARGET_OS_IPHONE || TARGET_OS_TV 43 | 44 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leftMargin; 45 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_rightMargin; 46 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topMargin; 47 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomMargin; 48 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leadingMargin; 49 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailingMargin; 50 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerXWithinMargins; 51 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerYWithinMargins; 52 | 53 | #endif 54 | 55 | /** 56 | * a key to associate with this view 57 | */ 58 | @property (nonatomic, strong) id mas_key; 59 | 60 | /** 61 | * Finds the closest common superview between this view and another view 62 | * 63 | * @param view other view 64 | * 65 | * @return returns nil if common superview could not be found 66 | */ 67 | - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view; 68 | 69 | /** 70 | * Creates a MASConstraintMaker with the callee view. 71 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing 72 | * 73 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 74 | * 75 | * @return Array of created MASConstraints 76 | */ 77 | - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block; 78 | 79 | /** 80 | * Creates a MASConstraintMaker with the callee view. 81 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. 82 | * If an existing constraint exists then it will be updated instead. 83 | * 84 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 85 | * 86 | * @return Array of created/updated MASConstraints 87 | */ 88 | - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block; 89 | 90 | /** 91 | * Creates a MASConstraintMaker with the callee view. 92 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. 93 | * All constraints previously installed for the view will be removed. 94 | * 95 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 96 | * 97 | * @return Array of created/updated MASConstraints 98 | */ 99 | - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block; 100 | 101 | @end 102 | -------------------------------------------------------------------------------- /AVPlayer/PlayerViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PlayerViewController.m 3 | // AVPlayer 4 | // 5 | // Created by ClaudeLi on 16/4/13. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "PlayerViewController.h" 10 | #import "CLRotatingScreen.h" 11 | #define MovieURL @"http://7s1sjv.com2.z0.glb.qiniucdn.com/9F76A25D-9509-DEE9-3D8A-E93F360BB0E5.mp4" 12 | 13 | static NSString *cellIdentifier = @"cellIdentifier"; 14 | 15 | @interface PlayerViewController () 16 | { 17 | UIInterfaceOrientation _lastOrientation; 18 | BOOL _isRoting; 19 | } 20 | @property (weak, nonatomic) IBOutlet UIView *downBGView; 21 | @end 22 | 23 | @implementation PlayerViewController 24 | 25 | - (void)viewDidLoad { 26 | [super viewDidLoad]; 27 | [self creatTableView]; 28 | [self.videoPlayer updatePlayerWith:[NSURL URLWithString:MovieURL]]; 29 | [CLRotatingScreen forceOrientation: UIInterfaceOrientationPortrait]; 30 | } 31 | 32 | - (void)dealloc{ 33 | [self.videoPlayer removeObserverAndNotification]; 34 | } 35 | 36 | - (IBAction)backAction:(id)sender { 37 | [self dismissViewControllerAnimated:YES completion:nil]; 38 | } 39 | 40 | //iOS8旋转动作的具体执行 41 | - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator { 42 | [super viewWillTransitionToSize:size withTransitionCoordinator: coordinator]; 43 | // 监察者将执行: 1.旋转前的动作 2.旋转后的动作(completion) 44 | [coordinator animateAlongsideTransition: ^(id context) 45 | { 46 | if ([CLRotatingScreen isOrientationLandscape]) { 47 | _lastOrientation = [UIApplication sharedApplication].statusBarOrientation; 48 | [self p_prepareFullScreen]; 49 | } 50 | else { 51 | [self p_prepareSmallScreen]; 52 | } 53 | } completion: ^(id context) { 54 | }]; 55 | 56 | } 57 | 58 | //iOS7旋转动作的具体执行 59 | - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { 60 | [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; 61 | if (toInterfaceOrientation == UIDeviceOrientationLandscapeRight || toInterfaceOrientation == UIDeviceOrientationLandscapeLeft) { 62 | _lastOrientation = [UIApplication sharedApplication].statusBarOrientation; 63 | [self p_prepareFullScreen]; 64 | } 65 | else { 66 | [self p_prepareSmallScreen]; 67 | } 68 | } 69 | 70 | #pragma mark - Private 71 | 72 | // 切换成全屏的准备工作 73 | - (void)p_prepareFullScreen { 74 | self.downBGView.hidden = YES; 75 | _headerHeight.constant = 0; 76 | [self.videoPlayer setlandscapeLayout]; 77 | } 78 | 79 | // 切换成小屏的准备工作 80 | - (void)p_prepareSmallScreen { 81 | self.downBGView.hidden = NO; 82 | _headerHeight.constant = KNavigatHeight; 83 | [self.videoPlayer setPortraitLayout]; 84 | } 85 | 86 | - (BOOL)shouldAutorotate{ 87 | return !self.videoPlayer.isLockScreen; 88 | } 89 | 90 | - (void)creatTableView 91 | { 92 | UITableView *videoTableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight - KNavigatHeight - KScreenWidth/16*9) style:UITableViewStylePlain]; 93 | videoTableView.backgroundColor = [UIColor whiteColor]; 94 | videoTableView.delegate = self; 95 | videoTableView.dataSource = self; 96 | videoTableView.separatorStyle = UITableViewCellSeparatorStyleNone; 97 | [self.downBGView addSubview:videoTableView]; 98 | } 99 | 100 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 101 | { 102 | return 10; 103 | } 104 | 105 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 106 | { 107 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 108 | if (!cell) { 109 | cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIdentifier]; 110 | } 111 | cell.backgroundColor = [UIColor randomColor]; 112 | cell.textLabel.text = integerToString(indexPath.row); 113 | return cell; 114 | } 115 | 116 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 117 | { 118 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 119 | } 120 | 121 | 122 | - (void)didReceiveMemoryWarning { 123 | [super didReceiveMemoryWarning]; 124 | // Dispose of any resources that can be recreated. 125 | } 126 | 127 | @end 128 | -------------------------------------------------------------------------------- /TTAVPlayer/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // TTAVPlayer 4 | // 5 | // Created by ClaudeLi on 2016/12/20. 6 | // Copyright © 2016年 ClaudeLi. 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 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // 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. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // 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. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // 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. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | // Saves changes in the application's managed object context before the application terminates. 49 | [self saveContext]; 50 | } 51 | 52 | 53 | #pragma mark - Core Data stack 54 | 55 | @synthesize persistentContainer = _persistentContainer; 56 | 57 | - (NSPersistentContainer *)persistentContainer { 58 | // The persistent container for the application. This implementation creates and returns a container, having loaded the store for the application to it. 59 | @synchronized (self) { 60 | if (_persistentContainer == nil) { 61 | _persistentContainer = [[NSPersistentContainer alloc] initWithName:@"TTAVPlayer"]; 62 | [_persistentContainer loadPersistentStoresWithCompletionHandler:^(NSPersistentStoreDescription *storeDescription, NSError *error) { 63 | if (error != nil) { 64 | // Replace this implementation with code to handle the error appropriately. 65 | // 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. 66 | 67 | /* 68 | Typical reasons for an error here include: 69 | * The parent directory does not exist, cannot be created, or disallows writing. 70 | * The persistent store is not accessible, due to permissions or data protection when the device is locked. 71 | * The device is out of space. 72 | * The store could not be migrated to the current model version. 73 | Check the error message to determine what the actual problem was. 74 | */ 75 | NSLog(@"Unresolved error %@, %@", error, error.userInfo); 76 | abort(); 77 | } 78 | }]; 79 | } 80 | } 81 | 82 | return _persistentContainer; 83 | } 84 | 85 | #pragma mark - Core Data Saving support 86 | 87 | - (void)saveContext { 88 | NSManagedObjectContext *context = self.persistentContainer.viewContext; 89 | NSError *error = nil; 90 | if ([context hasChanges] && ![context save:&error]) { 91 | // Replace this implementation with code to handle the error appropriately. 92 | // 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. 93 | NSLog(@"Unresolved error %@, %@", error, error.userInfo); 94 | abort(); 95 | } 96 | } 97 | 98 | @end 99 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TTAVPlayer/Pods-TTAVPlayer-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | *) 25 | TARGET_DEVICE_ARGS="--target-device mac" 26 | ;; 27 | esac 28 | 29 | install_resource() 30 | { 31 | if [[ "$1" = /* ]] ; then 32 | RESOURCE_PATH="$1" 33 | else 34 | RESOURCE_PATH="${PODS_ROOT}/$1" 35 | fi 36 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 37 | cat << EOM 38 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 39 | EOM 40 | exit 1 41 | fi 42 | case $RESOURCE_PATH in 43 | *.storyboard) 44 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 45 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 46 | ;; 47 | *.xib) 48 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 49 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 50 | ;; 51 | *.framework) 52 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 54 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 55 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | ;; 57 | *.xcdatamodel) 58 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 59 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 60 | ;; 61 | *.xcdatamodeld) 62 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 63 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 64 | ;; 65 | *.xcmappingmodel) 66 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 67 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 68 | ;; 69 | *.xcassets) 70 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 71 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 72 | ;; 73 | *) 74 | echo "$RESOURCE_PATH" 75 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 76 | ;; 77 | esac 78 | } 79 | 80 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 83 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | fi 86 | rm -f "$RESOURCES_TO_COPY" 87 | 88 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 89 | then 90 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 91 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 92 | while read line; do 93 | if [[ $line != "${PODS_ROOT}*" ]]; then 94 | XCASSET_FILES+=("$line") 95 | fi 96 | done <<<"$OTHER_XCASSETS" 97 | 98 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | fi 100 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASCompositeConstraint.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASCompositeConstraint.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASCompositeConstraint.h" 10 | #import "MASConstraint+Private.h" 11 | 12 | @interface MASCompositeConstraint () 13 | 14 | @property (nonatomic, strong) id mas_key; 15 | @property (nonatomic, strong) NSMutableArray *childConstraints; 16 | 17 | @end 18 | 19 | @implementation MASCompositeConstraint 20 | 21 | - (id)initWithChildren:(NSArray *)children { 22 | self = [super init]; 23 | if (!self) return nil; 24 | 25 | _childConstraints = [children mutableCopy]; 26 | for (MASConstraint *constraint in _childConstraints) { 27 | constraint.delegate = self; 28 | } 29 | 30 | return self; 31 | } 32 | 33 | #pragma mark - MASConstraintDelegate 34 | 35 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint { 36 | NSUInteger index = [self.childConstraints indexOfObject:constraint]; 37 | NSAssert(index != NSNotFound, @"Could not find constraint %@", constraint); 38 | [self.childConstraints replaceObjectAtIndex:index withObject:replacementConstraint]; 39 | } 40 | 41 | - (MASConstraint *)constraint:(MASConstraint __unused *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { 42 | id strongDelegate = self.delegate; 43 | MASConstraint *newConstraint = [strongDelegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; 44 | newConstraint.delegate = self; 45 | [self.childConstraints addObject:newConstraint]; 46 | return newConstraint; 47 | } 48 | 49 | #pragma mark - NSLayoutConstraint multiplier proxies 50 | 51 | - (MASConstraint * (^)(CGFloat))multipliedBy { 52 | return ^id(CGFloat multiplier) { 53 | for (MASConstraint *constraint in self.childConstraints) { 54 | constraint.multipliedBy(multiplier); 55 | } 56 | return self; 57 | }; 58 | } 59 | 60 | - (MASConstraint * (^)(CGFloat))dividedBy { 61 | return ^id(CGFloat divider) { 62 | for (MASConstraint *constraint in self.childConstraints) { 63 | constraint.dividedBy(divider); 64 | } 65 | return self; 66 | }; 67 | } 68 | 69 | #pragma mark - MASLayoutPriority proxy 70 | 71 | - (MASConstraint * (^)(MASLayoutPriority))priority { 72 | return ^id(MASLayoutPriority priority) { 73 | for (MASConstraint *constraint in self.childConstraints) { 74 | constraint.priority(priority); 75 | } 76 | return self; 77 | }; 78 | } 79 | 80 | #pragma mark - NSLayoutRelation proxy 81 | 82 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { 83 | return ^id(id attr, NSLayoutRelation relation) { 84 | for (MASConstraint *constraint in self.childConstraints.copy) { 85 | constraint.equalToWithRelation(attr, relation); 86 | } 87 | return self; 88 | }; 89 | } 90 | 91 | #pragma mark - attribute chaining 92 | 93 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { 94 | [self constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; 95 | return self; 96 | } 97 | 98 | #pragma mark - Animator proxy 99 | 100 | #if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) 101 | 102 | - (MASConstraint *)animator { 103 | for (MASConstraint *constraint in self.childConstraints) { 104 | [constraint animator]; 105 | } 106 | return self; 107 | } 108 | 109 | #endif 110 | 111 | #pragma mark - debug helpers 112 | 113 | - (MASConstraint * (^)(id))key { 114 | return ^id(id key) { 115 | self.mas_key = key; 116 | int i = 0; 117 | for (MASConstraint *constraint in self.childConstraints) { 118 | constraint.key([NSString stringWithFormat:@"%@[%d]", key, i++]); 119 | } 120 | return self; 121 | }; 122 | } 123 | 124 | #pragma mark - NSLayoutConstraint constant setters 125 | 126 | - (void)setInsets:(MASEdgeInsets)insets { 127 | for (MASConstraint *constraint in self.childConstraints) { 128 | constraint.insets = insets; 129 | } 130 | } 131 | 132 | - (void)setOffset:(CGFloat)offset { 133 | for (MASConstraint *constraint in self.childConstraints) { 134 | constraint.offset = offset; 135 | } 136 | } 137 | 138 | - (void)setSizeOffset:(CGSize)sizeOffset { 139 | for (MASConstraint *constraint in self.childConstraints) { 140 | constraint.sizeOffset = sizeOffset; 141 | } 142 | } 143 | 144 | - (void)setCenterOffset:(CGPoint)centerOffset { 145 | for (MASConstraint *constraint in self.childConstraints) { 146 | constraint.centerOffset = centerOffset; 147 | } 148 | } 149 | 150 | #pragma mark - MASConstraint 151 | 152 | - (void)activate { 153 | for (MASConstraint *constraint in self.childConstraints) { 154 | [constraint activate]; 155 | } 156 | } 157 | 158 | - (void)deactivate { 159 | for (MASConstraint *constraint in self.childConstraints) { 160 | [constraint deactivate]; 161 | } 162 | } 163 | 164 | - (void)install { 165 | for (MASConstraint *constraint in self.childConstraints) { 166 | constraint.updateExisting = self.updateExisting; 167 | [constraint install]; 168 | } 169 | } 170 | 171 | - (void)uninstall { 172 | for (MASConstraint *constraint in self.childConstraints) { 173 | [constraint uninstall]; 174 | } 175 | } 176 | 177 | @end 178 | -------------------------------------------------------------------------------- /TTAVPlayer/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 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /AVPlayer/PlayerViewController.xib: -------------------------------------------------------------------------------- 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 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraintBuilder.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | #import "MASUtilities.h" 11 | 12 | typedef NS_OPTIONS(NSInteger, MASAttribute) { 13 | MASAttributeLeft = 1 << NSLayoutAttributeLeft, 14 | MASAttributeRight = 1 << NSLayoutAttributeRight, 15 | MASAttributeTop = 1 << NSLayoutAttributeTop, 16 | MASAttributeBottom = 1 << NSLayoutAttributeBottom, 17 | MASAttributeLeading = 1 << NSLayoutAttributeLeading, 18 | MASAttributeTrailing = 1 << NSLayoutAttributeTrailing, 19 | MASAttributeWidth = 1 << NSLayoutAttributeWidth, 20 | MASAttributeHeight = 1 << NSLayoutAttributeHeight, 21 | MASAttributeCenterX = 1 << NSLayoutAttributeCenterX, 22 | MASAttributeCenterY = 1 << NSLayoutAttributeCenterY, 23 | MASAttributeBaseline = 1 << NSLayoutAttributeBaseline, 24 | 25 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 26 | 27 | MASAttributeFirstBaseline = 1 << NSLayoutAttributeFirstBaseline, 28 | MASAttributeLastBaseline = 1 << NSLayoutAttributeLastBaseline, 29 | 30 | #endif 31 | 32 | #if TARGET_OS_IPHONE || TARGET_OS_TV 33 | 34 | MASAttributeLeftMargin = 1 << NSLayoutAttributeLeftMargin, 35 | MASAttributeRightMargin = 1 << NSLayoutAttributeRightMargin, 36 | MASAttributeTopMargin = 1 << NSLayoutAttributeTopMargin, 37 | MASAttributeBottomMargin = 1 << NSLayoutAttributeBottomMargin, 38 | MASAttributeLeadingMargin = 1 << NSLayoutAttributeLeadingMargin, 39 | MASAttributeTrailingMargin = 1 << NSLayoutAttributeTrailingMargin, 40 | MASAttributeCenterXWithinMargins = 1 << NSLayoutAttributeCenterXWithinMargins, 41 | MASAttributeCenterYWithinMargins = 1 << NSLayoutAttributeCenterYWithinMargins, 42 | 43 | #endif 44 | 45 | }; 46 | 47 | /** 48 | * Provides factory methods for creating MASConstraints. 49 | * Constraints are collected until they are ready to be installed 50 | * 51 | */ 52 | @interface MASConstraintMaker : NSObject 53 | 54 | /** 55 | * The following properties return a new MASViewConstraint 56 | * with the first item set to the makers associated view and the appropriate MASViewAttribute 57 | */ 58 | @property (nonatomic, strong, readonly) MASConstraint *left; 59 | @property (nonatomic, strong, readonly) MASConstraint *top; 60 | @property (nonatomic, strong, readonly) MASConstraint *right; 61 | @property (nonatomic, strong, readonly) MASConstraint *bottom; 62 | @property (nonatomic, strong, readonly) MASConstraint *leading; 63 | @property (nonatomic, strong, readonly) MASConstraint *trailing; 64 | @property (nonatomic, strong, readonly) MASConstraint *width; 65 | @property (nonatomic, strong, readonly) MASConstraint *height; 66 | @property (nonatomic, strong, readonly) MASConstraint *centerX; 67 | @property (nonatomic, strong, readonly) MASConstraint *centerY; 68 | @property (nonatomic, strong, readonly) MASConstraint *baseline; 69 | 70 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 71 | 72 | @property (nonatomic, strong, readonly) MASConstraint *firstBaseline; 73 | @property (nonatomic, strong, readonly) MASConstraint *lastBaseline; 74 | 75 | #endif 76 | 77 | #if TARGET_OS_IPHONE || TARGET_OS_TV 78 | 79 | @property (nonatomic, strong, readonly) MASConstraint *leftMargin; 80 | @property (nonatomic, strong, readonly) MASConstraint *rightMargin; 81 | @property (nonatomic, strong, readonly) MASConstraint *topMargin; 82 | @property (nonatomic, strong, readonly) MASConstraint *bottomMargin; 83 | @property (nonatomic, strong, readonly) MASConstraint *leadingMargin; 84 | @property (nonatomic, strong, readonly) MASConstraint *trailingMargin; 85 | @property (nonatomic, strong, readonly) MASConstraint *centerXWithinMargins; 86 | @property (nonatomic, strong, readonly) MASConstraint *centerYWithinMargins; 87 | 88 | #endif 89 | 90 | /** 91 | * Returns a block which creates a new MASCompositeConstraint with the first item set 92 | * to the makers associated view and children corresponding to the set bits in the 93 | * MASAttribute parameter. Combine multiple attributes via binary-or. 94 | */ 95 | @property (nonatomic, strong, readonly) MASConstraint *(^attributes)(MASAttribute attrs); 96 | 97 | /** 98 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeEdges 99 | * which generates the appropriate MASViewConstraint children (top, left, bottom, right) 100 | * with the first item set to the makers associated view 101 | */ 102 | @property (nonatomic, strong, readonly) MASConstraint *edges; 103 | 104 | /** 105 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeSize 106 | * which generates the appropriate MASViewConstraint children (width, height) 107 | * with the first item set to the makers associated view 108 | */ 109 | @property (nonatomic, strong, readonly) MASConstraint *size; 110 | 111 | /** 112 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeCenter 113 | * which generates the appropriate MASViewConstraint children (centerX, centerY) 114 | * with the first item set to the makers associated view 115 | */ 116 | @property (nonatomic, strong, readonly) MASConstraint *center; 117 | 118 | /** 119 | * Whether or not to check for an existing constraint instead of adding constraint 120 | */ 121 | @property (nonatomic, assign) BOOL updateExisting; 122 | 123 | /** 124 | * Whether or not to remove existing constraints prior to installing 125 | */ 126 | @property (nonatomic, assign) BOOL removeExisting; 127 | 128 | /** 129 | * initialises the maker with a default view 130 | * 131 | * @param view any MASConstrait are created with this view as the first item 132 | * 133 | * @return a new MASConstraintMaker 134 | */ 135 | - (id)initWithView:(MAS_VIEW *)view; 136 | 137 | /** 138 | * Calls install method on any MASConstraints which have been created by this maker 139 | * 140 | * @return an array of all the installed MASConstraints 141 | */ 142 | - (NSArray *)install; 143 | 144 | - (MASConstraint * (^)(dispatch_block_t))group; 145 | 146 | @end 147 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/View+MASAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MASAdditions.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "View+MASAdditions.h" 10 | #import 11 | 12 | @implementation MAS_VIEW (MASAdditions) 13 | 14 | - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *))block { 15 | self.translatesAutoresizingMaskIntoConstraints = NO; 16 | MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; 17 | block(constraintMaker); 18 | return [constraintMaker install]; 19 | } 20 | 21 | - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *))block { 22 | self.translatesAutoresizingMaskIntoConstraints = NO; 23 | MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; 24 | constraintMaker.updateExisting = YES; 25 | block(constraintMaker); 26 | return [constraintMaker install]; 27 | } 28 | 29 | - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block { 30 | self.translatesAutoresizingMaskIntoConstraints = NO; 31 | MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; 32 | constraintMaker.removeExisting = YES; 33 | block(constraintMaker); 34 | return [constraintMaker install]; 35 | } 36 | 37 | #pragma mark - NSLayoutAttribute properties 38 | 39 | - (MASViewAttribute *)mas_left { 40 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeft]; 41 | } 42 | 43 | - (MASViewAttribute *)mas_top { 44 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTop]; 45 | } 46 | 47 | - (MASViewAttribute *)mas_right { 48 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRight]; 49 | } 50 | 51 | - (MASViewAttribute *)mas_bottom { 52 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottom]; 53 | } 54 | 55 | - (MASViewAttribute *)mas_leading { 56 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeading]; 57 | } 58 | 59 | - (MASViewAttribute *)mas_trailing { 60 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailing]; 61 | } 62 | 63 | - (MASViewAttribute *)mas_width { 64 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeWidth]; 65 | } 66 | 67 | - (MASViewAttribute *)mas_height { 68 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeHeight]; 69 | } 70 | 71 | - (MASViewAttribute *)mas_centerX { 72 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterX]; 73 | } 74 | 75 | - (MASViewAttribute *)mas_centerY { 76 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterY]; 77 | } 78 | 79 | - (MASViewAttribute *)mas_baseline { 80 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBaseline]; 81 | } 82 | 83 | - (MASViewAttribute *(^)(NSLayoutAttribute))mas_attribute 84 | { 85 | return ^(NSLayoutAttribute attr) { 86 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:attr]; 87 | }; 88 | } 89 | 90 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 91 | 92 | - (MASViewAttribute *)mas_firstBaseline { 93 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeFirstBaseline]; 94 | } 95 | - (MASViewAttribute *)mas_lastBaseline { 96 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLastBaseline]; 97 | } 98 | 99 | #endif 100 | 101 | #if TARGET_OS_IPHONE || TARGET_OS_TV 102 | 103 | - (MASViewAttribute *)mas_leftMargin { 104 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeftMargin]; 105 | } 106 | 107 | - (MASViewAttribute *)mas_rightMargin { 108 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRightMargin]; 109 | } 110 | 111 | - (MASViewAttribute *)mas_topMargin { 112 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTopMargin]; 113 | } 114 | 115 | - (MASViewAttribute *)mas_bottomMargin { 116 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottomMargin]; 117 | } 118 | 119 | - (MASViewAttribute *)mas_leadingMargin { 120 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeadingMargin]; 121 | } 122 | 123 | - (MASViewAttribute *)mas_trailingMargin { 124 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailingMargin]; 125 | } 126 | 127 | - (MASViewAttribute *)mas_centerXWithinMargins { 128 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterXWithinMargins]; 129 | } 130 | 131 | - (MASViewAttribute *)mas_centerYWithinMargins { 132 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterYWithinMargins]; 133 | } 134 | 135 | #endif 136 | 137 | #pragma mark - associated properties 138 | 139 | - (id)mas_key { 140 | return objc_getAssociatedObject(self, @selector(mas_key)); 141 | } 142 | 143 | - (void)setMas_key:(id)key { 144 | objc_setAssociatedObject(self, @selector(mas_key), key, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 145 | } 146 | 147 | #pragma mark - heirachy 148 | 149 | - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view { 150 | MAS_VIEW *closestCommonSuperview = nil; 151 | 152 | MAS_VIEW *secondViewSuperview = view; 153 | while (!closestCommonSuperview && secondViewSuperview) { 154 | MAS_VIEW *firstViewSuperview = self; 155 | while (!closestCommonSuperview && firstViewSuperview) { 156 | if (secondViewSuperview == firstViewSuperview) { 157 | closestCommonSuperview = secondViewSuperview; 158 | } 159 | firstViewSuperview = firstViewSuperview.superview; 160 | } 161 | secondViewSuperview = secondViewSuperview.superview; 162 | } 163 | return closestCommonSuperview; 164 | } 165 | 166 | @end 167 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSLayoutConstraint+MASDebugAdditions.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "NSLayoutConstraint+MASDebugAdditions.h" 10 | #import "MASConstraint.h" 11 | #import "MASLayoutConstraint.h" 12 | 13 | @implementation NSLayoutConstraint (MASDebugAdditions) 14 | 15 | #pragma mark - description maps 16 | 17 | + (NSDictionary *)layoutRelationDescriptionsByValue { 18 | static dispatch_once_t once; 19 | static NSDictionary *descriptionMap; 20 | dispatch_once(&once, ^{ 21 | descriptionMap = @{ 22 | @(NSLayoutRelationEqual) : @"==", 23 | @(NSLayoutRelationGreaterThanOrEqual) : @">=", 24 | @(NSLayoutRelationLessThanOrEqual) : @"<=", 25 | }; 26 | }); 27 | return descriptionMap; 28 | } 29 | 30 | + (NSDictionary *)layoutAttributeDescriptionsByValue { 31 | static dispatch_once_t once; 32 | static NSDictionary *descriptionMap; 33 | dispatch_once(&once, ^{ 34 | descriptionMap = @{ 35 | @(NSLayoutAttributeTop) : @"top", 36 | @(NSLayoutAttributeLeft) : @"left", 37 | @(NSLayoutAttributeBottom) : @"bottom", 38 | @(NSLayoutAttributeRight) : @"right", 39 | @(NSLayoutAttributeLeading) : @"leading", 40 | @(NSLayoutAttributeTrailing) : @"trailing", 41 | @(NSLayoutAttributeWidth) : @"width", 42 | @(NSLayoutAttributeHeight) : @"height", 43 | @(NSLayoutAttributeCenterX) : @"centerX", 44 | @(NSLayoutAttributeCenterY) : @"centerY", 45 | @(NSLayoutAttributeBaseline) : @"baseline", 46 | 47 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 48 | @(NSLayoutAttributeFirstBaseline) : @"firstBaseline", 49 | @(NSLayoutAttributeLastBaseline) : @"lastBaseline", 50 | #endif 51 | 52 | #if TARGET_OS_IPHONE || TARGET_OS_TV 53 | @(NSLayoutAttributeLeftMargin) : @"leftMargin", 54 | @(NSLayoutAttributeRightMargin) : @"rightMargin", 55 | @(NSLayoutAttributeTopMargin) : @"topMargin", 56 | @(NSLayoutAttributeBottomMargin) : @"bottomMargin", 57 | @(NSLayoutAttributeLeadingMargin) : @"leadingMargin", 58 | @(NSLayoutAttributeTrailingMargin) : @"trailingMargin", 59 | @(NSLayoutAttributeCenterXWithinMargins) : @"centerXWithinMargins", 60 | @(NSLayoutAttributeCenterYWithinMargins) : @"centerYWithinMargins", 61 | #endif 62 | 63 | }; 64 | 65 | }); 66 | return descriptionMap; 67 | } 68 | 69 | 70 | + (NSDictionary *)layoutPriorityDescriptionsByValue { 71 | static dispatch_once_t once; 72 | static NSDictionary *descriptionMap; 73 | dispatch_once(&once, ^{ 74 | #if TARGET_OS_IPHONE || TARGET_OS_TV 75 | descriptionMap = @{ 76 | @(MASLayoutPriorityDefaultHigh) : @"high", 77 | @(MASLayoutPriorityDefaultLow) : @"low", 78 | @(MASLayoutPriorityDefaultMedium) : @"medium", 79 | @(MASLayoutPriorityRequired) : @"required", 80 | @(MASLayoutPriorityFittingSizeLevel) : @"fitting size", 81 | }; 82 | #elif TARGET_OS_MAC 83 | descriptionMap = @{ 84 | @(MASLayoutPriorityDefaultHigh) : @"high", 85 | @(MASLayoutPriorityDragThatCanResizeWindow) : @"drag can resize window", 86 | @(MASLayoutPriorityDefaultMedium) : @"medium", 87 | @(MASLayoutPriorityWindowSizeStayPut) : @"window size stay put", 88 | @(MASLayoutPriorityDragThatCannotResizeWindow) : @"drag cannot resize window", 89 | @(MASLayoutPriorityDefaultLow) : @"low", 90 | @(MASLayoutPriorityFittingSizeCompression) : @"fitting size", 91 | @(MASLayoutPriorityRequired) : @"required", 92 | }; 93 | #endif 94 | }); 95 | return descriptionMap; 96 | } 97 | 98 | #pragma mark - description override 99 | 100 | + (NSString *)descriptionForObject:(id)obj { 101 | if ([obj respondsToSelector:@selector(mas_key)] && [obj mas_key]) { 102 | return [NSString stringWithFormat:@"%@:%@", [obj class], [obj mas_key]]; 103 | } 104 | return [NSString stringWithFormat:@"%@:%p", [obj class], obj]; 105 | } 106 | 107 | - (NSString *)description { 108 | NSMutableString *description = [[NSMutableString alloc] initWithString:@"<"]; 109 | 110 | [description appendString:[self.class descriptionForObject:self]]; 111 | 112 | [description appendFormat:@" %@", [self.class descriptionForObject:self.firstItem]]; 113 | if (self.firstAttribute != NSLayoutAttributeNotAnAttribute) { 114 | [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.firstAttribute)]]; 115 | } 116 | 117 | [description appendFormat:@" %@", self.class.layoutRelationDescriptionsByValue[@(self.relation)]]; 118 | 119 | if (self.secondItem) { 120 | [description appendFormat:@" %@", [self.class descriptionForObject:self.secondItem]]; 121 | } 122 | if (self.secondAttribute != NSLayoutAttributeNotAnAttribute) { 123 | [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.secondAttribute)]]; 124 | } 125 | 126 | if (self.multiplier != 1) { 127 | [description appendFormat:@" * %g", self.multiplier]; 128 | } 129 | 130 | if (self.secondAttribute == NSLayoutAttributeNotAnAttribute) { 131 | [description appendFormat:@" %g", self.constant]; 132 | } else { 133 | if (self.constant) { 134 | [description appendFormat:@" %@ %g", (self.constant < 0 ? @"-" : @"+"), ABS(self.constant)]; 135 | } 136 | } 137 | 138 | if (self.priority != MASLayoutPriorityRequired) { 139 | [description appendFormat:@" ^%@", self.class.layoutPriorityDescriptionsByValue[@(self.priority)] ?: [NSNumber numberWithDouble:self.priority]]; 140 | } 141 | 142 | [description appendString:@">"]; 143 | return description; 144 | } 145 | 146 | @end 147 | -------------------------------------------------------------------------------- /AVPlayer/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // AVPlayer 4 | // 5 | // Created by ClaudeLi on 16/4/13. 6 | // Copyright © 2016年 ClaudeLi. 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 | [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES]; 21 | 22 | return YES; 23 | } 24 | 25 | - (void)applicationWillResignActive:(UIApplication *)application { 26 | // 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. 27 | // 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. 28 | } 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // 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. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | - (void)applicationWillEnterForeground:(UIApplication *)application { 36 | // 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. 37 | } 38 | 39 | - (void)applicationDidBecomeActive:(UIApplication *)application { 40 | // 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. 41 | } 42 | 43 | - (void)applicationWillTerminate:(UIApplication *)application { 44 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 45 | // Saves changes in the application's managed object context before the application terminates. 46 | [self saveContext]; 47 | } 48 | 49 | #pragma mark - Core Data stack 50 | 51 | @synthesize managedObjectContext = _managedObjectContext; 52 | @synthesize managedObjectModel = _managedObjectModel; 53 | @synthesize persistentStoreCoordinator = _persistentStoreCoordinator; 54 | 55 | - (NSURL *)applicationDocumentsDirectory { 56 | // The directory the application uses to store the Core Data store file. This code uses a directory named "com.claudeli.AVPlayer" in the application's documents directory. 57 | return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; 58 | } 59 | 60 | - (NSManagedObjectModel *)managedObjectModel { 61 | // 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. 62 | if (_managedObjectModel != nil) { 63 | return _managedObjectModel; 64 | } 65 | NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"AVPlayer" withExtension:@"momd"]; 66 | _managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; 67 | return _managedObjectModel; 68 | } 69 | 70 | - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { 71 | // The persistent store coordinator for the application. This implementation creates and returns a coordinator, having added the store for the application to it. 72 | if (_persistentStoreCoordinator != nil) { 73 | return _persistentStoreCoordinator; 74 | } 75 | 76 | // Create the coordinator and store 77 | 78 | _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; 79 | NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"AVPlayer.sqlite"]; 80 | NSError *error = nil; 81 | NSString *failureReason = @"There was an error creating or loading the application's saved data."; 82 | if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) { 83 | // Report any error we got. 84 | NSMutableDictionary *dict = [NSMutableDictionary dictionary]; 85 | dict[NSLocalizedDescriptionKey] = @"Failed to initialize the application's saved data"; 86 | dict[NSLocalizedFailureReasonErrorKey] = failureReason; 87 | dict[NSUnderlyingErrorKey] = error; 88 | error = [NSError errorWithDomain:@"YOUR_ERROR_DOMAIN" code:9999 userInfo:dict]; 89 | // Replace this with code to handle the error appropriately. 90 | // 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. 91 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]); 92 | abort(); 93 | } 94 | 95 | return _persistentStoreCoordinator; 96 | } 97 | 98 | 99 | - (NSManagedObjectContext *)managedObjectContext { 100 | // Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.) 101 | if (_managedObjectContext != nil) { 102 | return _managedObjectContext; 103 | } 104 | 105 | NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; 106 | if (!coordinator) { 107 | return nil; 108 | } 109 | _managedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType]; 110 | [_managedObjectContext setPersistentStoreCoordinator:coordinator]; 111 | return _managedObjectContext; 112 | } 113 | 114 | #pragma mark - Core Data Saving support 115 | 116 | - (void)saveContext { 117 | NSManagedObjectContext *managedObjectContext = self.managedObjectContext; 118 | if (managedObjectContext != nil) { 119 | NSError *error = nil; 120 | if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) { 121 | // Replace this implementation with code to handle the error appropriately. 122 | // 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. 123 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]); 124 | abort(); 125 | } 126 | } 127 | } 128 | 129 | @end 130 | --------------------------------------------------------------------------------