├── .gitattributes
├── GAPlayer.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
│ └── xcuserdata
│ │ └── gongao.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── WorkspaceSettings.xcsettings
└── xcuserdata
│ └── gongao.xcuserdatad
│ ├── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes
│ └── xcschememanagement.plist
├── GAPlayer
├── AppDelegate.h
├── AppDelegate.m
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ ├── HomeList
│ │ ├── Apple.imageset
│ │ │ ├── Apple.jpg
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── Love.imageset
│ │ │ ├── Contents.json
│ │ │ └── Love.jpeg
│ │ ├── Sad.imageset
│ │ │ ├── Contents.json
│ │ │ └── Sad.jpeg
│ │ └── Sunshine.imageset
│ │ │ ├── Contents.json
│ │ │ └── Sunshine.jpeg
│ ├── Player
│ │ ├── Contents.json
│ │ ├── btn_continue_play.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn_continue_play@2x.png
│ │ │ └── btn_continue_play@3x.png
│ │ ├── player_btn_fplay_audio_nal.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn_fplay_audio_nal@2x.png
│ │ │ └── btn_fplay_audio_nal@3x.png
│ │ ├── player_btn_fplay_audio_sel.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn_fplay_audio_sel@2x.png
│ │ │ └── btn_fplay_audio_sel@3x.png
│ │ ├── player_btn_fplay_collect_nal.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn_fplay_collect_nal@2x.png
│ │ │ └── btn_fplay_collect_nal@3x.png
│ │ ├── player_btn_fplay_collect_sel.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn_fplay_collect_sel@2x.png
│ │ │ └── btn_fplay_collect_sel@3x.png
│ │ ├── player_btn_fplay_download.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn_fplay_download@2x.png
│ │ │ └── btn_fplay_download@3x.png
│ │ ├── player_btn_fplay_lock.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn_fplay_lock@2x.png
│ │ │ └── btn_fplay_lock@3x.png
│ │ ├── player_btn_fplay_menu.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn_fplay_menu@2x.png
│ │ │ └── btn_fplay_menu@3x.png
│ │ ├── player_btn_fplay_next.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn_fplay_next@2x.png
│ │ │ └── btn_fplay_next@3x.png
│ │ ├── player_btn_fplay_pause.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn_fplay_pause@2x.png
│ │ │ └── btn_fplay_pause@3x.png
│ │ ├── player_btn_fplay_play.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn_fplay_play@2x.png
│ │ │ └── btn_fplay_play@3x.png
│ │ ├── player_btn_fplay_unlock.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn_fplay_unlock@2x.png
│ │ │ └── btn_fplay_unlock@3x.png
│ │ ├── player_btn_fplaynav_back.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn_fplaynav_back@2x.png
│ │ │ └── btn_fplaynav_back@3x.png
│ │ ├── player_btn_splay_download.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn_splay_download@2x.png
│ │ │ └── btn_splay_download@3x.png
│ │ ├── player_btn_splay_fscreen.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn_splay_fscreen@2x.png
│ │ │ └── btn_splay_fscreen@3x.png
│ │ ├── player_ico_play_brightness.imageset
│ │ │ ├── Contents.json
│ │ │ └── ico_play_brightness.png
│ │ ├── player_img_fplay_bg_down.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_play_bg_down@2x.png
│ │ │ └── img_play_bg_down@3x.png
│ │ ├── player_img_fplay_bg_up.imageset
│ │ │ ├── Contents.json
│ │ │ ├── img_play_bg_up@2x.png
│ │ │ └── img_play_bg_up@3x.png
│ │ ├── player_ion_play_position.imageset
│ │ │ ├── Contents.json
│ │ │ ├── ion_play_position@2x.png
│ │ │ └── ion_play_position@3x.png
│ │ ├── video_refresh.imageset
│ │ │ ├── Contents.json
│ │ │ └── video_refresh@2x.png
│ │ └── video_refresh_again.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn_error_retry@2x.png
│ │ │ └── btn_error_retry@3x.png
│ └── PlayerDetail
│ │ ├── Contents.json
│ │ ├── course_pause_highlighted.imageset
│ │ ├── Contents.json
│ │ └── course_pause_highlighted@2x.png
│ │ ├── course_pause_normal.imageset
│ │ ├── Contents.json
│ │ └── course_pause_normal@2x.png
│ │ ├── course_play_highlighted.imageset
│ │ ├── Contents.json
│ │ └── course_play_highlighted@2x.png
│ │ ├── course_play_normal.imageset
│ │ ├── Contents.json
│ │ └── course_play_normal@2x.png
│ │ ├── downloadLoading_state_highlighted.imageset
│ │ ├── Contents.json
│ │ └── downloadLoading_state_highlighted@2x.png
│ │ ├── downloadLoading_state_normal.imageset
│ │ ├── Contents.json
│ │ └── downloadLoading_state_normal@2x.png
│ │ ├── download_fail_highlighted.imageset
│ │ ├── Contents.json
│ │ └── download_fail_highlighted@2x.png
│ │ ├── download_fail_normal.imageset
│ │ ├── Contents.json
│ │ └── download_fail_normal@2x.png
│ │ ├── download_none_highlighted.imageset
│ │ ├── Contents.json
│ │ └── download_none_highlighted@2x.png
│ │ ├── download_none_normal.imageset
│ │ ├── Contents.json
│ │ └── download_none_normal@2x.png
│ │ ├── download_pause_highlighted.imageset
│ │ ├── Contents.json
│ │ └── download_pause_highlighted@2x.png
│ │ ├── download_pause_normal.imageset
│ │ ├── Contents.json
│ │ └── download_pause_normal@2x.png
│ │ ├── download_success_highlighted.imageset
│ │ ├── Contents.json
│ │ └── download_success_highlighted@2x.png
│ │ ├── download_success_normal.imageset
│ │ ├── Contents.json
│ │ └── download_success_normal@2x.png
│ │ ├── download_wait_highlighted.imageset
│ │ ├── Contents.json
│ │ └── download_wait_highlighted@2x.png
│ │ ├── download_wait_normal.imageset
│ │ ├── Contents.json
│ │ └── download_wait_normal@2x.png
│ │ ├── ico_downloaded.imageset
│ │ ├── Contents.json
│ │ ├── ico_downloaded@2x.png
│ │ └── ico_downloaded@3x.png
│ │ ├── ico_downloading.imageset
│ │ ├── Contents.json
│ │ ├── ico_downloading@2x.png
│ │ └── ico_downloading@3x.png
│ │ ├── ico_playlist_nor.imageset
│ │ ├── Contents.json
│ │ ├── ico_playlist_nor@2x.png
│ │ └── ico_playlist_nor@3x.png
│ │ └── ico_playlist_sel.imageset
│ │ ├── Contents.json
│ │ ├── ico_playlist_sel@2x.png
│ │ └── ico_playlist_sel@3x.png
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── Class
│ ├── BussinessVC
│ │ ├── DownloadList
│ │ │ ├── Model
│ │ │ │ ├── GADownloadListModel.h
│ │ │ │ └── GADownloadListModel.m
│ │ │ └── ViewController
│ │ │ │ ├── GADownloadListViewController.h
│ │ │ │ └── GADownloadListViewController.m
│ │ ├── HomeList
│ │ │ ├── GAHomeListModel.h
│ │ │ ├── GAHomeListModel.m
│ │ │ ├── GAHomeListTableViewCell.h
│ │ │ ├── GAHomeListTableViewCell.m
│ │ │ ├── GAHomeListViewController.h
│ │ │ └── GAHomeListViewController.m
│ │ └── PlayerDetail
│ │ │ ├── GAPlayerDetailViewController.h
│ │ │ ├── GAPlayerDetailViewController.m
│ │ │ ├── Model
│ │ │ ├── GAPlayerDetailModel.h
│ │ │ └── GAPlayerDetailModel.m
│ │ │ ├── View
│ │ │ ├── GAMemoryView.h
│ │ │ ├── GAMemoryView.m
│ │ │ ├── GAPlayerDetailBoomView.h
│ │ │ ├── GAPlayerDetailBoomView.m
│ │ │ ├── GAPlayerDetailTableView.h
│ │ │ ├── GAPlayerDetailTableView.m
│ │ │ ├── GAPlayerDetailTableViewCell.h
│ │ │ └── GAPlayerDetailTableViewCell.m
│ │ │ └── ViewModel
│ │ │ ├── GAPlayerDetailCellModel.h
│ │ │ ├── GAPlayerDetailCellModel.m
│ │ │ ├── GAPlayerDetailViewModel.h
│ │ │ └── GAPlayerDetailViewModel.m
│ ├── Cache
│ │ ├── CacheManager
│ │ │ ├── GACacheManager.h
│ │ │ └── GACacheManager.m
│ │ └── CacheModel
│ │ │ ├── GACacheModel.h
│ │ │ ├── GACacheModel.m
│ │ │ ├── GACacheModelTool.h
│ │ │ └── GACacheModelTool.m
│ ├── DataBase
│ │ ├── GADataBaseManager+GACacheModel.h
│ │ ├── GADataBaseManager+GACacheModel.m
│ │ ├── GADataBaseManager.h
│ │ ├── GADataBaseManager.m
│ │ ├── GAFMDBTool.h
│ │ └── GAFMDBTool.m
│ ├── Donwload
│ │ ├── DonwloadError
│ │ │ ├── DownloadError.h
│ │ │ └── DownloadError.m
│ │ ├── DonwloadTool
│ │ │ ├── DADownloadCommon.h
│ │ │ ├── DANetworkStateTool
│ │ │ │ ├── DANetworkStateTool.h
│ │ │ │ ├── DANetworkStateTool.m
│ │ │ │ ├── Reachability.h
│ │ │ │ └── Reachability.m
│ │ │ └── ResolveTool
│ │ │ │ ├── DADownloadUrlResolver.h
│ │ │ │ └── DADownloadUrlResolver.m
│ │ ├── DownloadHandle
│ │ │ ├── DADonwloadHandle.h
│ │ │ ├── DADonwloadHandle.m
│ │ │ └── DonwloadServiceProtocol.h
│ │ ├── DownloadManager
│ │ │ ├── GADownloadManager.h
│ │ │ └── GADownloadManager.m
│ │ ├── DownloadMemory
│ │ │ ├── DownloadMemory.h
│ │ │ ├── DownloadMemory.m
│ │ │ ├── MemoryModel.h
│ │ │ └── MemoryModel.m
│ │ ├── DownloadModel
│ │ │ ├── DADownloadItemModel.h
│ │ │ ├── DADownloadItemModel.m
│ │ │ ├── DADownloadModel.h
│ │ │ └── DADownloadModel.m
│ │ ├── DownloadSession
│ │ │ ├── DADownloadSession.h
│ │ │ └── DADownloadSession.m
│ │ ├── DownloadTask
│ │ │ ├── DADownloadItem.h
│ │ │ └── DADownloadItem.m
│ │ └── M3U8Tool
│ │ │ ├── HTML
│ │ │ ├── TFHpple.h
│ │ │ ├── TFHpple.m
│ │ │ ├── TFHppleElement.h
│ │ │ ├── TFHppleElement.m
│ │ │ ├── XPathQuery.h
│ │ │ └── XPathQuery.m
│ │ │ └── M3u8Parser
│ │ │ ├── M3U8Parser+String.h
│ │ │ ├── M3U8Parser+String.m
│ │ │ ├── M3U8Parser.h
│ │ │ ├── M3U8Parser.m
│ │ │ └── M3U8PlayerKey.h
│ ├── PlayView
│ │ ├── HttpSeverManager
│ │ │ ├── GAHttpSeverManager.h
│ │ │ └── GAHttpSeverManager.m
│ │ ├── Lib
│ │ │ ├── BackgroundMusic
│ │ │ │ ├── BackgroundRunner
│ │ │ │ │ ├── WCHBackgroundRunner.h
│ │ │ │ │ └── WCHBackgroundRunner.m
│ │ │ │ └── Resources
│ │ │ │ │ ├── mute.mp3
│ │ │ │ │ └── 林俊杰 - 她说.mp3
│ │ │ └── CocoaHTTPServer
│ │ │ │ ├── CocoaHTTPServer.podspec.json
│ │ │ │ ├── Core
│ │ │ │ ├── Categories
│ │ │ │ │ ├── DDData.h
│ │ │ │ │ ├── DDData.m
│ │ │ │ │ ├── DDNumber.h
│ │ │ │ │ ├── DDNumber.m
│ │ │ │ │ ├── DDRange.h
│ │ │ │ │ └── DDRange.m
│ │ │ │ ├── HTTPAuthenticationRequest.h
│ │ │ │ ├── HTTPAuthenticationRequest.m
│ │ │ │ ├── HTTPConnection.h
│ │ │ │ ├── HTTPConnection.m
│ │ │ │ ├── HTTPLogging.h
│ │ │ │ ├── HTTPMessage.h
│ │ │ │ ├── HTTPMessage.m
│ │ │ │ ├── HTTPResponse.h
│ │ │ │ ├── HTTPServer.h
│ │ │ │ ├── HTTPServer.m
│ │ │ │ ├── Mime
│ │ │ │ │ ├── MultipartFormDataParser.h
│ │ │ │ │ ├── MultipartFormDataParser.m
│ │ │ │ │ ├── MultipartMessageHeader.h
│ │ │ │ │ ├── MultipartMessageHeader.m
│ │ │ │ │ ├── MultipartMessageHeaderField.h
│ │ │ │ │ └── MultipartMessageHeaderField.m
│ │ │ │ ├── Responses
│ │ │ │ │ ├── HTTPAsyncFileResponse.h
│ │ │ │ │ ├── HTTPAsyncFileResponse.m
│ │ │ │ │ ├── HTTPDataResponse.h
│ │ │ │ │ ├── HTTPDataResponse.m
│ │ │ │ │ ├── HTTPDynamicFileResponse.h
│ │ │ │ │ ├── HTTPDynamicFileResponse.m
│ │ │ │ │ ├── HTTPErrorResponse.h
│ │ │ │ │ ├── HTTPErrorResponse.m
│ │ │ │ │ ├── HTTPFileResponse.h
│ │ │ │ │ ├── HTTPFileResponse.m
│ │ │ │ │ ├── HTTPRedirectResponse.h
│ │ │ │ │ └── HTTPRedirectResponse.m
│ │ │ │ ├── WebSocket.h
│ │ │ │ └── WebSocket.m
│ │ │ │ ├── Extensions
│ │ │ │ └── WebDAV
│ │ │ │ │ ├── DAVConnection.h
│ │ │ │ │ ├── DAVConnection.m
│ │ │ │ │ ├── DAVResponse.h
│ │ │ │ │ ├── DAVResponse.m
│ │ │ │ │ ├── DELETEResponse.h
│ │ │ │ │ ├── DELETEResponse.m
│ │ │ │ │ ├── PUTResponse.h
│ │ │ │ │ └── PUTResponse.m
│ │ │ │ ├── LICENSE.txt
│ │ │ │ ├── README.markdown
│ │ │ │ └── Vendor
│ │ │ │ ├── CocoaAsyncSocket
│ │ │ │ ├── About.txt
│ │ │ │ ├── GCDAsyncSocket.h
│ │ │ │ └── GCDAsyncSocket.m
│ │ │ │ └── CocoaLumberjack
│ │ │ │ ├── About.txt
│ │ │ │ ├── DDASLLogger.h
│ │ │ │ ├── DDASLLogger.m
│ │ │ │ ├── DDAbstractDatabaseLogger.h
│ │ │ │ ├── DDAbstractDatabaseLogger.m
│ │ │ │ ├── DDFileLogger.h
│ │ │ │ ├── DDFileLogger.m
│ │ │ │ ├── DDLog.h
│ │ │ │ ├── DDLog.m
│ │ │ │ ├── DDTTYLogger.h
│ │ │ │ ├── DDTTYLogger.m
│ │ │ │ └── Extensions
│ │ │ │ ├── ContextFilterLogFormatter.h
│ │ │ │ ├── ContextFilterLogFormatter.m
│ │ │ │ ├── DispatchQueueLogFormatter.h
│ │ │ │ ├── DispatchQueueLogFormatter.m
│ │ │ │ └── README.txt
│ │ ├── PlayControlBar
│ │ │ ├── CommonView
│ │ │ │ ├── CBAutoScrollLabel
│ │ │ │ │ ├── CBAutoScrollLabel.h
│ │ │ │ │ └── CBAutoScrollLabel.m
│ │ │ │ ├── SelectView
│ │ │ │ │ ├── GAPlayerSelectTableViewCell.h
│ │ │ │ │ ├── GAPlayerSelectTableViewCell.m
│ │ │ │ │ ├── GAPlayerSelectVIewModel.h
│ │ │ │ │ ├── GAPlayerSelectVIewModel.m
│ │ │ │ │ ├── GAPlayerSelectView.h
│ │ │ │ │ └── GAPlayerSelectView.m
│ │ │ │ └── SpeedAnimation
│ │ │ │ │ ├── BounceButton
│ │ │ │ │ ├── ASOBounceButtonView.h
│ │ │ │ │ ├── ASOBounceButtonView.m
│ │ │ │ │ └── ASOBounceButtonViewDelegate.h
│ │ │ │ │ └── TwoStateButton
│ │ │ │ │ ├── ASOTwoStateButton.h
│ │ │ │ │ └── ASOTwoStateButton.m
│ │ │ ├── PlayControlBar_Boom
│ │ │ │ ├── GAPlayControlBar_BoomView.h
│ │ │ │ └── GAPlayControlBar_BoomView.m
│ │ │ └── PlayControlBar_Top
│ │ │ │ ├── GAPlayControlBar_TopView.h
│ │ │ │ └── GAPlayControlBar_TopView.m
│ │ ├── Player
│ │ │ ├── AVPlayer
│ │ │ │ ├── GAAVPlayer.h
│ │ │ │ └── GAAVPlayer.m
│ │ │ ├── Handle
│ │ │ │ └── PlayerProtocol.h
│ │ │ ├── IJKPlayer
│ │ │ │ ├── GAIJKPlayer.h
│ │ │ │ └── GAIJKPlayer.m
│ │ │ └── Model
│ │ │ │ ├── GAPlayerModel.h
│ │ │ │ └── GAPlayerModel.m
│ │ └── PlayerView
│ │ │ ├── CommonView
│ │ │ ├── CMPlayerBrightnessView.h
│ │ │ ├── CMPlayerBrightnessView.m
│ │ │ ├── CMPlayerTimeView.h
│ │ │ ├── CMPlayerTimeView.m
│ │ │ ├── GALoadingView.h
│ │ │ ├── GALoadingView.m
│ │ │ ├── GAPlayerAdAlertView.h
│ │ │ └── GAPlayerAdAlertView.m
│ │ │ ├── GAPlayerItemModel.h
│ │ │ ├── GAPlayerItemModel.m
│ │ │ ├── GAPlayerView+GANetworkProcess.h
│ │ │ ├── GAPlayerView+GANetworkProcess.m
│ │ │ ├── GAPlayerView+GestureAction.h
│ │ │ ├── GAPlayerView+GestureAction.m
│ │ │ ├── GAPlayerView.h
│ │ │ ├── GAPlayerView.m
│ │ │ ├── GAPlayerViewModel.h
│ │ │ ├── GAPlayerViewModel.m
│ │ │ └── Tool
│ │ │ ├── GAPlayerTool.h
│ │ │ ├── GAPlayerTool.m
│ │ │ └── SomehowTheScreen
│ │ │ ├── UIView+SomehowTheScreen.h
│ │ │ └── UIView+SomehowTheScreen.m
│ └── Tool
│ │ ├── NSObject+GABackgroundMonitoring.h
│ │ ├── NSObject+GABackgroundMonitoring.m
│ │ ├── NetworkMonitoring
│ │ ├── CENetMonitorManger.h
│ │ └── CENetMonitorManger.m
│ │ └── PublicParamTool
│ │ ├── GAPublicParamTool.h
│ │ └── GAPublicParamTool.m
├── Framework
│ ├── AFNetworking
│ │ ├── AFHTTPRequestOperation.h
│ │ ├── AFHTTPRequestOperation.m
│ │ ├── AFHTTPRequestOperationManager.h
│ │ ├── AFHTTPRequestOperationManager.m
│ │ ├── AFHTTPSessionManager.h
│ │ ├── AFHTTPSessionManager.m
│ │ ├── AFNetworkReachabilityManager.h
│ │ ├── AFNetworkReachabilityManager.m
│ │ ├── AFNetworking.h
│ │ ├── AFSecurityPolicy.h
│ │ ├── AFSecurityPolicy.m
│ │ ├── AFURLConnectionOperation.h
│ │ ├── AFURLConnectionOperation.m
│ │ ├── AFURLRequestSerialization.h
│ │ ├── AFURLRequestSerialization.m
│ │ ├── AFURLResponseSerialization.h
│ │ ├── AFURLResponseSerialization.m
│ │ ├── AFURLSessionManager.h
│ │ └── AFURLSessionManager.m
│ ├── FBKVOController
│ │ ├── FBKVOController.h
│ │ ├── FBKVOController.m
│ │ ├── Info.plist
│ │ ├── KVOController.h
│ │ ├── NSObject+FBKVOController.h
│ │ └── NSObject+FBKVOController.m
│ ├── FMDB
│ │ ├── FMDB.h
│ │ ├── FMDatabase.h
│ │ ├── FMDatabase.m
│ │ ├── FMDatabaseAdditions.h
│ │ ├── FMDatabaseAdditions.m
│ │ ├── FMDatabasePool.h
│ │ ├── FMDatabasePool.m
│ │ ├── FMDatabaseQueue.h
│ │ ├── FMDatabaseQueue.m
│ │ ├── FMResultSet.h
│ │ └── FMResultSet.m
│ └── IJKMediaFramework.framework
│ │ ├── Headers
│ │ ├── IJKAVMoviePlayerController.h
│ │ ├── IJKFFMonitor.h
│ │ ├── IJKFFMoviePlayerController.h
│ │ ├── IJKFFOptions.h
│ │ ├── IJKKVOController.h
│ │ ├── IJKMPMoviePlayerController.h
│ │ ├── IJKMediaFramework.h
│ │ ├── IJKMediaModule.h
│ │ ├── IJKMediaPlayback.h
│ │ ├── IJKMediaPlayer.h
│ │ ├── IJKNotificationManager.h
│ │ └── IJKSDLGLViewProtocol.h
│ │ ├── IJKMediaFramework
│ │ ├── Info.plist
│ │ └── Modules
│ │ └── module.modulemap
├── Info.plist
├── PrefixHeader.pch
├── ViewController.h
├── ViewController.m
└── main.m
├── GAPlayerTests
├── GAPlayerTests.m
└── Info.plist
├── GAPlayerUITests
├── GAPlayerUITests.m
└── Info.plist
└── README.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | IJKMediaFramework filter=lfs diff=lfs merge=lfs -text
2 |
--------------------------------------------------------------------------------
/GAPlayer.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GAPlayer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GAPlayer.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildSystemType
6 | Original
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GAPlayer.xcodeproj/project.xcworkspace/xcuserdata/gongao.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer.xcodeproj/project.xcworkspace/xcuserdata/gongao.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/GAPlayer.xcodeproj/project.xcworkspace/xcuserdata/gongao.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildLocationStyle
6 | UseAppPreferences
7 | CustomBuildLocationType
8 | RelativeToDerivedData
9 | DerivedDataLocationStyle
10 | Default
11 | EnabledFullIndexStoreVisibility
12 |
13 | IssueFilterStyle
14 | ShowActiveSchemeOnly
15 | LiveSourceIssuesEnabled
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/GAPlayer.xcodeproj/xcuserdata/gongao.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | GAPlayer.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 | GAPlayer.xcscheme_^#shared#^_
13 |
14 | orderHint
15 | 0
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/GAPlayer/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/13.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/GAPlayer/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 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/HomeList/Apple.imageset/Apple.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/HomeList/Apple.imageset/Apple.jpg
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/HomeList/Apple.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "Apple.jpg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/HomeList/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/HomeList/Love.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "Love.jpeg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/HomeList/Love.imageset/Love.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/HomeList/Love.imageset/Love.jpeg
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/HomeList/Sad.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "Sad.jpeg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/HomeList/Sad.imageset/Sad.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/HomeList/Sad.imageset/Sad.jpeg
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/HomeList/Sunshine.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "Sunshine.jpeg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/HomeList/Sunshine.imageset/Sunshine.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/HomeList/Sunshine.imageset/Sunshine.jpeg
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/btn_continue_play.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn_continue_play@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn_continue_play@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/btn_continue_play.imageset/btn_continue_play@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/btn_continue_play.imageset/btn_continue_play@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/btn_continue_play.imageset/btn_continue_play@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/btn_continue_play.imageset/btn_continue_play@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_audio_nal.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn_fplay_audio_nal@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn_fplay_audio_nal@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_audio_nal.imageset/btn_fplay_audio_nal@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_audio_nal.imageset/btn_fplay_audio_nal@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_audio_nal.imageset/btn_fplay_audio_nal@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_audio_nal.imageset/btn_fplay_audio_nal@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_audio_sel.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn_fplay_audio_sel@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn_fplay_audio_sel@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_audio_sel.imageset/btn_fplay_audio_sel@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_audio_sel.imageset/btn_fplay_audio_sel@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_audio_sel.imageset/btn_fplay_audio_sel@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_audio_sel.imageset/btn_fplay_audio_sel@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_collect_nal.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn_fplay_collect_nal@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn_fplay_collect_nal@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_collect_nal.imageset/btn_fplay_collect_nal@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_collect_nal.imageset/btn_fplay_collect_nal@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_collect_nal.imageset/btn_fplay_collect_nal@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_collect_nal.imageset/btn_fplay_collect_nal@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_collect_sel.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn_fplay_collect_sel@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn_fplay_collect_sel@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_collect_sel.imageset/btn_fplay_collect_sel@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_collect_sel.imageset/btn_fplay_collect_sel@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_collect_sel.imageset/btn_fplay_collect_sel@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_collect_sel.imageset/btn_fplay_collect_sel@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_download.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn_fplay_download@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn_fplay_download@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_download.imageset/btn_fplay_download@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_download.imageset/btn_fplay_download@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_download.imageset/btn_fplay_download@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_download.imageset/btn_fplay_download@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_lock.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn_fplay_lock@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn_fplay_lock@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_lock.imageset/btn_fplay_lock@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_lock.imageset/btn_fplay_lock@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_lock.imageset/btn_fplay_lock@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_lock.imageset/btn_fplay_lock@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_menu.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn_fplay_menu@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn_fplay_menu@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_menu.imageset/btn_fplay_menu@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_menu.imageset/btn_fplay_menu@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_menu.imageset/btn_fplay_menu@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_menu.imageset/btn_fplay_menu@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_next.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn_fplay_next@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn_fplay_next@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_next.imageset/btn_fplay_next@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_next.imageset/btn_fplay_next@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_next.imageset/btn_fplay_next@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_next.imageset/btn_fplay_next@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_pause.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn_fplay_pause@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn_fplay_pause@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_pause.imageset/btn_fplay_pause@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_pause.imageset/btn_fplay_pause@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_pause.imageset/btn_fplay_pause@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_pause.imageset/btn_fplay_pause@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_play.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn_fplay_play@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn_fplay_play@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_play.imageset/btn_fplay_play@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_play.imageset/btn_fplay_play@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_play.imageset/btn_fplay_play@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_play.imageset/btn_fplay_play@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_unlock.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn_fplay_unlock@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn_fplay_unlock@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_unlock.imageset/btn_fplay_unlock@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_unlock.imageset/btn_fplay_unlock@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplay_unlock.imageset/btn_fplay_unlock@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplay_unlock.imageset/btn_fplay_unlock@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplaynav_back.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn_fplaynav_back@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn_fplaynav_back@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplaynav_back.imageset/btn_fplaynav_back@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplaynav_back.imageset/btn_fplaynav_back@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_fplaynav_back.imageset/btn_fplaynav_back@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_fplaynav_back.imageset/btn_fplaynav_back@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_splay_download.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn_splay_download@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn_splay_download@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_splay_download.imageset/btn_splay_download@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_splay_download.imageset/btn_splay_download@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_splay_download.imageset/btn_splay_download@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_splay_download.imageset/btn_splay_download@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_splay_fscreen.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn_splay_fscreen@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn_splay_fscreen@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_splay_fscreen.imageset/btn_splay_fscreen@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_splay_fscreen.imageset/btn_splay_fscreen@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_btn_splay_fscreen.imageset/btn_splay_fscreen@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_btn_splay_fscreen.imageset/btn_splay_fscreen@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_ico_play_brightness.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "ico_play_brightness.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_ico_play_brightness.imageset/ico_play_brightness.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_ico_play_brightness.imageset/ico_play_brightness.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_img_fplay_bg_down.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "img_play_bg_down@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "img_play_bg_down@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_img_fplay_bg_down.imageset/img_play_bg_down@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_img_fplay_bg_down.imageset/img_play_bg_down@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_img_fplay_bg_down.imageset/img_play_bg_down@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_img_fplay_bg_down.imageset/img_play_bg_down@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_img_fplay_bg_up.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "img_play_bg_up@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "img_play_bg_up@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_img_fplay_bg_up.imageset/img_play_bg_up@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_img_fplay_bg_up.imageset/img_play_bg_up@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_img_fplay_bg_up.imageset/img_play_bg_up@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_img_fplay_bg_up.imageset/img_play_bg_up@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_ion_play_position.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "ion_play_position@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "ion_play_position@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_ion_play_position.imageset/ion_play_position@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_ion_play_position.imageset/ion_play_position@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/player_ion_play_position.imageset/ion_play_position@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/player_ion_play_position.imageset/ion_play_position@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/video_refresh.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "video_refresh@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/video_refresh.imageset/video_refresh@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/video_refresh.imageset/video_refresh@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/video_refresh_again.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn_error_retry@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn_error_retry@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/video_refresh_again.imageset/btn_error_retry@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/video_refresh_again.imageset/btn_error_retry@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/Player/video_refresh_again.imageset/btn_error_retry@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/Player/video_refresh_again.imageset/btn_error_retry@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/course_pause_highlighted.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "course_pause_highlighted@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/course_pause_highlighted.imageset/course_pause_highlighted@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/course_pause_highlighted.imageset/course_pause_highlighted@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/course_pause_normal.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "course_pause_normal@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/course_pause_normal.imageset/course_pause_normal@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/course_pause_normal.imageset/course_pause_normal@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/course_play_highlighted.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "course_play_highlighted@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/course_play_highlighted.imageset/course_play_highlighted@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/course_play_highlighted.imageset/course_play_highlighted@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/course_play_normal.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "course_play_normal@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/course_play_normal.imageset/course_play_normal@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/course_play_normal.imageset/course_play_normal@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/downloadLoading_state_highlighted.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "downloadLoading_state_highlighted@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/downloadLoading_state_highlighted.imageset/downloadLoading_state_highlighted@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/downloadLoading_state_highlighted.imageset/downloadLoading_state_highlighted@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/downloadLoading_state_normal.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "downloadLoading_state_normal@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/downloadLoading_state_normal.imageset/downloadLoading_state_normal@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/downloadLoading_state_normal.imageset/downloadLoading_state_normal@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_fail_highlighted.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "download_fail_highlighted@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_fail_highlighted.imageset/download_fail_highlighted@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/download_fail_highlighted.imageset/download_fail_highlighted@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_fail_normal.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "download_fail_normal@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_fail_normal.imageset/download_fail_normal@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/download_fail_normal.imageset/download_fail_normal@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_none_highlighted.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "download_none_highlighted@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_none_highlighted.imageset/download_none_highlighted@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/download_none_highlighted.imageset/download_none_highlighted@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_none_normal.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "download_none_normal@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_none_normal.imageset/download_none_normal@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/download_none_normal.imageset/download_none_normal@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_pause_highlighted.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "download_pause_highlighted@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_pause_highlighted.imageset/download_pause_highlighted@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/download_pause_highlighted.imageset/download_pause_highlighted@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_pause_normal.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "download_pause_normal@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_pause_normal.imageset/download_pause_normal@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/download_pause_normal.imageset/download_pause_normal@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_success_highlighted.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "download_success_highlighted@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_success_highlighted.imageset/download_success_highlighted@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/download_success_highlighted.imageset/download_success_highlighted@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_success_normal.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "download_success_normal@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_success_normal.imageset/download_success_normal@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/download_success_normal.imageset/download_success_normal@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_wait_highlighted.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "download_wait_highlighted@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_wait_highlighted.imageset/download_wait_highlighted@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/download_wait_highlighted.imageset/download_wait_highlighted@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_wait_normal.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "download_wait_normal@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 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/download_wait_normal.imageset/download_wait_normal@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/download_wait_normal.imageset/download_wait_normal@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/ico_downloaded.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "ico_downloaded@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "ico_downloaded@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/ico_downloaded.imageset/ico_downloaded@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/ico_downloaded.imageset/ico_downloaded@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/ico_downloaded.imageset/ico_downloaded@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/ico_downloaded.imageset/ico_downloaded@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/ico_downloading.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "ico_downloading@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "ico_downloading@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/ico_downloading.imageset/ico_downloading@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/ico_downloading.imageset/ico_downloading@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/ico_downloading.imageset/ico_downloading@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/ico_downloading.imageset/ico_downloading@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/ico_playlist_nor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "ico_playlist_nor@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "ico_playlist_nor@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/ico_playlist_nor.imageset/ico_playlist_nor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/ico_playlist_nor.imageset/ico_playlist_nor@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/ico_playlist_nor.imageset/ico_playlist_nor@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/ico_playlist_nor.imageset/ico_playlist_nor@3x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/ico_playlist_sel.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "ico_playlist_sel@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "ico_playlist_sel@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/ico_playlist_sel.imageset/ico_playlist_sel@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/ico_playlist_sel.imageset/ico_playlist_sel@2x.png
--------------------------------------------------------------------------------
/GAPlayer/Assets.xcassets/PlayerDetail/ico_playlist_sel.imageset/ico_playlist_sel@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Assets.xcassets/PlayerDetail/ico_playlist_sel.imageset/ico_playlist_sel@3x.png
--------------------------------------------------------------------------------
/GAPlayer/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 |
--------------------------------------------------------------------------------
/GAPlayer/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 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/DownloadList/Model/GADownloadListModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // GADownloadListModel.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/21.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface GADownloadListModel : NSObject
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/DownloadList/Model/GADownloadListModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // GADownloadListModel.m
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/21.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GADownloadListModel.h"
10 |
11 | @implementation GADownloadListModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/DownloadList/ViewController/GADownloadListViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // GADownloadListViewController.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/21.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface GADownloadListViewController : UIViewController
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/DownloadList/ViewController/GADownloadListViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // GADownloadListViewController.m
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/21.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GADownloadListViewController.h"
10 |
11 | @interface GADownloadListViewController ()
12 |
13 | @end
14 |
15 | @implementation GADownloadListViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view.
20 | }
21 |
22 |
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/HomeList/GAHomeListModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAHomeListModel.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/17.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GAHomeListModel : NSObject
12 |
13 | @property (nonatomic, copy) NSString *videoId;
14 |
15 | @property (nonatomic, copy) NSString *videoName;
16 |
17 | @property (nonatomic, copy) NSString *videoUrl;
18 |
19 | @property (nonatomic, copy) NSString *videoImage;
20 |
21 | @property (nonatomic, copy) NSString *videoDescribe;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/HomeList/GAHomeListModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // GAHomeListModel.m
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/17.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GAHomeListModel.h"
10 |
11 | @implementation GAHomeListModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/HomeList/GAHomeListTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAHomeListTableViewCell.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/21.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface GAHomeListTableViewCell : UITableViewCell
14 |
15 | @property (nonatomic, assign) BOOL isHideLine;
16 |
17 | + (GAHomeListTableViewCell *)cellWithTableView:(UITableView *)tableView;
18 |
19 | - (void)setObject:(id)object;
20 |
21 | @end
22 |
23 | NS_ASSUME_NONNULL_END
24 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/HomeList/GAHomeListViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAHomeListViewController.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/17.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GAHomeListViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/PlayerDetail/GAPlayerDetailViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerDetailViewController.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/17.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GAHomeListModel.h"
11 |
12 | @interface GAPlayerDetailViewController : UIViewController
13 |
14 | @property (nonatomic, strong) GAHomeListModel *listModel;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/PlayerDetail/Model/GAPlayerDetailModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerDetailModel.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/21.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface GAPlayerDetailModel : NSObject
15 |
16 | /**
17 | * 单链表 指向下一个播放model
18 | */
19 | @property (nonatomic, strong) GAPlayerDetailModel *nextDetailModel;
20 |
21 | /**
22 | * 视频id
23 | */
24 | @property (nonatomic, copy) NSString *videoId;
25 |
26 | /**
27 | * 视频名称
28 | */
29 | @property (nonatomic, copy) NSString *videoName;
30 |
31 | /**
32 | * 在线视频播放地址
33 | */
34 | @property (nonatomic, copy) NSString *videoUrl;
35 |
36 | /**
37 | * 本地视频储存地址
38 | */
39 | @property (nonatomic, copy) NSString *filePath;
40 |
41 | /**
42 | * 下载状态
43 | */
44 | @property (nonatomic, assign) NSInteger downloadState;
45 |
46 | /**
47 | * 下载百分比
48 | */
49 | @property (nonatomic, assign) CGFloat percentage;
50 |
51 | /**
52 | * 下载速度
53 | */
54 | @property (nonatomic, copy) NSString *speed;
55 |
56 | @property (nonatomic, assign) BOOL isActive;
57 |
58 | @end
59 |
60 | NS_ASSUME_NONNULL_END
61 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/PlayerDetail/Model/GAPlayerDetailModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerDetailModel.m
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/21.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GAPlayerDetailModel.h"
10 |
11 | @implementation GAPlayerDetailModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/PlayerDetail/View/GAMemoryView.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAMemoryView.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/23.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface GAMemoryView : UIView
14 |
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/PlayerDetail/View/GAMemoryView.m:
--------------------------------------------------------------------------------
1 | //
2 | // GAMemoryView.m
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/23.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GAMemoryView.h"
10 |
11 | @interface GAMemoryView ()
12 |
13 | @property (nonatomic, strong) UILabel *memoryLabel;
14 |
15 | @property (nonatomic, strong) UIView *memoryBackgroundView;
16 |
17 | @property (nonatomic, strong) UIView *memoryForegroundView;
18 |
19 | @end
20 |
21 | @implementation GAMemoryView
22 |
23 | - (void)setFrame:(CGRect)frame {
24 | [super setFrame:frame];
25 | [self setUpView];
26 | [self setUpLayout];
27 | }
28 |
29 | - (void)setUpView {
30 | [self addSubview:self.memoryBackgroundView];
31 | [self addSubview:self.memoryForegroundView];
32 | [self addSubview:self.memoryLabel];
33 | }
34 |
35 | - (void)setObject:(id)object {
36 |
37 | }
38 |
39 | - (void)setUpLayout {
40 | CGFloat kWidth = ScreenWidth;
41 | CGFloat kHigh = 30;
42 | CGFloat kDistance = 40;
43 |
44 | self.memoryBackgroundView.frame = CGRectMake(0, 0, kWidth, kHigh);
45 | // self.memoryForegroundView.frame = CGRectMake(0, 0, kWidth * self.cacheMemoryViewModel.proportion, kHigh);
46 | self.memoryLabel.frame = CGRectMake(kDistance, 0, kWidth - kDistance, kHigh);
47 | }
48 |
49 | - (UILabel *)memoryLabel {
50 | if (!_memoryLabel) {
51 | _memoryLabel = [[UILabel alloc] init];
52 | }
53 | return _memoryLabel;
54 | }
55 |
56 | - (UIView *)memoryForegroundView {
57 | if (!_memoryForegroundView) {
58 | _memoryForegroundView = [[UIView alloc] init];
59 | _memoryForegroundView.backgroundColor = [UIColor blueColor];
60 | _memoryLabel.font = [UIFont systemFontOfSize:8];
61 | }
62 | return _memoryForegroundView;
63 | }
64 |
65 | - (UIView *)memoryBackgroundView {
66 | if (!_memoryBackgroundView) {
67 | _memoryBackgroundView = [[UIView alloc] init];
68 | _memoryBackgroundView.backgroundColor = [UIColor grayColor];
69 | }
70 | return _memoryBackgroundView;
71 | }
72 |
73 | @end
74 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/PlayerDetail/View/GAPlayerDetailBoomView.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerDetailBoomView.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/30.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface GAPlayerDetailBoomView : UIView
14 |
15 | @property (nonatomic, assign) NSInteger finishCount;
16 |
17 | @property (nonatomic, assign) NSInteger unFinishCount;
18 |
19 | @end
20 |
21 | NS_ASSUME_NONNULL_END
22 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/PlayerDetail/View/GAPlayerDetailBoomView.m:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerDetailBoomView.m
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/30.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GAPlayerDetailBoomView.h"
10 |
11 | @interface GAPlayerDetailBoomView ()
12 |
13 | @property (nonatomic, strong) UILabel *finishLabel;
14 |
15 | @property (nonatomic, strong) UILabel *unFinishLabel;
16 |
17 | @end
18 |
19 | @implementation GAPlayerDetailBoomView
20 |
21 | - (instancetype)init {
22 | if (self = [super init]) {
23 | [self setupViews];
24 | [self setupLayouts];
25 | }
26 | return self;
27 | }
28 |
29 | - (void)setupViews {
30 | [self addSubview:self.finishLabel];
31 | [self addSubview:self.unFinishLabel];
32 | }
33 |
34 | - (void)setupLayouts {
35 | self.finishLabel.frame = CGRectMake(0, 0, ScreenWidth * 0.5, 44);
36 | self.unFinishLabel.frame = CGRectMake(CGRectGetMaxX(self.finishLabel.frame) + 1, 0, ScreenWidth * 0.5 - 1, 44);
37 | }
38 |
39 | - (void)setFinishCount:(NSInteger)finishCount {
40 | _finishCount = finishCount;
41 | self.finishLabel.text = [NSString stringWithFormat:@"已完成:%ld",finishCount];
42 | }
43 |
44 | - (void)setUnFinishCount:(NSInteger)unFinishCount {
45 | _unFinishCount = unFinishCount;
46 | self.unFinishLabel.text = [NSString stringWithFormat:@"未完成:%ld",unFinishCount];
47 | }
48 |
49 | - (UILabel *)finishLabel {
50 | if (!_finishLabel) {
51 | _finishLabel = [[UILabel alloc] init];
52 | _finishLabel.textColor = kMyColor(253, 141, 63);
53 | _finishLabel.font = [UIFont systemFontOfSize:15];
54 | _finishLabel.textAlignment = 1;
55 | }
56 | return _finishLabel;
57 | }
58 |
59 | - (UILabel *)unFinishLabel {
60 | if (!_unFinishLabel) {
61 | _unFinishLabel = [[UILabel alloc] init];
62 | _unFinishLabel.textColor = kMyColor(253, 141, 63);
63 | _unFinishLabel.font = [UIFont systemFontOfSize:15];
64 | _unFinishLabel.textAlignment = 1;
65 | }
66 | return _unFinishLabel;
67 | }
68 |
69 | @end
70 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/PlayerDetail/View/GAPlayerDetailTableView.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerDetailTableView.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/21.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /**
14 | * TableView的控件选中类型
15 | */
16 | typedef NS_ENUM(NSUInteger, PlayerDetailActionType) {
17 | /** 切换播放状态 */
18 | kPDActionTypeChangeState = 0,
19 | /** 切换播放源 */
20 | kPDActionTypeChangeSource,
21 | /** 下载 */
22 | kPDActionTypeDonwload
23 | };
24 |
25 | @class GAPlayerDetailModel;
26 |
27 | typedef void(^PlayerDetailTableViewActionBlock)(GAPlayerDetailModel *detailModel, PlayerDetailActionType actionType);
28 |
29 | @interface GAPlayerDetailTableView : UIView
30 |
31 | @property (nonatomic, copy) PlayerDetailTableViewActionBlock actionBlock;
32 |
33 | - (void)setObject:(id)object;
34 |
35 | /**
36 | * 切换视频 将UI进行处理
37 | */
38 | - (void)changLectureWith:(GAPlayerDetailModel *)detailModel isPlay:(BOOL)isPlay;
39 |
40 | @end
41 |
42 | NS_ASSUME_NONNULL_END
43 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/PlayerDetail/View/GAPlayerDetailTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerDetailTableViewCell.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/21.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface GAPlayerDetailTableViewCell : UITableViewCell
14 |
15 | @property (nonatomic, assign) BOOL isHideLine;
16 |
17 | + (GAPlayerDetailTableViewCell *)cellWithTableView:(UITableView *)tableView;
18 |
19 | - (void)setObject:(id)object;
20 |
21 | @end
22 |
23 | NS_ASSUME_NONNULL_END
24 |
--------------------------------------------------------------------------------
/GAPlayer/Class/BussinessVC/PlayerDetail/ViewModel/GAPlayerDetailViewModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerDetailViewModel.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/21.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | @class GAPlayerDetailModel;
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | typedef void(^PlayerDetailFinishCountBlock)(NSInteger finishCount, NSInteger unFinishCount);
15 |
16 | @interface GAPlayerDetailViewModel : NSObject
17 |
18 | /**
19 | * 拉取详情数据
20 | */
21 | - (void)requestPlayerDetailData:(NSDictionary *)dict successBlock:(void (^)(BOOL success, id object))successBlock;
22 |
23 | /**
24 | * 将指定进行下载
25 | */
26 | - (void)downloadTaskWith:(GAPlayerDetailModel *)detailModel;
27 |
28 | /**
29 | * 通过videoId获取GAPlayerDetailModel
30 | */
31 | - (GAPlayerDetailModel *)getPlayerDetailModelWith:(NSString *)videoId;
32 |
33 | /**
34 | * 获取播放视频需要的播放字典
35 | */
36 | - (NSDictionary *)makeProgressPlayData:(GAPlayerDetailModel *)detailModel;
37 |
38 | /**
39 | * 拉取下载和未下载的数据
40 | */
41 | - (void)requestUnFinishAndFinishData:(NSDictionary *)dict successBlock:(PlayerDetailFinishCountBlock)successBlock;
42 |
43 | @end
44 |
45 | NS_ASSUME_NONNULL_END
46 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Cache/CacheManager/GACacheManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // GACacheManager.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/17.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class GACacheModel;
12 |
13 | //声明类型SDCallbacksDictionary key=NSString,value=id
14 | typedef NSMutableDictionary DACallbacksDictionary;
15 | typedef void(^DAProgressCallBlock)(NSString *downloadId, NSString *progress, int64_t speed);
16 | typedef void(^DADownloadStateCallBlock)(NSString *downloadId, NSInteger downloadState);
17 | typedef void(^DAFinishCallBlock)(NSString *downloadId, BOOL success, NSError *error);
18 |
19 | @interface GACacheManager : NSObject
20 |
21 | + (instancetype)sharedInstance;
22 |
23 | /**
24 | 绑定下载回调
25 |
26 | @param progressBlock 返回下载进度和下载id
27 | @param finishBlock 下载成功 / 下载失败返回 失败原因
28 | */
29 | - (void)addProgressBlock:(DAProgressCallBlock)progressBlock
30 | downloadStateBlock:(DADownloadStateCallBlock)downloadStateBlock
31 | finishBlock:(DAFinishCallBlock)finishBlock
32 | idClass:(NSString *)idClass;
33 |
34 | /**
35 | * 解除绑定的回调
36 | */
37 | - (void)removeDonwloadBlcokWithIdClass:(NSString *)idClass;
38 |
39 | /**
40 | * 加入下载
41 | */
42 | - (void)addDownloadWith:(NSDictionary *)downloadDict callBlock:(void (^)(BOOL success, id object))callBlock;
43 |
44 | /**
45 | * 下载操作
46 | */
47 | - (void)downloadIsControlledAccordingToVideoId:(NSString *)videoId callBlock:(void (^)(BOOL success, id object))callBlock;
48 |
49 | /**
50 | * 检测数据库是否有未完成的下载任务
51 | */
52 | - (void)queryingTheDatabaseUnfinishedDownloadTaskCallBlock:(void (^)(BOOL success))callBlock;
53 |
54 | /**
55 | * 全部暂停
56 | */
57 | - (void)allSuspended;
58 |
59 | /**
60 | * 全部下载 当前任务列表所有的任务
61 | */
62 | - (void)allStart;
63 |
64 | @end
65 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Cache/CacheModel/GACacheModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // GACacheModel.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/17.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DADownloadCommon.h"
11 |
12 | @interface GACacheModel : NSObject
13 |
14 | /**
15 | * 视频的Id
16 | */
17 | @property (nonatomic, copy) NSString *videoId;
18 |
19 | /**
20 | * 下载的百分比
21 | */
22 | @property (nonatomic, copy) NSString *percent;
23 |
24 | /**
25 | * 本次回调写入沙盒的大小
26 | */
27 | @property (nonatomic, assign) int64_t bytesWritten;
28 |
29 | /**
30 | * 文件路径
31 | */
32 | @property (nonatomic, copy) NSString *filePath;
33 |
34 | /**
35 | * 视频名称
36 | */
37 | @property (nonatomic, copy) NSString *videoName;
38 |
39 | /**
40 | * 视频地址
41 | */
42 | @property (nonatomic, copy) NSString *videoUrl;
43 |
44 | /**
45 | * 下载状态
46 | */
47 | @property (nonatomic, assign) DADownloadState downloadState;
48 |
49 | /**
50 | * 数据库数据 记录GACacheModel 对应的字典数据 因数据库会频繁操作,所以记录下来防止多次转化
51 | */
52 | @property (nonatomic, copy) NSDictionary *tmpDataBaseDict;
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Cache/CacheModel/GACacheModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // GACacheModel.m
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/17.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GACacheModel.h"
10 |
11 | @implementation GACacheModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Cache/CacheModel/GACacheModelTool.h:
--------------------------------------------------------------------------------
1 | //
2 | // GACacheModelTool.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/17.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GACacheModel.h"
11 |
12 | @interface GACacheModelTool : NSObject
13 |
14 | + (void)makeProgressCacheModelWith:(NSDictionary *)dict callBlock:(void (^)(BOOL success, id object))callBlock;
15 |
16 | + (NSDictionary *)makeProgressDataBaseDictWith:(GACacheModel *)cacheModel;
17 |
18 | + (NSString *)makeProgressDownloadStateStringWith:(DADownloadState)downloadState;
19 |
20 | + (NSArray *)getCacheModelListWithDatabaseDictList:(NSArray *)dictList;
21 |
22 | + (GACacheModel *)getCacheModelWithDatabaseDict:(NSDictionary *)databaseDict;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/GAPlayer/Class/DataBase/GADataBaseManager+GACacheModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // GADataBaseManager+GACacheModel.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2019/3/8.
6 | // Copyright © 2019年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GADataBaseManager.h"
10 | #import "GACacheModel.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface GADataBaseManager (GACacheModel)
15 |
16 | /**
17 | * 查询任务数据
18 | */
19 | - (void)queryCacheTaskData:(NSDictionary *)dict resultBlock:(void (^)(BOOL success, GACacheModel *cacheModel))resultBlock;
20 |
21 | /**
22 | * 查询未完成的下载的任务
23 | */
24 | - (void)queryCacheTheUnfinishedDownloadDataWithResultBlock:(void (^)(BOOL success, NSArray *cacheList))resultBlock;
25 |
26 | /**
27 | * 查询已完成的下载的任务
28 | */
29 | - (NSArray *)queryCacheTheFinishedDownloadData;
30 |
31 | /**
32 | * 插入任务数据
33 | */
34 | - (void)insertCacheTaskData:(GACacheModel *)cacheModel resultBlock:(void (^)(BOOL success, id object))resultBlock;
35 |
36 | /**
37 | * 删除任务数据
38 | */
39 | - (void)removeCacheTaskData:(GACacheModel *)cacheModel resultBlock:(void (^)(BOOL success, id object))resultBlock;
40 |
41 | /**
42 | * 修改任务数据
43 | */
44 | - (void)modifyCacheTaskData:(GACacheModel *)cacheModel resultBlock:(void (^)(BOOL success, id object))resultBlock;
45 |
46 |
47 |
48 | @end
49 |
50 | NS_ASSUME_NONNULL_END
51 |
--------------------------------------------------------------------------------
/GAPlayer/Class/DataBase/GADataBaseManager+GACacheModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // GADataBaseManager+GACacheModel.m
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2019/3/8.
6 | // Copyright © 2019年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GADataBaseManager+GACacheModel.h"
10 | #import "GACacheModelTool.h"
11 |
12 | @implementation GADataBaseManager (GACacheModel)
13 |
14 | /**
15 | * 查询任务数据
16 | */
17 | - (void)queryCacheTaskData:(NSDictionary *)dict resultBlock:(void (^)(BOOL success, GACacheModel *cacheModel))resultBlock {
18 | [self queryTaskData:dict resultBlock:^(BOOL success, id object) {
19 | if (success) {
20 | resultBlock(YES, [GACacheModelTool getCacheModelWithDatabaseDict:object]);
21 | } else {
22 | resultBlock(success, object);
23 | }
24 | }];
25 | }
26 |
27 | /**
28 | * 查询未完成的下载的任务
29 | */
30 | - (void)queryCacheTheUnfinishedDownloadDataWithResultBlock:(void (^)(BOOL success, NSArray *cacheList))resultBlock {
31 | [self queryTheUnfinishedDownloadDataWithResultBlock:^(BOOL success, id object) {
32 | if (success) {
33 | resultBlock(YES, [GACacheModelTool getCacheModelListWithDatabaseDictList:object]);
34 | } else {
35 | resultBlock(success, object);
36 | }
37 | }];
38 | }
39 |
40 | /**
41 | * 查询已完成的下载的任务
42 | */
43 | - (NSArray *)queryCacheTheFinishedDownloadData {
44 | return [self queryTheFinishedDownloadData];
45 | }
46 |
47 | /**
48 | * 插入任务数据
49 | */
50 | - (void)insertCacheTaskData:(GACacheModel *)cacheModel resultBlock:(void (^)(BOOL success, id object))resultBlock {
51 | NSDictionary *dict = [GACacheModelTool makeProgressDataBaseDictWith:cacheModel];
52 | [self insertTaskData:dict resultBlock:resultBlock];
53 | }
54 |
55 | /**
56 | * 删除任务数据
57 | */
58 | - (void)removeCacheTaskData:(GACacheModel *)cacheModel resultBlock:(void (^)(BOOL success, id object))resultBlock {
59 | NSDictionary *dict = [GACacheModelTool makeProgressDataBaseDictWith:cacheModel];
60 | [self removeTaskData:dict resultBlock:resultBlock];
61 | }
62 |
63 | /**
64 | * 修改任务数据
65 | */
66 | - (void)modifyCacheTaskData:(GACacheModel *)cacheModel resultBlock:(void (^)(BOOL success, id object))resultBlock {
67 | NSDictionary *dict = [GACacheModelTool makeProgressDataBaseDictWith:cacheModel];
68 | [self modifyTaskData:dict resultBlock:resultBlock];
69 | }
70 |
71 | @end
72 |
--------------------------------------------------------------------------------
/GAPlayer/Class/DataBase/GADataBaseManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // GADataBaseManager.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/17.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GADataBaseManager : NSObject
12 |
13 | + (instancetype)sharedInstance;
14 |
15 | /**
16 | * 查询任务数据
17 | */
18 | - (void)queryTaskData:(NSDictionary *)dict resultBlock:(void (^)(BOOL success, id object))resultBlock;
19 |
20 | /**
21 | * 查询未完成的下载的任务
22 | */
23 | - (void)queryTheUnfinishedDownloadDataWithResultBlock:(void (^)(BOOL success, id object))resultBlock;
24 |
25 | /**
26 | * 查询已完成的下载的任务
27 | */
28 | - (NSArray *)queryTheFinishedDownloadData;
29 |
30 | /**
31 | * 插入任务数据
32 | */
33 | - (void)insertTaskData:(NSDictionary *)dict resultBlock:(void (^)(BOOL success, id object))resultBlock;
34 |
35 | /**
36 | * 删除任务数据
37 | */
38 | - (void)removeTaskData:(NSDictionary *)dict resultBlock:(void (^)(BOOL success, id object))resultBlock;
39 |
40 | /**
41 | * 修改任务数据
42 | */
43 | - (void)modifyTaskData:(NSDictionary *)dict resultBlock:(void (^)(BOOL success, id object))resultBlock;
44 |
45 |
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/GAPlayer/Class/DataBase/GAFMDBTool.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAFMDBTool.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/20.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GAFMDBTool : NSObject
12 |
13 | - (void)createTableWithSQLString:(NSString *)sqlString;
14 |
15 | - (BOOL)insetTaskDataWithString:(NSString *)sqlString;
16 |
17 | - (NSArray *)queryTaskDataWithString:(NSString *)sqlString;
18 |
19 | - (BOOL)deleteTaskDataWithString:(NSString *)sqlString;
20 |
21 | - (BOOL)modifyTaskDataWithString:(NSString *)sqlString;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/GAPlayer/Class/DataBase/GAFMDBTool.m:
--------------------------------------------------------------------------------
1 | //
2 | // GAFMDBTool.m
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/20.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GAFMDBTool.h"
10 | #import "FMDB.h"
11 |
12 | #define Player_NAME @"GAPlayer.sqlite"
13 |
14 | @interface GAFMDBTool()
15 |
16 | @property (nonatomic, strong) FMDatabase *database;
17 |
18 | @end
19 |
20 | @implementation GAFMDBTool
21 |
22 | - (instancetype)init {
23 | if (self = [super init]) {
24 | [self initFMDatabase];
25 | }
26 | return self;
27 | }
28 |
29 | - (void)initFMDatabase {
30 | NSString *doc =[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES) lastObject];
31 | NSString *fileName = [doc stringByAppendingPathComponent:Player_NAME];
32 | self.database = [FMDatabase databaseWithPath:fileName];
33 | [self.database open];
34 | }
35 |
36 | - (void)createTableWithSQLString:(NSString *)sqlString {
37 | [self.database executeUpdate:sqlString];
38 | }
39 |
40 | - (BOOL)insetTaskDataWithString:(NSString *)sqlString {
41 | return [self.database executeUpdate:sqlString];
42 | }
43 |
44 | - (NSArray *)queryTaskDataWithString:(NSString *)sqlString {
45 | NSMutableArray *arrM = [NSMutableArray array];
46 | FMResultSet *set = [self.database executeQuery:sqlString];
47 | while ([set next]) {
48 | [arrM addObject:set.resultDictionary];
49 | }
50 | return arrM;
51 | }
52 |
53 | - (BOOL)deleteTaskDataWithString:(NSString *)sqlString {
54 | return [self.database executeUpdate:sqlString];
55 | }
56 |
57 | - (BOOL)modifyTaskDataWithString:(NSString *)sqlString {
58 | return [self.database executeUpdate:sqlString];
59 | }
60 |
61 |
62 | @end
63 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DonwloadError/DownloadError.h:
--------------------------------------------------------------------------------
1 | //
2 | // DownloadError.h
3 | // DownloadFramework
4 | //
5 | // Created by 宫傲 on 2018/6/12.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DADownloadCommon.h"
11 |
12 | @interface DownloadError : NSObject
13 |
14 | @property (nonatomic, strong) NSError *systemError;
15 |
16 | @property (nonatomic, copy) NSString *customeReason;
17 |
18 | @property (nonatomic, assign) DADownloadFinishCode finishCode;
19 |
20 | /**
21 | * 根据 finishCode 创建错误原因 customeReason为默认原因
22 | */
23 | - (instancetype)initWithFinishCode:(DADownloadFinishCode)finishCode;
24 |
25 | /**
26 | * 根据 finishCode 和 customeReason 创建错误原因
27 | */
28 | - (instancetype)initWithinishCode:(DADownloadFinishCode)finishCode
29 | customeReason:(NSString *)customeReason;
30 |
31 | /**
32 | * 根据 finishCode 和 error 创建错误原因 customeReason为默认原因
33 | */
34 | - (instancetype)initWithinishCode:(DADownloadFinishCode)finishCode
35 | error:(NSError *)error;
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DonwloadError/DownloadError.m:
--------------------------------------------------------------------------------
1 | //
2 | // DownloadError.m
3 | // DownloadFramework
4 | //
5 | // Created by 宫傲 on 2018/6/12.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "DownloadError.h"
10 |
11 | @implementation DownloadError
12 |
13 | - (instancetype)initWithFinishCode:(DADownloadFinishCode)finishCode {
14 | return [self initWithinishCode:finishCode customeReason:[self makeProgressFinishCodeWith:finishCode]];
15 | }
16 |
17 | - (instancetype)initWithinishCode:(DADownloadFinishCode)finishCode
18 | customeReason:(NSString *)customeReason {
19 | if (self = [super init]) {
20 | self.finishCode = finishCode;
21 | self.customeReason = customeReason;
22 | }
23 | return self;
24 | }
25 |
26 | - (instancetype)initWithinishCode:(DADownloadFinishCode)finishCode
27 | error:(NSError *)error {
28 | if (self = [super init]) {
29 | self.finishCode = finishCode;
30 | self.systemError = error;
31 | self.customeReason = [self makeProgressFinishCodeWith:finishCode];
32 | }
33 | return self;
34 | }
35 |
36 | - (NSString *)makeProgressFinishCodeWith:(DADownloadFinishCode)finishCode {
37 | if (self.finishCode == kDADownloadFinishCodeNotReachable) {
38 | return @"无效网络";
39 | } else if (self.finishCode == kDADownloadFinishCodeItemLose) {
40 | return @"Item丢失";
41 | } else if (self.finishCode == kDADownloadFinishCodeMoveFail) {
42 | return @"切片转移失败";
43 | } else if (finishCode == kDADownloadFinishCodeIncomplete) {
44 | return @"下载任务不完整";
45 | } else if (finishCode == kDADownloadFinishCodeParseFailure) {
46 | return @"下载地址解析失败";
47 | } else if (finishCode == kDADownloadFinishCodeFailToRoot) {
48 | return @"创建下载根目录失败";
49 | }
50 | return @"";
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DonwloadTool/DADownloadCommon.h:
--------------------------------------------------------------------------------
1 | //
2 | // DADownloadCommon.h
3 | // GDownloadTool
4 | //
5 | // Created by 宫傲 on 2018/4/11.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #ifndef DADownloadCommon_h
10 | #define DADownloadCommon_h
11 |
12 | /**
13 | * 当前文件下载的状态
14 | */
15 | typedef NS_ENUM(NSUInteger, DADownloadState) {
16 | /** 这个download被实例化,但是并没有开始下载 */
17 | kDADownloadStateReady = 0,
18 | /** 等待下载 */
19 | kDADownloadStateWait,
20 | /** 下载已经开始,并接收文件 */
21 | kDADownloadStateDownloading,
22 | /** 下载成功完成 */
23 | kDADownloadStateCompleted,
24 | /** 下载被人为cancelled */
25 | kDADownloadStateCancelled,
26 | /** 下载失败 */
27 | kDADownloadStateFailed
28 | };
29 |
30 | /**
31 | * 下载状态码
32 | */
33 | typedef NS_ENUM(NSUInteger, DADownloadFinishCode) {
34 | /** 下载成功 */
35 | kDADownloadFinishCodeSuccess = 10,
36 | /** 无效网络 */
37 | kDADownloadFinishCodeNotReachable = 20,
38 | /** Item丢失 */
39 | kDADownloadFinishCodeItemLose = 30,
40 | /** 切片转移失败 */
41 | kDADownloadFinishCodeMoveFail = 40,
42 | /** 下载任务不完整 */
43 | kDADownloadFinishCodeIncomplete = 50,
44 | /** 下载地址解析失败 */
45 | kDADownloadFinishCodeParseFailure = 60,
46 | /** 创建下载根目录失败 */
47 | kDADownloadFinishCodeFailToRoot = 70
48 | };
49 |
50 | #endif /* DADownloadCommon_h */
51 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DonwloadTool/DANetworkStateTool/DANetworkStateTool.h:
--------------------------------------------------------------------------------
1 | //
2 | // DANetworkStateTool.h
3 | // DownloadFramework
4 | //
5 | // Created by 宫傲 on 2018/5/8.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Reachability.h"
11 |
12 | @interface DANetworkStateTool : NSObject
13 |
14 | + (instancetype)sharedInstance;
15 |
16 | - (BOOL)checkCurrentNetworkEnable;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DonwloadTool/DANetworkStateTool/DANetworkStateTool.m:
--------------------------------------------------------------------------------
1 | //
2 | // DANetworkStateTool.m
3 | // DownloadFramework
4 | //
5 | // Created by 宫傲 on 2018/5/8.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "DANetworkStateTool.h"
10 |
11 | @interface DANetworkStateTool ()
12 |
13 | @property (nonatomic, strong) Reachability *reachability;
14 |
15 | @end
16 |
17 | @implementation DANetworkStateTool
18 |
19 | #pragma mark - life cycle
20 | + (instancetype)sharedInstance {
21 | static dispatch_once_t onceToken;
22 | static DANetworkStateTool *sharedInstance;
23 | dispatch_once(&onceToken, ^{
24 | sharedInstance = [[DANetworkStateTool alloc] init];
25 | });
26 | return sharedInstance;
27 | }
28 |
29 | - (instancetype)init {
30 | if (self = [super init]) {
31 | self.reachability = [Reachability reachabilityWithHostName:@"www.baidu.com"];
32 | }
33 | return self;
34 | }
35 |
36 | - (BOOL)checkCurrentNetworkEnable {
37 | return [self.reachability currentReachabilityStatus] == NotReachable;
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DonwloadTool/DANetworkStateTool/Reachability.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2016 Apple Inc. All Rights Reserved.
3 | See LICENSE.txt for this sample’s licensing information
4 |
5 | Abstract:
6 | Basic demonstration of how to use the SystemConfiguration Reachablity APIs.
7 | */
8 |
9 | #import
10 | #import
11 | #import
12 |
13 |
14 | typedef enum : NSInteger {
15 | NotReachable = 0,
16 | ReachableViaWiFi,
17 | ReachableViaWWAN
18 | } NetworkStatus;
19 |
20 | #pragma mark IPv6 Support
21 | //Reachability fully support IPv6. For full details, see ReadMe.md.
22 |
23 |
24 | extern NSString *kReachabilityChangedNotification;
25 |
26 |
27 | @interface Reachability : NSObject
28 |
29 | /*!
30 | * Use to check the reachability of a given host name.
31 | */
32 | + (instancetype)reachabilityWithHostName:(NSString *)hostName;
33 |
34 | /*!
35 | * Use to check the reachability of a given IP address.
36 | */
37 | + (instancetype)reachabilityWithAddress:(const struct sockaddr *)hostAddress;
38 |
39 | /*!
40 | * Checks whether the default route is available. Should be used by applications that do not connect to a particular host.
41 | */
42 | + (instancetype)reachabilityForInternetConnection;
43 |
44 |
45 | #pragma mark reachabilityForLocalWiFi
46 | //reachabilityForLocalWiFi has been removed from the sample. See ReadMe.md for more information.
47 | //+ (instancetype)reachabilityForLocalWiFi;
48 |
49 | /*!
50 | * Start listening for reachability notifications on the current run loop.
51 | */
52 | - (BOOL)startNotifier;
53 | - (void)stopNotifier;
54 |
55 | - (NetworkStatus)currentReachabilityStatus;
56 |
57 | /*!
58 | * WWAN may be available, but not active until a connection has been established. WiFi may require a connection for VPN on Demand.
59 | */
60 | - (BOOL)connectionRequired;
61 |
62 | @end
63 |
64 |
65 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DonwloadTool/ResolveTool/DADownloadUrlResolver.h:
--------------------------------------------------------------------------------
1 | //
2 | // DADownloadUrlResolver.h
3 | // GDownloadTool
4 | //
5 | // Created by 宫傲 on 2018/4/13.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DADownloadUrlResolver : NSObject
12 |
13 | + (void)analysisDownloadUrls:(NSArray *)downloadUrls
14 | localUrl:(NSString *)localFileUrl
15 | downloadName:(NSString *)downloadName
16 | finishBlock:(void(^)(BOOL success, id object))finishBlock;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DownloadHandle/DADonwloadHandle.h:
--------------------------------------------------------------------------------
1 | //
2 | // DADonwloadHandle.h
3 | // DownloadFramework
4 | //
5 | // Created by 宫傲 on 2018/6/11.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DonwloadServiceProtocol.h"
11 |
12 | @class DADownloadSession,DADownloadModel;
13 |
14 | @interface DADonwloadHandle : NSObject
15 |
16 | /**
17 | 加入下载
18 | downloadUrls与localUrls数据必须一致,否则直接返回失败
19 |
20 | @param downloadUrls 下载地址数组
21 | @param localFileUrl 本地储存地址数组
22 | @param downloadId 下载任务 id
23 | @param downloadName 下载任务 名称
24 | @param analysisURLBlock 是否成功 和 下载实例
25 | */
26 | - (void)downloadWithDownloadUrls:(NSArray *)downloadUrls
27 | andLocalUrl:(NSString *)localFileUrl
28 | downloadId:(NSString *)downloadId
29 | downloadName:(NSString *)downloadName
30 | andAnalysisURLBlock:(void(^)(BOOL success, id downloader, DownloadError *error))analysisURLBlock;
31 |
32 | /**
33 | 开启下载
34 | @param downloadModel 下载模型
35 | */
36 | - (id )downloadWithDownloadModel:(DADownloadModel *)downloadModel;
37 |
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DownloadHandle/DonwloadServiceProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // DonwloadServiceProtocol.h
3 | // GDownloadTool
4 | //
5 | // Created by 宫傲 on 2018/4/23.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DADownloadCommon.h"
11 |
12 | @class DADownloadModel,DownloadError;
13 |
14 | @protocol DADownloadSessionDelegate
15 | @optional
16 |
17 | /**
18 | * 开始下载将下载进度传出
19 | */
20 | - (void)sessionDownloadProgressWithDownloadModel:(DADownloadModel *)downloadModel;
21 |
22 | /**
23 | * 下载结束
24 | */
25 | - (void)sessionDownloadFailureWithDownloadModel:(DADownloadModel *)downloadModel downloadError:(DownloadError *)error;
26 |
27 | @end
28 |
29 | @protocol DonwloadServiceProtocol
30 |
31 | @property (nonatomic, weak) id sessionDelegate;
32 |
33 | //下载模型
34 | @property (nonatomic, strong, readonly) DADownloadModel *downloadModel;
35 |
36 | /**
37 | * 开始下载
38 | */
39 | - (void)start;
40 |
41 | /**
42 | * 暂停下载
43 | */
44 | - (void)pauseDownload;
45 |
46 | /**
47 | * 删除下载
48 | */
49 | - (void)removeDownload;
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DownloadManager/GADownloadManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // GADownloadManager.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/17.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class DADownloadModel;
12 |
13 | @protocol CEDownloadManagerDelegate
14 | @optional
15 | /**
16 | * 当下载状态发生变化
17 | */
18 | - (void)downloadManagerChangeDownloadStateWithDownloadModel:(DADownloadModel *)downloadModel downloadError:(DownloadError *)error;
19 |
20 | /**
21 | * 当下载进度发生变化
22 | */
23 | - (void)downloadManagerChangeDownloadProgressWithDownloadModel:(DADownloadModel *)downloadModel;
24 |
25 | @end
26 |
27 | @interface GADownloadManager : NSObject
28 |
29 | + (instancetype)sharedInstance;
30 |
31 | @property (nonatomic, strong) id downloadManagerDelegate;
32 |
33 | + (instancetype)sharedInstance;
34 |
35 | /**
36 | 开启下载任务
37 |
38 | @param downloadDict 参数字典 {@"fileId":下载id,@"downloadName":下载名称,@"downloadUrls":下载地址数组,@"localUrl":相应的本地储存地址}
39 | @param toResolve 是否重新解析下载地址
40 | */
41 | - (void)startDownloadWithDownloadDict:(NSDictionary *)downloadDict toResolve:(BOOL)toResolve;
42 |
43 | /**
44 | 暂停下载任务
45 |
46 | @param downloadId 下载id
47 | */
48 | - (void)stopTheDownloadTaskWith:(NSString *)downloadId;
49 |
50 | /**
51 | 删除下载任务
52 |
53 | @param downloadId 下载id
54 | */
55 | - (void)removeTheDownloadTaskWith:(NSString *)downloadId;
56 |
57 | @end
58 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DownloadMemory/DownloadMemory.h:
--------------------------------------------------------------------------------
1 | //
2 | // DownloadMemory.h
3 | // DownloadVC
4 | //
5 | // Created by 宫傲 on 2018/6/11.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef void(^DownloadMemorySizeBlock)(int64_t usedTotalSize,int64_t freeTotalSize);
12 |
13 | @interface DownloadMemory : NSObject
14 |
15 | /**
16 | * 内存改变回调
17 | */
18 | @property (nonatomic, strong) DownloadMemorySizeBlock sizeBlock;
19 |
20 | /**
21 | * 根据 fielId 获取下载速度
22 | */
23 | - (int64_t)getSpeedWithFileId:(NSString *)fielId;
24 |
25 | /**
26 | * 记录 下载存入
27 | */
28 | - (void)makeProgressFileId:(NSString *)fielId bytesWritten:(int64_t)bytesWritten;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DownloadMemory/MemoryModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // MemoryModel.h
3 | // DownloadVC
4 | //
5 | // Created by 宫傲 on 2018/6/11.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MemoryModel : NSObject
12 |
13 | @property (nonatomic, copy) NSString *fileId;
14 |
15 | /**
16 | * 本次回调写入沙盒的大小
17 | */
18 | @property (nonatomic, assign) int64_t bytesWritten;
19 |
20 | /**
21 | * 下载速度
22 | */
23 | @property (nonatomic, assign) int64_t downloadSpeed;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DownloadMemory/MemoryModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // MemoryModel.m
3 | // DownloadVC
4 | //
5 | // Created by 宫傲 on 2018/6/11.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "MemoryModel.h"
10 |
11 | @implementation MemoryModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DownloadModel/DADownloadItemModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // DADownloadItemModel.h
3 | // GDownloadTool
4 | //
5 | // Created by 宫傲 on 2018/4/17.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DADownloadItemModel : NSObject
12 |
13 | /**
14 | * 本地储存地址
15 | */
16 | @property (nonatomic, copy) NSString *finishLocalName;
17 |
18 | /**
19 | * 下载地址
20 | */
21 | @property (nonatomic, copy) NSString *downloadUrl;
22 |
23 | /**
24 | * resumeData的存储地址
25 | */
26 | @property (nonatomic, copy) NSString *resumDataLocalName;
27 |
28 | /**
29 | * 单个任务已经下载的大小
30 | */
31 | @property (nonatomic, copy) NSString *totalBytesWritten;
32 |
33 | /**
34 | * 单个任务总大小
35 | */
36 | @property (nonatomic, copy) NSString *totalBytesExpectedToWrite;
37 |
38 | /**
39 | * 是否下载完成 0 1
40 | */
41 | @property (nonatomic, copy) NSString *isFinish;
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DownloadModel/DADownloadItemModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // DADownloadItemModel.m
3 | // GDownloadTool
4 | //
5 | // Created by 宫傲 on 2018/4/17.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "DADownloadItemModel.h"
10 |
11 | @implementation DADownloadItemModel
12 |
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DownloadModel/DADownloadModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // DADownloadModel.h
3 | // GDownloadTool
4 | //
5 | // Created by 宫傲 on 2018/4/11.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DADownloadCommon.h"
11 |
12 | @interface DADownloadModel : NSObject
13 |
14 | /**
15 | * 下载的id
16 | */
17 | @property (nonatomic, copy) NSString *downloadId;
18 |
19 | /**
20 | * 本地存储地址
21 | */
22 | @property (nonatomic, strong) NSArray *downloadItemArray;
23 |
24 | /**
25 | * 本地存储根目录
26 | */
27 | @property (nonatomic, copy) NSString *pathName;
28 |
29 | /**
30 | * 下载名称
31 | */
32 | @property (nonatomic, copy) NSString *downloadTitle;
33 |
34 | /**
35 | * 下载进度
36 | */
37 | @property (nonatomic, copy) NSString *progress;
38 |
39 | /**
40 | * 下载状态
41 | */
42 | @property (nonatomic, assign) DADownloadState downloadState;
43 |
44 | /**
45 | * 本次回调写入沙盒的大小
46 | */
47 | @property (nonatomic, assign) int64_t bytesWritten;
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DownloadModel/DADownloadModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // DADownloadModel.m
3 | // GDownloadTool
4 | //
5 | // Created by 宫傲 on 2018/4/11.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "DADownloadModel.h"
10 |
11 | @implementation DADownloadModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DownloadSession/DADownloadSession.h:
--------------------------------------------------------------------------------
1 | //
2 | // DADownloadSession.h
3 | // GDownloadTool
4 | //
5 | // Created by 宫傲 on 2018/4/11.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DonwloadServiceProtocol.h"
11 |
12 | @class DADownloadModel;
13 |
14 | @interface DADownloadSession : NSObject
15 |
16 | @property (nonatomic, weak) id sessionDelegate;
17 |
18 | //下载模型
19 | @property (nonatomic, strong, readonly) DADownloadModel *downloadModel;
20 |
21 | /**
22 | 初始化 DownloadSession
23 |
24 | @param downloadModel 下载模型
25 | @return DownloadSession
26 | */
27 | - (instancetype)initWithDownloadModel:(DADownloadModel *)downloadModel;
28 |
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DownloadTask/DADownloadItem.h:
--------------------------------------------------------------------------------
1 | //
2 | // DADownloadItem.h
3 | // GDownloadTool
4 | //
5 | // Created by 宫傲 on 2018/4/11.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class DADownloadItemModel;
12 |
13 | @interface DADownloadItem : NSObject
14 |
15 | /**
16 | * 下载task
17 | */
18 | @property (nonatomic, strong) NSURLSessionDownloadTask *downloadTask;
19 |
20 | /**
21 | * 单个任务下载失败最大重连次数
22 | */
23 | @property (nonatomic, assign) NSInteger maxReconnection;
24 |
25 | /**
26 | * 当前下载任务的进度
27 | */
28 | @property (nonatomic, strong) NSProgress *progress;
29 |
30 |
31 | @property (nonatomic, strong) DADownloadItemModel *itemModel;
32 |
33 | - (void)createDonwloadTaskWith:(NSURLSession *)session;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/DownloadTask/DADownloadItem.m:
--------------------------------------------------------------------------------
1 | //
2 | // DADownloadItem.m
3 | // GDownloadTool
4 | //
5 | // Created by 宫傲 on 2018/4/11.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "DADownloadItem.h"
10 | #import "DADownloadItemModel.h"
11 |
12 | @implementation DADownloadItem
13 |
14 | //生成downloadTask
15 | - (void)createDonwloadTaskWith:(NSURLSession *)session {
16 | NSString *resumDataUrl = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingFormat:@"%@",self.itemModel.resumDataLocalName];
17 | //1.1 获取resumeData
18 | NSData *resumeData;
19 | BOOL exist = [[NSFileManager defaultManager] fileExistsAtPath:resumDataUrl];
20 | NSString *dataString = @"";
21 | if (exist) {
22 | resumeData = [NSData dataWithContentsOfFile:resumDataUrl] == nil ? nil : [NSData dataWithContentsOfFile:resumDataUrl];
23 | dataString = [[NSString alloc] initWithData:resumeData encoding:NSUTF8StringEncoding];
24 | NSLog(@"dataString%@",dataString);
25 | }
26 | //1.2 沙盒中有 resumeData
27 | if (resumeData && dataString.length > 0) {
28 | _downloadTask = [session downloadTaskWithResumeData:resumeData];
29 | } else {
30 | //1.3不存在 resumeData
31 | NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:self.itemModel.downloadUrl]];
32 | _downloadTask = [session downloadTaskWithRequest:request];
33 | }
34 |
35 | }
36 | @end
37 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/M3U8Tool/HTML/TFHpple.h:
--------------------------------------------------------------------------------
1 | //
2 | // TFHpple.h
3 | // Hpple
4 | //
5 | // Created by Geoffrey Grosenbach on 1/31/09.
6 | //
7 | // Copyright (c) 2009 Topfunky Corporation, http://topfunky.com
8 | //
9 | // MIT LICENSE
10 | //
11 | // Permission is hereby granted, free of charge, to any person obtaining
12 | // a copy of this software and associated documentation files (the
13 | // "Software"), to deal in the Software without restriction, including
14 | // without limitation the rights to use, copy, modify, merge, publish,
15 | // distribute, sublicense, and/or sell copies of the Software, and to
16 | // permit persons to whom the Software is furnished to do so, subject to
17 | // the following conditions:
18 | //
19 | // The above copyright notice and this permission notice shall be
20 | // included in all copies or substantial portions of the Software.
21 | //
22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 |
30 |
31 | #import
32 |
33 | #import "TFHppleElement.h"
34 |
35 | @interface TFHpple : NSObject {
36 | @private
37 | NSData * data;
38 | BOOL isXML;
39 | }
40 |
41 | - (id) initWithData:(NSData *)theData isXML:(BOOL)isDataXML;
42 | - (id) initWithXMLData:(NSData *)theData;
43 | - (id) initWithHTMLData:(NSData *)theData;
44 |
45 | + (TFHpple *) hppleWithData:(NSData *)theData isXML:(BOOL)isDataXML;
46 | + (TFHpple *) hppleWithXMLData:(NSData *)theData;
47 | + (TFHpple *) hppleWithHTMLData:(NSData *)theData;
48 |
49 | - (NSArray *) searchWithXPathQuery:(NSString *)xPathOrCSS;
50 | - (TFHppleElement *) peekAtSearchWithXPathQuery:(NSString *)xPathOrCSS;
51 |
52 | @property (nonatomic, strong, readonly) NSData * data;
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/M3U8Tool/HTML/XPathQuery.h:
--------------------------------------------------------------------------------
1 | //
2 | // XPathQuery.h
3 | // FuelFinder
4 | //
5 | // Created by Matt Gallagher on 4/08/08.
6 | // Copyright 2008 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NSArray *PerformHTMLXPathQuery(NSData *document, NSString *query);
12 | NSArray *PerformXMLXPathQuery(NSData *document, NSString *query);
13 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/M3U8Tool/M3u8Parser/M3U8Parser+String.h:
--------------------------------------------------------------------------------
1 | //
2 | // M3U8Parser+String.h
3 | // AvPlayerDemo
4 | //
5 | // Created by work-li on 16/4/13.
6 | // Copyright © 2016年 pljhonglu. All rights reserved.
7 | //
8 |
9 | #import "M3U8Parser.h"
10 | #import "M3U8PlayerKey.h"
11 |
12 | @interface M3U8Parser (String)
13 |
14 | /**
15 | * 根据传递的m3u8 data 数据初始化实例
16 | * @param m3u8data m3u8data
17 | */
18 | - (instancetype)initWithM3U8Data:(NSData *)m3u8data;
19 |
20 | /**
21 | * 根据传递的m3u8 string 数据初始化实例
22 | * @param m3u8String m3u8string
23 | */
24 | - (instancetype)initWithM3U8String:(NSString *)m3u8String rootUrl:(NSString *)rootUrl;
25 |
26 |
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/M3U8Tool/M3u8Parser/M3U8Parser.h:
--------------------------------------------------------------------------------
1 | //
2 | // M3U8Parser.h
3 | // AvPlayerDemo
4 | //
5 | // Created by work-li on 16/4/13.
6 | // Copyright © 2016年 pljhonglu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface M3U8Parser : NSObject
12 |
13 | /**
14 | * 存储m3u8的临时文件字符串 m3u8文件内部url
15 | */
16 | @property (nonatomic, strong) NSMutableString *originM3U8String;
17 |
18 | /**
19 | * 存储m3u8的最终文件字符串 m3u8文件内部url
20 | */
21 | @property (nonatomic, strong) NSString *lastM3U8String;
22 |
23 | /**
24 | * ts 名称集合字段
25 | */
26 | @property (nonatomic, strong) NSMutableArray *tsNameMutableArray;
27 |
28 | /**
29 | * ts 下载集合字段
30 | */
31 | @property (nonatomic, strong) NSMutableArray *tsUrlMutableArray;
32 |
33 | /**
34 | * ts 时间序列集合
35 | */
36 | @property (nonatomic, strong) NSMutableArray *tsTimeArray;
37 |
38 | /**
39 | * m3u8文件的URI
40 | */
41 | @property (nonatomic, strong) NSString *m3u8URI;
42 |
43 | /**
44 | * m3u8 的网络地址
45 | */
46 | @property (nonatomic, strong) NSString *m3u8NetAddress;
47 |
48 | /**
49 | * 获取M3U8的视频ID
50 | */
51 | @property (nonatomic, strong) NSString *vedioId;
52 |
53 | /**
54 | * 是否需要解密,如果m3u8 文件的uri 存在则需要解密,否则不需要解密
55 | */
56 | @property (nonatomic, assign) BOOL isCryption;
57 |
58 | /**
59 | * 跟路径
60 | */
61 | @property (nonatomic, copy) NSString *rootUrl;
62 |
63 |
64 | #pragma mark - 对应的app
65 | /**
66 | 当前播放文件对应的app
67 | */
68 | @property (nonatomic, strong) NSString *app;
69 |
70 |
71 | /**
72 | 当前播放文件对应的type
73 | */
74 | @property (nonatomic, strong) NSString *type;
75 |
76 | /**
77 | 当前播放文件对应的vedioId
78 | */
79 | @property (nonatomic, strong) NSString *vid;
80 |
81 |
82 | /**
83 | 当前播放器的机密后的key
84 | */
85 | @property (nonatomic, strong) NSString *key;
86 |
87 | #pragma mark - 对应的m3u8播放的网络地址
88 |
89 | /**
90 | * 查找出错的ts字段
91 | * @param errTime 当前出错的时间
92 | */
93 | - (NSString *)findErrorTsByTime:(NSInteger)errTime;
94 |
95 | @end
96 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/M3U8Tool/M3u8Parser/M3U8Parser.m:
--------------------------------------------------------------------------------
1 | //
2 | // M3U8Parser.m
3 | // AvPlayerDemo
4 | //
5 | // Created by work-li on 16/4/13.
6 | // Copyright © 2016年 pljhonglu. All rights reserved.
7 | //
8 |
9 | #import "M3U8Parser.h"
10 |
11 | #define kNotFoundErrorTS @"没有找到出错的ts"
12 |
13 | @implementation M3U8Parser
14 |
15 |
16 | ///**
17 | // * 是否需要解密,如果m3u8 文件的uri 存在则需要解密,否则不需要解密
18 | // */
19 | //- (BOOL)isCryption
20 | //{
21 | // if (self.m3u8URI.length > 0) {
22 | // return YES;
23 | // }
24 | // else
25 | // {
26 | // return NO;
27 | // }
28 | //}
29 |
30 | #pragma mark - set/get private method
31 | - (NSMutableArray *)tsUrlMutableArray
32 | {
33 | if (_tsUrlMutableArray == nil) {
34 | _tsUrlMutableArray = [[NSMutableArray alloc] initWithCapacity:0];
35 | }
36 | return _tsUrlMutableArray;
37 | }
38 |
39 | - (NSMutableArray *)tsNameMutableArray {
40 | if (_tsNameMutableArray == nil) {
41 | _tsNameMutableArray = [[NSMutableArray alloc] initWithCapacity:0];
42 | }
43 | return _tsNameMutableArray;
44 | }
45 |
46 | /**
47 | * 记录当前每个ts 的时间序列集合
48 | */
49 | - (NSMutableArray *)tsTimeArray
50 | {
51 | if (!_tsTimeArray) {
52 | _tsTimeArray = [[NSMutableArray alloc] initWithCapacity:0];
53 | }
54 | return _tsTimeArray;
55 | }
56 |
57 |
58 | /**
59 | * 根据ts播放时间序列,查找出错的ts字段
60 | * @param: errTime 当前出错的时间
61 | */
62 | - (NSString *)findErrorTsByTime:(NSInteger)errTime
63 | {
64 | if (self.tsTimeArray.count > 0) {
65 |
66 | __block NSInteger tmpTotalTime = 0;
67 | __block NSInteger errIndex = -1;
68 | [self.tsTimeArray enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
69 | NSString *tmp = obj;
70 | tmpTotalTime += [tmp intValue];
71 | if (tmpTotalTime >= errTime) {
72 |
73 | errIndex = idx;
74 | *stop = YES;
75 | }
76 | }];
77 | // if (errIndex < self.tsMutableArray.count && errIndex >= 0) {
78 | // return self.tsMutableArray[errIndex];
79 | // }
80 | // else
81 | // {
82 | // return kNotFoundErrorTS;
83 | // }
84 |
85 |
86 | }
87 | return kNotFoundErrorTS;
88 | }
89 |
90 |
91 | @end
92 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Donwload/M3U8Tool/M3u8Parser/M3U8PlayerKey.h:
--------------------------------------------------------------------------------
1 | //
2 | // M3U8PlayerKey.h
3 | // AvPlayerDemo
4 | //
5 | // Created by work-li on 16/4/8.
6 | // Copyright © 2016年 pljhonglu. All rights reserved.
7 | //
8 |
9 | #ifndef M3U8PlayerKey_h
10 | #define M3U8PlayerKey_h
11 |
12 |
13 | /**
14 | * 正常的访问协议
15 | */
16 | #define M3U8NORMALHTTPSCHEME @"http"
17 |
18 | /**
19 | * 正常的安全访问协议
20 | */
21 | #define M3U8NORMALHTTPSECUTITYSCHEME @"https"
22 |
23 | /**
24 | * 替换URI的Key
25 | */
26 | #define M3U8PlayerHTTPSKey @"streaming"
27 |
28 | /**
29 | * 替换http 与 https模式的schema
30 | */
31 | #define M3U8PlayerHTTPSChema @"streaming"
32 |
33 |
34 | /**
35 | * m3u8 文件中开头的前缀
36 | */
37 | #define M3U8PrefixName @"#EXT"
38 |
39 | /**
40 | * m3u8 时间序列前缀
41 | */
42 | #define M3U8TSTimeSequence @"#EXTINF"
43 |
44 | /**
45 | * ts的后缀名
46 | */
47 | #define M3U8TSSuffixName @"ts"
48 |
49 | /**
50 | * 文件中的URI 标识
51 | */
52 | #define M3U8URI @"URI"
53 |
54 | /**
55 | * m3u8 后缀名
56 | */
57 | #define M3U8SuffixName @"m3u8"
58 |
59 |
60 | #endif /* M3U8PlayerKey_h */
61 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/HttpSeverManager/GAHttpSeverManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAHttpSeverManager.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/22.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | @interface GAHttpSeverManager : NSObject
13 |
14 | /**
15 | * 初始化
16 | */
17 | + (instancetype)sharedInstance;
18 |
19 | /**
20 | * 启动httpserver
21 | */
22 | - (void)startServer;
23 |
24 | /**
25 | * 关闭httpserver
26 | */
27 | - (void)stopServer;
28 |
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/HttpSeverManager/GAHttpSeverManager.m:
--------------------------------------------------------------------------------
1 | //
2 | // GAHttpSeverManager.m
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/22.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GAHttpSeverManager.h"
10 |
11 | #import "HTTPServer.h"
12 |
13 | #define DefaultTryCount 3
14 |
15 | // 会根据项目情况进行修改
16 | #define kDownloadRootPath [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
17 |
18 | @interface GAHttpSeverManager ()
19 |
20 | @property (nonatomic, strong) HTTPServer *httpServer;
21 |
22 | /**
23 | * 尝试开启的次数
24 | */
25 | @property (nonatomic, assign) NSInteger tryTestNum;
26 |
27 | @end
28 |
29 | @implementation GAHttpSeverManager
30 |
31 | + (instancetype)sharedInstance {
32 | static dispatch_once_t onceToken;
33 | static GAHttpSeverManager *sharedInstance = nil;
34 | dispatch_once(&onceToken, ^{
35 | sharedInstance = [[GAHttpSeverManager alloc] init];
36 | });
37 | return sharedInstance;
38 | }
39 |
40 | #pragma mark - public functions
41 |
42 | - (void)startServer {
43 | NSError *error;
44 | if([self.httpServer start:&error]) {
45 | //#warning 项目不同替换nslog
46 | self.tryTestNum = 0;
47 | NSLog(@"Started HTTP Server on port %hu", [self.httpServer listeningPort]);
48 | }
49 | else {
50 | self.tryTestNum ++;
51 | if (self.tryTestNum < DefaultTryCount) {
52 | [self stopServer];
53 | [self startServer];
54 | }
55 | else
56 | {
57 | self.tryTestNum = 0;
58 | }
59 | NSLog(@"Error starting HTTP Server: %@", error);
60 | }
61 | }
62 |
63 | - (void)stopServer {
64 | [self.httpServer stop];
65 | self.httpServer = nil;
66 | }
67 |
68 | #pragma mark – getters and setters
69 | /**
70 | * 初始化httpserver
71 | */
72 | - (HTTPServer *)httpServer {
73 |
74 | if (_httpServer == nil) {
75 | _httpServer = [[HTTPServer alloc] init];
76 | [_httpServer setName:@"GAPlayer"];
77 | [_httpServer setPort:1025]; //注意此时的端口号要与 kLocalPlayURL 保持一致
78 | //设置成m3u8的下载地址
79 | NSString *rootPath = kDownloadRootPath;
80 | [_httpServer setDocumentRoot:rootPath];
81 | }
82 | return _httpServer;
83 | }
84 |
85 | @end
86 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/BackgroundMusic/BackgroundRunner/WCHBackgroundRunner.h:
--------------------------------------------------------------------------------
1 | //
2 | // WCHBackgroundRunner.h
3 | // MDMAgent
4 | //
5 | // Created by wihan on 13-3-25.
6 | // Copyright (c) 2013年 wihan. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 | typedef void(^Actions)();
14 | @interface WCHBackgroundRunner : NSObject
15 |
16 | @property (nonatomic, strong) Actions actionBlock;
17 |
18 | - (void)runnerDidEnterBackground;
19 | - (void)runnerWillEnterForeground;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/BackgroundMusic/Resources/mute.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Class/PlayView/Lib/BackgroundMusic/Resources/mute.mp3
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/BackgroundMusic/Resources/林俊杰 - 她说.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Class/PlayView/Lib/BackgroundMusic/Resources/林俊杰 - 她说.mp3
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/CocoaHTTPServer.podspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "CocoaHTTPServer",
3 | "version": "2.3",
4 | "license": "BSD",
5 | "summary": "A small, lightweight, embeddable HTTP server for Mac OS X or iOS applications.",
6 | "homepage": "https://github.com/robbiehanson/CocoaHTTPServer",
7 | "authors": {
8 | "Robbie Hanson": "cocoahttpserver@googlegroups.com"
9 | },
10 | "source": {
11 | "git": "https://github.com/robbiehanson/CocoaHTTPServer.git",
12 | "tag": "2.3"
13 | },
14 | "source_files": "{Core,Extensions}/**/*.{h,m}",
15 | "requires_arc": true,
16 | "platforms": {
17 | "ios": "5.0",
18 | "osx": "10.7"
19 | },
20 | "ios": {
21 | "frameworks": [
22 | "CFNetwork",
23 | "Security"
24 | ]
25 | },
26 | "osx": {
27 | "frameworks": [
28 | "CoreServices",
29 | "Security"
30 | ]
31 | },
32 | "libraries": "xml2",
33 | "xcconfig": {
34 | "HEADER_SEARCH_PATHS": "\"$(SDKROOT)/usr/include/libxml2\""
35 | },
36 | "dependencies": {
37 | "CocoaAsyncSocket": [
38 |
39 | ],
40 | "CocoaLumberjack": [
41 |
42 | ]
43 | }
44 | }
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/Categories/DDData.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface NSData (DDData)
4 |
5 | - (NSData *)md5Digest;
6 |
7 | - (NSData *)sha1Digest;
8 |
9 | - (NSString *)hexStringValue;
10 |
11 | - (NSString *)base64Encoded;
12 | - (NSData *)base64Decoded;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/Categories/DDNumber.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 |
4 | @interface NSNumber (DDNumber)
5 |
6 | + (BOOL)parseString:(NSString *)str intoSInt64:(SInt64 *)pNum;
7 | + (BOOL)parseString:(NSString *)str intoUInt64:(UInt64 *)pNum;
8 |
9 | + (BOOL)parseString:(NSString *)str intoNSInteger:(NSInteger *)pNum;
10 | + (BOOL)parseString:(NSString *)str intoNSUInteger:(NSUInteger *)pNum;
11 |
12 | @end
13 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/Categories/DDNumber.m:
--------------------------------------------------------------------------------
1 | #import "DDNumber.h"
2 |
3 |
4 | @implementation NSNumber (DDNumber)
5 |
6 | + (BOOL)parseString:(NSString *)str intoSInt64:(SInt64 *)pNum
7 | {
8 | if(str == nil)
9 | {
10 | *pNum = 0;
11 | return NO;
12 | }
13 |
14 | errno = 0;
15 |
16 | // On both 32-bit and 64-bit machines, long long = 64 bit
17 |
18 | *pNum = strtoll([str UTF8String], NULL, 10);
19 |
20 | if(errno != 0)
21 | return NO;
22 | else
23 | return YES;
24 | }
25 |
26 | + (BOOL)parseString:(NSString *)str intoUInt64:(UInt64 *)pNum
27 | {
28 | if(str == nil)
29 | {
30 | *pNum = 0;
31 | return NO;
32 | }
33 |
34 | errno = 0;
35 |
36 | // On both 32-bit and 64-bit machines, unsigned long long = 64 bit
37 |
38 | *pNum = strtoull([str UTF8String], NULL, 10);
39 |
40 | if(errno != 0)
41 | return NO;
42 | else
43 | return YES;
44 | }
45 |
46 | + (BOOL)parseString:(NSString *)str intoNSInteger:(NSInteger *)pNum
47 | {
48 | if(str == nil)
49 | {
50 | *pNum = 0;
51 | return NO;
52 | }
53 |
54 | errno = 0;
55 |
56 | // On LP64, NSInteger = long = 64 bit
57 | // Otherwise, NSInteger = int = long = 32 bit
58 |
59 | *pNum = strtol([str UTF8String], NULL, 10);
60 |
61 | if(errno != 0)
62 | return NO;
63 | else
64 | return YES;
65 | }
66 |
67 | + (BOOL)parseString:(NSString *)str intoNSUInteger:(NSUInteger *)pNum
68 | {
69 | if(str == nil)
70 | {
71 | *pNum = 0;
72 | return NO;
73 | }
74 |
75 | errno = 0;
76 |
77 | // On LP64, NSUInteger = unsigned long = 64 bit
78 | // Otherwise, NSUInteger = unsigned int = unsigned long = 32 bit
79 |
80 | *pNum = strtoul([str UTF8String], NULL, 10);
81 |
82 | if(errno != 0)
83 | return NO;
84 | else
85 | return YES;
86 | }
87 |
88 | @end
89 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/Categories/DDRange.h:
--------------------------------------------------------------------------------
1 | /**
2 | * DDRange is the functional equivalent of a 64 bit NSRange.
3 | * The HTTP Server is designed to support very large files.
4 | * On 32 bit architectures (ppc, i386) NSRange uses unsigned 32 bit integers.
5 | * This only supports a range of up to 4 gigabytes.
6 | * By defining our own variant, we can support a range up to 16 exabytes.
7 | *
8 | * All effort is given such that DDRange functions EXACTLY the same as NSRange.
9 | **/
10 |
11 | #import
12 | #import
13 |
14 | @class NSString;
15 |
16 | typedef struct _DDRange {
17 | UInt64 location;
18 | UInt64 length;
19 | } DDRange;
20 |
21 | typedef DDRange *DDRangePointer;
22 |
23 | NS_INLINE DDRange DDMakeRange(UInt64 loc, UInt64 len) {
24 | DDRange r;
25 | r.location = loc;
26 | r.length = len;
27 | return r;
28 | }
29 |
30 | NS_INLINE UInt64 DDMaxRange(DDRange range) {
31 | return (range.location + range.length);
32 | }
33 |
34 | NS_INLINE BOOL DDLocationInRange(UInt64 loc, DDRange range) {
35 | return (loc - range.location < range.length);
36 | }
37 |
38 | NS_INLINE BOOL DDEqualRanges(DDRange range1, DDRange range2) {
39 | return ((range1.location == range2.location) && (range1.length == range2.length));
40 | }
41 |
42 | FOUNDATION_EXPORT DDRange DDUnionRange(DDRange range1, DDRange range2);
43 | FOUNDATION_EXPORT DDRange DDIntersectionRange(DDRange range1, DDRange range2);
44 | FOUNDATION_EXPORT NSString *DDStringFromRange(DDRange range);
45 | FOUNDATION_EXPORT DDRange DDRangeFromString(NSString *aString);
46 |
47 | NSInteger DDRangeCompare(DDRangePointer pDDRange1, DDRangePointer pDDRange2);
48 |
49 | @interface NSValue (NSValueDDRangeExtensions)
50 |
51 | + (NSValue *)valueWithDDRange:(DDRange)range;
52 | - (DDRange)ddrangeValue;
53 |
54 | - (NSInteger)ddrangeCompare:(NSValue *)ddrangeValue;
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/HTTPAuthenticationRequest.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #if TARGET_OS_IPHONE
4 | // Note: You may need to add the CFNetwork Framework to your project
5 | #import
6 | #endif
7 |
8 | @class HTTPMessage;
9 |
10 |
11 | @interface HTTPAuthenticationRequest : NSObject
12 | {
13 | BOOL isBasic;
14 | BOOL isDigest;
15 |
16 | NSString *base64Credentials;
17 |
18 | NSString *username;
19 | NSString *realm;
20 | NSString *nonce;
21 | NSString *uri;
22 | NSString *qop;
23 | NSString *nc;
24 | NSString *cnonce;
25 | NSString *response;
26 | }
27 | - (id)initWithRequest:(HTTPMessage *)request;
28 |
29 | - (BOOL)isBasic;
30 | - (BOOL)isDigest;
31 |
32 | // Basic
33 | - (NSString *)base64Credentials;
34 |
35 | // Digest
36 | - (NSString *)username;
37 | - (NSString *)realm;
38 | - (NSString *)nonce;
39 | - (NSString *)uri;
40 | - (NSString *)qop;
41 | - (NSString *)nc;
42 | - (NSString *)cnonce;
43 | - (NSString *)response;
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/HTTPMessage.h:
--------------------------------------------------------------------------------
1 | /**
2 | * The HTTPMessage class is a simple Objective-C wrapper around Apple's CFHTTPMessage class.
3 | **/
4 |
5 | #import
6 |
7 | #if TARGET_OS_IPHONE
8 | // Note: You may need to add the CFNetwork Framework to your project
9 | #import
10 | #endif
11 |
12 | #define HTTPVersion1_0 ((NSString *)kCFHTTPVersion1_0)
13 | #define HTTPVersion1_1 ((NSString *)kCFHTTPVersion1_1)
14 |
15 |
16 | @interface HTTPMessage : NSObject
17 | {
18 | CFHTTPMessageRef message;
19 | }
20 |
21 | - (id)initEmptyRequest;
22 |
23 | - (id)initRequestWithMethod:(NSString *)method URL:(NSURL *)url version:(NSString *)version;
24 |
25 | - (id)initResponseWithStatusCode:(NSInteger)code description:(NSString *)description version:(NSString *)version;
26 |
27 | - (BOOL)appendData:(NSData *)data;
28 |
29 | - (BOOL)isHeaderComplete;
30 |
31 | - (NSString *)version;
32 |
33 | - (NSString *)method;
34 | - (NSURL *)url;
35 |
36 | - (NSInteger)statusCode;
37 |
38 | - (NSDictionary *)allHeaderFields;
39 | - (NSString *)headerField:(NSString *)headerField;
40 |
41 | - (void)setHeaderField:(NSString *)headerField value:(NSString *)headerFieldValue;
42 |
43 | - (NSData *)messageData;
44 |
45 | - (NSData *)body;
46 | - (void)setBody:(NSData *)body;
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/Mime/MultipartFormDataParser.h:
--------------------------------------------------------------------------------
1 |
2 | #import "MultipartMessageHeader.h"
3 |
4 | /*
5 | Part one: http://tools.ietf.org/html/rfc2045 (Format of Internet Message Bodies)
6 | Part two: http://tools.ietf.org/html/rfc2046 (Media Types)
7 | Part three: http://tools.ietf.org/html/rfc2047 (Message Header Extensions for Non-ASCII Text)
8 | Part four: http://tools.ietf.org/html/rfc4289 (Registration Procedures)
9 | Part five: http://tools.ietf.org/html/rfc2049 (Conformance Criteria and Examples)
10 |
11 | Internet message format: http://tools.ietf.org/html/rfc2822
12 |
13 | Multipart/form-data http://tools.ietf.org/html/rfc2388
14 | */
15 |
16 | @class MultipartFormDataParser;
17 |
18 | //-----------------------------------------------------------------
19 | // protocol MultipartFormDataParser
20 | //-----------------------------------------------------------------
21 |
22 | @protocol MultipartFormDataParserDelegate
23 | @optional
24 | - (void) processContent:(NSData*) data WithHeader:(MultipartMessageHeader*) header;
25 | - (void) processEndOfPartWithHeader:(MultipartMessageHeader*) header;
26 | - (void) processPreambleData:(NSData*) data;
27 | - (void) processEpilogueData:(NSData*) data;
28 | - (void) processStartOfPartWithHeader:(MultipartMessageHeader*) header;
29 | @end
30 |
31 | //-----------------------------------------------------------------
32 | // interface MultipartFormDataParser
33 | //-----------------------------------------------------------------
34 |
35 | @interface MultipartFormDataParser : NSObject {
36 | NSMutableData* pendingData;
37 | NSData* boundaryData;
38 | MultipartMessageHeader* currentHeader;
39 |
40 | BOOL waitingForCRLF;
41 | BOOL reachedEpilogue;
42 | BOOL processedPreamble;
43 | BOOL checkForContentEnd;
44 |
45 | #if __has_feature(objc_arc_weak)
46 | __weak id delegate;
47 | #else
48 | __unsafe_unretained id delegate;
49 | #endif
50 | int currentEncoding;
51 | NSStringEncoding formEncoding;
52 | }
53 |
54 | - (BOOL) appendData:(NSData*) data;
55 |
56 | - (id) initWithBoundary:(NSString*) boundary formEncoding:(NSStringEncoding) formEncoding;
57 |
58 | #if __has_feature(objc_arc_weak)
59 | @property(weak, readwrite) id delegate;
60 | #else
61 | @property(unsafe_unretained, readwrite) id delegate;
62 | #endif
63 | @property(readwrite) NSStringEncoding formEncoding;
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/Mime/MultipartMessageHeader.h:
--------------------------------------------------------------------------------
1 | //
2 | // MultipartMessagePart.h
3 | // HttpServer
4 | //
5 | // Created by Валерий Гаврилов on 29.03.12.
6 | // Copyright (c) 2012 LLC "Online Publishing Partners" (onlinepp.ru). All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | //-----------------------------------------------------------------
13 | // interface MultipartMessageHeader
14 | //-----------------------------------------------------------------
15 | enum {
16 | contentTransferEncoding_unknown,
17 | contentTransferEncoding_7bit,
18 | contentTransferEncoding_8bit,
19 | contentTransferEncoding_binary,
20 | contentTransferEncoding_base64,
21 | contentTransferEncoding_quotedPrintable,
22 | };
23 |
24 | @interface MultipartMessageHeader : NSObject {
25 | NSMutableDictionary* fields;
26 | int encoding;
27 | NSString* contentDispositionName;
28 | }
29 | @property (strong,readonly) NSDictionary* fields;
30 | @property (readonly) int encoding;
31 |
32 | - (id) initWithData:(NSData*) data formEncoding:(NSStringEncoding) encoding;
33 | @end
34 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/Mime/MultipartMessageHeaderField.h:
--------------------------------------------------------------------------------
1 |
2 | #import
3 |
4 | //-----------------------------------------------------------------
5 | // interface MultipartMessageHeaderField
6 | //-----------------------------------------------------------------
7 |
8 | @interface MultipartMessageHeaderField : NSObject {
9 | NSString* name;
10 | NSString* value;
11 | NSMutableDictionary* params;
12 | }
13 |
14 | @property (strong, readonly) NSString* value;
15 | @property (strong, readonly) NSDictionary* params;
16 | @property (strong, readonly) NSString* name;
17 |
18 | //- (id) initWithLine:(NSString*) line;
19 | //- (id) initWithName:(NSString*) paramName value:(NSString*) paramValue;
20 |
21 | - (id) initWithData:(NSData*) data contentEncoding:(NSStringEncoding) encoding;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/Responses/HTTPDataResponse.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "HTTPResponse.h"
3 |
4 |
5 | @interface HTTPDataResponse : NSObject
6 | {
7 | NSUInteger offset;
8 | NSData *data;
9 | }
10 |
11 | - (id)initWithData:(NSData *)data;
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/Responses/HTTPDataResponse.m:
--------------------------------------------------------------------------------
1 | #import "HTTPDataResponse.h"
2 | #import "HTTPLogging.h"
3 |
4 | #if ! __has_feature(objc_arc)
5 | #warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
6 | #endif
7 |
8 | // Log levels : off, error, warn, info, verbose
9 | // Other flags: trace
10 | static const int httpLogLevel = HTTP_LOG_LEVEL_OFF; // | HTTP_LOG_FLAG_TRACE;
11 |
12 |
13 | @implementation HTTPDataResponse
14 |
15 | - (id)initWithData:(NSData *)dataParam
16 | {
17 | if((self = [super init]))
18 | {
19 | HTTPLogTrace();
20 |
21 | offset = 0;
22 | data = dataParam;
23 | }
24 | return self;
25 | }
26 |
27 | - (void)dealloc
28 | {
29 | HTTPLogTrace();
30 |
31 | }
32 |
33 | - (UInt64)contentLength
34 | {
35 | UInt64 result = (UInt64)[data length];
36 |
37 | HTTPLogTrace2(@"%@[%p]: contentLength - %llu", THIS_FILE, self, result);
38 |
39 | return result;
40 | }
41 |
42 | - (UInt64)offset
43 | {
44 | HTTPLogTrace();
45 |
46 | return offset;
47 | }
48 |
49 | - (void)setOffset:(UInt64)offsetParam
50 | {
51 | HTTPLogTrace2(@"%@[%p]: setOffset:%lu", THIS_FILE, self, (unsigned long)offset);
52 |
53 | offset = (NSUInteger)offsetParam;
54 | }
55 |
56 | - (NSData *)readDataOfLength:(NSUInteger)lengthParameter
57 | {
58 | HTTPLogTrace2(@"%@[%p]: readDataOfLength:%lu", THIS_FILE, self, (unsigned long)lengthParameter);
59 |
60 | NSUInteger remaining = [data length] - offset;
61 | NSUInteger length = lengthParameter < remaining ? lengthParameter : remaining;
62 |
63 | void *bytes = (void *)([data bytes] + offset);
64 |
65 | offset += length;
66 |
67 | return [NSData dataWithBytesNoCopy:bytes length:length freeWhenDone:NO];
68 | }
69 |
70 | - (BOOL)isDone
71 | {
72 | BOOL result = (offset == [data length]);
73 |
74 | HTTPLogTrace2(@"%@[%p]: isDone - %@", THIS_FILE, self, (result ? @"YES" : @"NO"));
75 |
76 | return result;
77 | }
78 |
79 | @end
80 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/Responses/HTTPDynamicFileResponse.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "HTTPResponse.h"
3 | #import "HTTPAsyncFileResponse.h"
4 |
5 | /**
6 | * This class is designed to assist with dynamic content.
7 | * Imagine you have a file that you want to make dynamic:
8 | *
9 | *
10 | *
11 | * ComputerName Control Panel
12 | * ...
13 | * System Time: SysTime
14 | *
15 | *
16 | *
17 | * Now you could generate the entire file in Objective-C,
18 | * but this would be a horribly tedious process.
19 | * Beside, you want to design the file with professional tools to make it look pretty.
20 | *
21 | * So all you have to do is escape your dynamic content like this:
22 | *
23 | * ...
24 | * %%ComputerName%% Control Panel
25 | * ...
26 | * System Time: %%SysTime%%
27 | *
28 | * And then you create an instance of this class with:
29 | *
30 | * - separator = @"%%"
31 | * - replacementDictionary = { "ComputerName"="Black MacBook", "SysTime"="2010-04-30 03:18:24" }
32 | *
33 | * This class will then perform the replacements for you, on the fly, as it reads the file data.
34 | * This class is also asynchronous, so it will perform the file IO using its own GCD queue.
35 | *
36 | * All keys for the replacementDictionary must be NSString's.
37 | * Values for the replacementDictionary may be NSString's, or any object that
38 | * returns what you want when its description method is invoked.
39 | **/
40 |
41 | @interface HTTPDynamicFileResponse : HTTPAsyncFileResponse
42 | {
43 | NSData *separator;
44 | NSDictionary *replacementDict;
45 | }
46 |
47 | - (id)initWithFilePath:(NSString *)filePath
48 | forConnection:(HTTPConnection *)connection
49 | separator:(NSString *)separatorStr
50 | replacementDictionary:(NSDictionary *)dictionary;
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/Responses/HTTPErrorResponse.h:
--------------------------------------------------------------------------------
1 | #import "HTTPResponse.h"
2 |
3 | @interface HTTPErrorResponse : NSObject {
4 | NSInteger _status;
5 | }
6 |
7 | - (id)initWithErrorCode:(int)httpErrorCode;
8 |
9 | @end
10 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/Responses/HTTPErrorResponse.m:
--------------------------------------------------------------------------------
1 | #import "HTTPErrorResponse.h"
2 |
3 | @implementation HTTPErrorResponse
4 |
5 | -(id)initWithErrorCode:(int)httpErrorCode
6 | {
7 | if ((self = [super init]))
8 | {
9 | _status = httpErrorCode;
10 | }
11 |
12 | return self;
13 | }
14 |
15 | - (UInt64) contentLength {
16 | return 0;
17 | }
18 |
19 | - (UInt64) offset {
20 | return 0;
21 | }
22 |
23 | - (void)setOffset:(UInt64)offset {
24 | ;
25 | }
26 |
27 | - (NSData*) readDataOfLength:(NSUInteger)length {
28 | return nil;
29 | }
30 |
31 | - (BOOL) isDone {
32 | return YES;
33 | }
34 |
35 | - (NSInteger) status {
36 | return _status;
37 | }
38 | @end
39 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/Responses/HTTPFileResponse.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "HTTPResponse.h"
3 |
4 | @class HTTPConnection;
5 |
6 |
7 | @interface HTTPFileResponse : NSObject
8 | {
9 | HTTPConnection *connection;
10 |
11 | NSString *filePath;
12 | UInt64 fileLength;
13 | UInt64 fileOffset;
14 |
15 | BOOL aborted;
16 |
17 | int fileFD;
18 | void *buffer;
19 | NSUInteger bufferSize;
20 | }
21 |
22 | - (id)initWithFilePath:(NSString *)filePath forConnection:(HTTPConnection *)connection;
23 | - (NSString *)filePath;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "HTTPResponse.h"
3 |
4 |
5 | @interface HTTPRedirectResponse : NSObject
6 | {
7 | NSString *redirectPath;
8 | }
9 |
10 | - (id)initWithPath:(NSString *)redirectPath;
11 |
12 | @end
13 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.m:
--------------------------------------------------------------------------------
1 | #import "HTTPRedirectResponse.h"
2 | #import "HTTPLogging.h"
3 |
4 | #if ! __has_feature(objc_arc)
5 | #warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
6 | #endif
7 |
8 | // Log levels : off, error, warn, info, verbose
9 | // Other flags: trace
10 | static const int httpLogLevel = HTTP_LOG_LEVEL_OFF; // | HTTP_LOG_FLAG_TRACE;
11 |
12 |
13 | @implementation HTTPRedirectResponse
14 |
15 | - (id)initWithPath:(NSString *)path
16 | {
17 | if ((self = [super init]))
18 | {
19 | HTTPLogTrace();
20 |
21 | redirectPath = [path copy];
22 | }
23 | return self;
24 | }
25 |
26 | - (UInt64)contentLength
27 | {
28 | return 0;
29 | }
30 |
31 | - (UInt64)offset
32 | {
33 | return 0;
34 | }
35 |
36 | - (void)setOffset:(UInt64)offset
37 | {
38 | // Nothing to do
39 | }
40 |
41 | - (NSData *)readDataOfLength:(NSUInteger)length
42 | {
43 | HTTPLogTrace();
44 |
45 | return nil;
46 | }
47 |
48 | - (BOOL)isDone
49 | {
50 | return YES;
51 | }
52 |
53 | - (NSDictionary *)httpHeaders
54 | {
55 | HTTPLogTrace();
56 |
57 | return [NSDictionary dictionaryWithObject:redirectPath forKey:@"Location"];
58 | }
59 |
60 | - (NSInteger)status
61 | {
62 | HTTPLogTrace();
63 |
64 | return 302;
65 | }
66 |
67 | - (void)dealloc
68 | {
69 | HTTPLogTrace();
70 |
71 | }
72 |
73 | @end
74 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Extensions/WebDAV/DAVConnection.h:
--------------------------------------------------------------------------------
1 | #import "HTTPConnection.h"
2 |
3 | @interface DAVConnection : HTTPConnection {
4 | id requestContentBody;
5 | NSOutputStream* requestContentStream;
6 | }
7 | @end
8 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Extensions/WebDAV/DAVResponse.h:
--------------------------------------------------------------------------------
1 | #import "HTTPResponse.h"
2 |
3 | @interface DAVResponse : NSObject {
4 | @private
5 | UInt64 _offset;
6 | NSMutableDictionary* _headers;
7 | NSData* _data;
8 | NSInteger _status;
9 | }
10 | - (id) initWithMethod:(NSString*)method headers:(NSDictionary*)headers bodyData:(NSData*)body resourcePath:(NSString*)resourcePath rootPath:(NSString*)rootPath;
11 | @end
12 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.h:
--------------------------------------------------------------------------------
1 | #import "HTTPResponse.h"
2 |
3 | @interface DELETEResponse : NSObject {
4 | NSInteger _status;
5 | }
6 | - (id) initWithFilePath:(NSString*)path;
7 | @end
8 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.m:
--------------------------------------------------------------------------------
1 | #import "DELETEResponse.h"
2 | #import "HTTPLogging.h"
3 |
4 | // HTTP methods: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
5 | // HTTP headers: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
6 | // HTTP status codes: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
7 |
8 | static const int httpLogLevel = HTTP_LOG_LEVEL_WARN;
9 |
10 | @implementation DELETEResponse
11 |
12 | - (id) initWithFilePath:(NSString*)path {
13 | if ((self = [super init])) {
14 | BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:path];
15 | if ([[NSFileManager defaultManager] removeItemAtPath:path error:NULL]) {
16 | _status = exists ? 200 : 204;
17 | } else {
18 | HTTPLogError(@"Failed deleting \"%@\"", path);
19 | _status = 404;
20 | }
21 | }
22 | return self;
23 | }
24 |
25 | - (UInt64) contentLength {
26 | return 0;
27 | }
28 |
29 | - (UInt64) offset {
30 | return 0;
31 | }
32 |
33 | - (void)setOffset:(UInt64)offset {
34 | ;
35 | }
36 |
37 | - (NSData*) readDataOfLength:(NSUInteger)length {
38 | return nil;
39 | }
40 |
41 | - (BOOL) isDone {
42 | return YES;
43 | }
44 |
45 | - (NSInteger) status {
46 | return _status;
47 | }
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.h:
--------------------------------------------------------------------------------
1 | #import "HTTPResponse.h"
2 |
3 | @interface PUTResponse : NSObject {
4 | NSInteger _status;
5 | }
6 | - (id) initWithFilePath:(NSString*)path headers:(NSDictionary*)headers bodyData:(NSData*)body;
7 | - (id) initWithFilePath:(NSString*)path headers:(NSDictionary*)headers bodyFile:(NSString*)body;
8 | @end
9 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.m:
--------------------------------------------------------------------------------
1 | #import "PUTResponse.h"
2 | #import "HTTPLogging.h"
3 |
4 | // HTTP methods: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
5 | // HTTP headers: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
6 | // HTTP status codes: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
7 |
8 | static const int httpLogLevel = HTTP_LOG_LEVEL_WARN;
9 |
10 | @implementation PUTResponse
11 |
12 | - (id) initWithFilePath:(NSString*)path headers:(NSDictionary*)headers body:(id)body {
13 | if ((self = [super init])) {
14 | if ([headers objectForKey:@"Content-Range"]) {
15 | HTTPLogError(@"Content-Range not supported for upload to \"%@\"", path);
16 | _status = 400;
17 | } else {
18 | BOOL overwrite = [[NSFileManager defaultManager] fileExistsAtPath:path];
19 | BOOL success;
20 | if ([body isKindOfClass:[NSString class]]) {
21 | [[NSFileManager defaultManager] removeItemAtPath:path error:NULL];
22 | success = [[NSFileManager defaultManager] moveItemAtPath:body toPath:path error:NULL];
23 | } else {
24 | success = [body writeToFile:path atomically:YES];
25 | }
26 | if (success) {
27 | _status = overwrite ? 200 : 201;
28 | } else {
29 | HTTPLogError(@"Failed writing upload to \"%@\"", path);
30 | _status = 403;
31 | }
32 | }
33 | }
34 | return self;
35 | }
36 |
37 | - (id) initWithFilePath:(NSString*)path headers:(NSDictionary*)headers bodyData:(NSData*)body {
38 | return [self initWithFilePath:path headers:headers body:body];
39 | }
40 |
41 | - (id) initWithFilePath:(NSString*)path headers:(NSDictionary*)headers bodyFile:(NSString*)body {
42 | return [self initWithFilePath:path headers:headers body:body];
43 | }
44 |
45 | - (UInt64) contentLength {
46 | return 0;
47 | }
48 |
49 | - (UInt64) offset {
50 | return 0;
51 | }
52 |
53 | - (void) setOffset:(UInt64)offset {
54 | ;
55 | }
56 |
57 | - (NSData*) readDataOfLength:(NSUInteger)length {
58 | return nil;
59 | }
60 |
61 | - (BOOL) isDone {
62 | return YES;
63 | }
64 |
65 | - (NSInteger) status {
66 | return _status;
67 | }
68 |
69 | @end
70 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Software License Agreement (BSD License)
2 |
3 | Copyright (c) 2011, Deusty, LLC
4 | All rights reserved.
5 |
6 | Redistribution and use of this software in source and binary forms,
7 | with or without modification, are permitted provided that the following conditions are met:
8 |
9 | * Redistributions of source code must retain the above
10 | copyright notice, this list of conditions and the
11 | following disclaimer.
12 |
13 | * Neither the name of Deusty nor the names of its
14 | contributors may be used to endorse or promote products
15 | derived from this software without specific prior
16 | written permission of Deusty, LLC.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/README.markdown:
--------------------------------------------------------------------------------
1 | # CocoaHTTPServer
2 |
3 | [](https://travis-ci.org/robbiehanson/CocoaHTTPServer)
4 | [](http://cocoapods.org/?q=CocoaHTTPServer)
5 | []()
6 | [](https://github.com/robbiehanson/CocoaHTTPServer/blob/master/LICENSE)
7 |
8 | CocoaHTTPServer is a small, lightweight, embeddable HTTP server for Mac OS X or iOS applications.
9 |
10 | Sometimes developers need an embedded HTTP server in their app. Perhaps it's a server application with remote monitoring. Or perhaps it's a desktop application using HTTP for the communication backend. Or perhaps it's an iOS app providing over-the-air access to documents. Whatever your reason, CocoaHTTPServer can get the job done. It provides:
11 |
12 | - Built in support for bonjour broadcasting
13 | - IPv4 and IPv6 support
14 | - Asynchronous networking using GCD and standard sockets
15 | - Password protection support
16 | - SSL/TLS encryption support
17 | - Extremely FAST and memory efficient
18 | - Extremely scalable (built entirely upon GCD)
19 | - Heavily commented code
20 | - Very easily extensible
21 | - WebDAV is supported too!
22 |
23 |
24 | Can't find the answer to your question in any of the [wiki](https://github.com/robbiehanson/CocoaHTTPServer/wiki) articles? Try the **[mailing list](http://groups.google.com/group/cocoahttpserver)**.
25 |
26 |
27 | Love the project? Wanna buy me a coffee? (or a beer :D) [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BHF2DJRETGV5S)
28 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Vendor/CocoaAsyncSocket/About.txt:
--------------------------------------------------------------------------------
1 | The CocoaAsyncSocket project is under Public Domain license.
2 | http://code.google.com/p/cocoaasyncsocket/
3 |
4 | The AsyncSocket project has been around since 2001 and is used in many applications and frameworks.
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Vendor/CocoaLumberjack/About.txt:
--------------------------------------------------------------------------------
1 | CocoaLumberjack is under the New BSD License.
2 | https://github.com/robbiehanson/CocoaLumberjack
3 |
4 | Extensive documentation, tutorials, etc are available:
5 | https://github.com/robbiehanson/CocoaLumberjack/wiki
6 |
7 | Overview of the project (copied from google code homepage):
8 |
9 |
10 |
11 | The lumberjack framework is fast & simple, yet powerful & flexible.
12 | It is similar in concept to other popular logging frameworks such as log4j, yet is designed specifically for objective-c, and takes advantage of features such as multi-threading, grand central dispatch (if available), lockless atomic operations, and the dynamic nature of the objective-c runtime.
13 |
14 | Lumberjack is fast:
15 | In most cases it is an order of magnitude faster than NSLog.
16 |
17 | Lumberjack is simple:
18 | It takes as little as a single line of code to configure lumberjack when your application launches. Then simply replace your NSLog statements with DDLog statements and that's about it. (And the DDLog macros have the exact same format and syntax as NSLog, so it's super easy.)
19 |
20 | Lumberjack is powerful:
21 | One log statement can be sent to multiple loggers, meaning you can log to a file and the console simultaneously. Want more? Create your own loggers (it's easy) and send your log statements over the network. Or to a database or distributed file system. The sky is the limit.
22 |
23 | Lumberjack is flexible:
24 | Configure your logging however you want. Change log levels per file (perfect for debugging). Change log levels per logger (verbose console, but concise log file). Change log levels per xcode configuration (verbose debug, but concise release). Have your log statements compiled out of the release build. Customize the number of log levels for your application. Add your own fine-grained logging. Dynamically change log levels during runtime. Choose how & when you want your log files to be rolled. Upload your log files to a central server. Compress archived log files to save disk space...
25 |
26 |
27 |
28 | This framework is for you if:
29 |
30 | You're looking for a way to track down that impossible-to-reproduce bug that keeps popping up in the field.
31 | You're frustrated with the super short console log on the iPhone.
32 | You're looking to take your application to the next level in terms of support and stability.
33 | You're looking for an enterprise level logging solution for your application (Mac or iPhone).
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Vendor/CocoaLumberjack/DDASLLogger.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #import "DDLog.h"
5 |
6 | /**
7 | * Welcome to Cocoa Lumberjack!
8 | *
9 | * The project page has a wealth of documentation if you have any questions.
10 | * https://github.com/robbiehanson/CocoaLumberjack
11 | *
12 | * If you're new to the project you may wish to read the "Getting Started" wiki.
13 | * https://github.com/robbiehanson/CocoaLumberjack/wiki/GettingStarted
14 | *
15 | *
16 | * This class provides a logger for the Apple System Log facility.
17 | *
18 | * As described in the "Getting Started" page,
19 | * the traditional NSLog() function directs it's output to two places:
20 | *
21 | * - Apple System Log
22 | * - StdErr (if stderr is a TTY) so log statements show up in Xcode console
23 | *
24 | * To duplicate NSLog() functionality you can simply add this logger and a tty logger.
25 | * However, if you instead choose to use file logging (for faster performance),
26 | * you may choose to use a file logger and a tty logger.
27 | **/
28 |
29 | @interface DDASLLogger : DDAbstractLogger
30 | {
31 | aslclient client;
32 | }
33 |
34 | + (DDASLLogger *)sharedInstance;
35 |
36 | // Inherited from DDAbstractLogger
37 |
38 | // - (id )logFormatter;
39 | // - (void)setLogFormatter:(id )formatter;
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Vendor/CocoaLumberjack/Extensions/ContextFilterLogFormatter.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "DDLog.h"
3 |
4 | @class ContextFilterLogFormatter;
5 |
6 | /**
7 | * Welcome to Cocoa Lumberjack!
8 | *
9 | * The project page has a wealth of documentation if you have any questions.
10 | * https://github.com/robbiehanson/CocoaLumberjack
11 | *
12 | * If you're new to the project you may wish to read the "Getting Started" page.
13 | * https://github.com/robbiehanson/CocoaLumberjack/wiki/GettingStarted
14 | *
15 | *
16 | * This class provides a log formatter that filters log statements from a logging context not on the whitelist.
17 | *
18 | * A log formatter can be added to any logger to format and/or filter its output.
19 | * You can learn more about log formatters here:
20 | * https://github.com/robbiehanson/CocoaLumberjack/wiki/CustomFormatters
21 | *
22 | * You can learn more about logging context's here:
23 | * https://github.com/robbiehanson/CocoaLumberjack/wiki/CustomContext
24 | *
25 | * But here's a quick overview / refresher:
26 | *
27 | * Every log statement has a logging context.
28 | * These come from the underlying logging macros defined in DDLog.h.
29 | * The default logging context is zero.
30 | * You can define multiple logging context's for use in your application.
31 | * For example, logically separate parts of your app each have a different logging context.
32 | * Also 3rd party frameworks that make use of Lumberjack generally use their own dedicated logging context.
33 | **/
34 | @interface ContextWhitelistFilterLogFormatter : NSObject
35 |
36 | - (id)init;
37 |
38 | - (void)addToWhitelist:(int)loggingContext;
39 | - (void)removeFromWhitelist:(int)loggingContext;
40 |
41 | - (NSArray *)whitelist;
42 |
43 | - (BOOL)isOnWhitelist:(int)loggingContext;
44 |
45 | @end
46 |
47 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
48 | #pragma mark -
49 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
50 |
51 | /**
52 | * This class provides a log formatter that filters log statements from a logging context on the blacklist.
53 | **/
54 | @interface ContextBlacklistFilterLogFormatter : NSObject
55 |
56 | - (id)init;
57 |
58 | - (void)addToBlacklist:(int)loggingContext;
59 | - (void)removeFromBlacklist:(int)loggingContext;
60 |
61 | - (NSArray *)blacklist;
62 |
63 | - (BOOL)isOnBlacklist:(int)loggingContext;
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Lib/CocoaHTTPServer/Vendor/CocoaLumberjack/Extensions/README.txt:
--------------------------------------------------------------------------------
1 | This folder contains some sample formatters that may be helpful.
2 |
3 | Feel free to change them, extend them, or use them as the basis for your own custom formatter(s).
4 |
5 | More information about creating your own custom formatters can be found on the wiki:
6 | https://github.com/robbiehanson/CocoaLumberjack/wiki/CustomFormatters
7 |
8 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayControlBar/CommonView/SelectView/GAPlayerSelectTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerSelectTableViewCell.h
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/2.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GAPlayerSelectTableViewCell : UITableViewCell
12 |
13 | + (GAPlayerSelectTableViewCell *)cellWithTableView:(UITableView *)tableView;
14 |
15 | @property (nonatomic, assign) BOOL isLastLow;
16 |
17 | - (void)setObject:(id)object;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayControlBar/CommonView/SelectView/GAPlayerSelectVIewModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerSelectVIewModel.h
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/2.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef void(^GAPlayerSelectVIewModelSelectBlock)(void);
12 |
13 | @interface GAPlayerSelectVIewModel : NSObject
14 |
15 | @property (nonatomic, strong) GAPlayerSelectVIewModelSelectBlock selectBlock;
16 |
17 | @property (nonatomic, strong) NSString *selectName;
18 |
19 | @property (nonatomic, strong) NSString *selectValue;
20 |
21 | @property (nonatomic, strong) NSString *selectType;
22 |
23 | @property (nonatomic, assign) BOOL isSelect;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayControlBar/CommonView/SelectView/GAPlayerSelectVIewModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerSelectVIewModel.m
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/2.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GAPlayerSelectVIewModel.h"
10 |
11 | @implementation GAPlayerSelectVIewModel
12 |
13 | - (void)setIsSelect:(BOOL)isSelect {
14 | _isSelect = isSelect;
15 | if (self.selectBlock) {
16 | self.selectBlock();
17 | }
18 | }
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayControlBar/CommonView/SelectView/GAPlayerSelectView.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerSelectView.h
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/2.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GAPlayerSelectVIewModel.h"
11 |
12 | typedef void(^GAPlayerSelectViewBlock)(GAPlayerSelectVIewModel *selectModel);
13 |
14 | @interface GAPlayerSelectView : UIView
15 |
16 | @property (nonatomic, strong) GAPlayerSelectViewBlock selectViewBlock;
17 |
18 | - (void)setObject:(id)object;
19 |
20 | - (void)outsideOption:(NSString *)selectName;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayControlBar/CommonView/SpeedAnimation/BounceButton/ASOBounceButtonViewDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // ASOBounceButtonViewDelegate.h
3 | // ASOAnimatedButton
4 | //
5 | // Created by Agus Soedibjo on 27/2/14.
6 | // Copyright (c) 2014 Agus Soedibjo. All rights reserved.
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 |
26 | #import
27 |
28 | @protocol ASOBounceButtonViewDelegate
29 |
30 | @optional
31 |
32 | /**
33 | * Delegation method of ASOBounceButtonView, which will be called when each bounce button defined in ASOBounceButtonView instance is tapped
34 | *
35 | * @param index Bounce button index to identify which bounce button is tapped
36 | */
37 | - (void)didSelectBounceButtonAtIndex:(NSUInteger)index;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayControlBar/PlayControlBar_Boom/GAPlayControlBar_BoomView.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayControlBar_BoomView.h
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/1.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ASOTwoStateButton.h"
11 |
12 | /**
13 | * 当前文件下载的状态
14 | */
15 | typedef NS_ENUM(NSUInteger, BoomControlBarSliderType) {
16 | /** 开始滑动 */
17 | kBoomControlBarSliderTypeBeginAction = 0,
18 | /** 滑动中 */
19 | kBoomControlBarSliderTypeDidChanged,
20 | /** 结束滑动 */
21 | kBoomControlBarSliderTypeEndAction,
22 | /** 跳转 */
23 | kBoomControlBarSliderTypeJumpAction
24 | };
25 |
26 | /**
27 | * 当前文件下载的状态
28 | */
29 | typedef NS_ENUM(NSUInteger, BoomControlBarType) {
30 | /** 播放/暂停 */
31 | kBoomControlBarTypePlay = 2,
32 | /** 快进 */
33 | kBoomControlBarTypeForword,
34 | /** 清晰度 */
35 | kBoomControlBarTypeClearity,
36 | /** 放大/缩小 */
37 | kBoomControlBarTypeScale,
38 | /** 倍速 */
39 | kBoomControlBarTypeSpeed,
40 | /** 下载 */
41 | kBoomControlBarTypeDownload,
42 | /** 章节 */
43 | kBoomControlBarTypeChapter,
44 | /** 讲义 */
45 | kBoomControlBarTypeNote
46 | };
47 |
48 | typedef void (^ControlBar_BoomClickBlock)(BoomControlBarType barType);
49 | typedef void (^ControlBar_BoomSilderBlock)(BoomControlBarSliderType sliderType,CGFloat sliderValue);
50 |
51 | @interface GAPlayControlBar_BoomView : UIView
52 |
53 | /*
54 | 播放进度slider
55 | */
56 | @property (nonatomic,strong)UISlider * playProgressSliderView;
57 |
58 | /**
59 | 按钮回调
60 | */
61 | @property (nonatomic, strong) ControlBar_BoomClickBlock clickBlock;
62 |
63 | /**
64 | silder回调
65 | */
66 | @property (nonatomic, strong) ControlBar_BoomSilderBlock silderBlock;
67 |
68 | /**
69 | 是否是横屏
70 | */
71 | @property (nonatomic, assign) BOOL isFullScreen;
72 |
73 | /**
74 | 是否在播放
75 | */
76 | @property (nonatomic, assign) BOOL isPlay;
77 |
78 | /**
79 | * 速率Btn
80 | */
81 | @property (nonatomic, strong) ASOTwoStateButton *speedBtn;
82 |
83 | /**
84 | * 刷新 播放进度 和缓存进度 UI
85 | */
86 | - (void)reloadSilder:(CGFloat)silderValue totalTime:(NSInteger)totalTime buffeValue:(CGFloat)buffeValue;
87 |
88 | /**
89 | * 刷新清晰度 UI
90 | */
91 | - (void)reloadClearityBtnWith:(NSString *)clearity;
92 |
93 | /**
94 | * 刷新倍速 UI
95 | */
96 | - (void)reloadSpeedBtnWith:(NSString *)speed;
97 |
98 | /**
99 | * 刷新下载状态 UI
100 | */
101 | - (void)reloadDownloadStateWith:(NSInteger)downloadState;
102 |
103 | /**
104 | * 重置
105 | */
106 | - (void)reset;
107 |
108 | @end
109 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayControlBar/PlayControlBar_Top/GAPlayControlBar_TopView.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayControlBar_TopView.h
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/3.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef void (^ControlBar_TopClickBlock)(void);
12 |
13 | @interface GAPlayControlBar_TopView : UIView
14 |
15 | /**
16 | 是否是横屏
17 | */
18 | @property (nonatomic, assign) BOOL isFullScreen;
19 |
20 | @property (nonatomic, copy) NSString *videoTitle;
21 |
22 | @property (nonatomic, strong) ControlBar_TopClickBlock clickBlock;
23 |
24 | - (void)smallHiden:(BOOL)hid;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Player/AVPlayer/GAAVPlayer.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAAVPlayer.h
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/13.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "PlayerProtocol.h"
11 |
12 | @interface GAAVPlayer : NSObject
13 |
14 | @property (nonatomic, weak) id callBackDelegate;
15 |
16 | @property (nonatomic, assign) PlayerState playerState;
17 |
18 | @property (nonatomic, assign) UIView *playView;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Player/Handle/PlayerProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // PlayerProtocol.h
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/7/31.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GAPlayerModel.h"
11 |
12 | /**
13 | * 当前文件下载的状态
14 | */
15 | typedef NS_ENUM(NSUInteger, PlayerState) {
16 | /** 未知状态 */
17 | kPlayerStateUnkonw = 0,
18 | /** 缓存中 */
19 | kPlayerStateCacheing,
20 | /** 缓存完毕 即将进入播放 */
21 | kPlayerStateReady,
22 | /** 播放中 */
23 | kPlayerStatePlaying,
24 | /** 暂停 */
25 | kPlayerStatePause,
26 | /** 播放停止 */
27 | kPlayerStateStop,
28 | /** 播放失败 */
29 | kPlayerStateFailure,
30 | /** 播放完成 */
31 | kPlayerStateFinish
32 | };
33 |
34 | @protocol PlayerCallBackDelegate
35 |
36 | @optional
37 | /**
38 | * 播放进度回调
39 | */
40 | - (void)playbackProgressCallback:(NSTimeInterval)totalDuration
41 | currentPlaybackTime:(NSTimeInterval)currentPlaybackTime
42 | playableDuration:(NSTimeInterval)playableDuration;
43 |
44 | /**
45 | * 播放状态回调
46 | */
47 | - (void)playbackStatusCallback:(PlayerState)playerState;
48 |
49 | @end
50 |
51 | @protocol PlayerProtocol
52 |
53 | @property (nonatomic, weak) id callBackDelegate;
54 |
55 | @property (nonatomic, assign) PlayerState playerState;
56 |
57 | /**
58 | * 初始化播放器
59 | */
60 | - (instancetype)initWith:(UIView *)playView;
61 |
62 | /**
63 | * 改变播放器数据源
64 | */
65 | - (void)setThePlayerDataSource:(GAPlayerModel *)playerModel;
66 |
67 | /**
68 | * 播放
69 | */
70 | - (void)play;
71 |
72 | /**
73 | * 暂停
74 | */
75 | - (void)pause;
76 |
77 | /**
78 | * 关闭播放器
79 | */
80 | - (void)stop;
81 |
82 | /**
83 | * 切换倍速
84 | */
85 | - (void)switchingTimesSpeed:(CGFloat)speed;
86 |
87 | /**
88 | * 跳转进度
89 | */
90 | - (void)playFromNowOnWithSchedule:(CGFloat)seekTime;
91 |
92 | /**
93 | * 改变播放器view的frame
94 | */
95 | - (void)makeProgressPlayerViewFrame:(CGRect)frame;
96 |
97 | /**
98 | * 设置视频后台播放
99 | */
100 | - (void)setVideoPlayTheBackground:(BOOL)isBackPlay;
101 |
102 | @end
103 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Player/IJKPlayer/GAIJKPlayer.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAIJKPlayer.h
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/1.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GAPlayerModel.h"
11 | #import "PlayerProtocol.h"
12 |
13 | @interface GAIJKPlayer : NSObject
14 |
15 | @property (nonatomic, weak) id callBackDelegate;
16 |
17 | @property (nonatomic, assign) PlayerState playerState;
18 |
19 | @property (nonatomic, assign) UIView *playView;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Player/Model/GAPlayerModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerModel.h
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/7/31.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface GAPlayerModel : NSObject
13 |
14 | @property (nonatomic, copy) NSString *playURL;
15 |
16 | @property (nonatomic, assign) CGRect playerFrame;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/Player/Model/GAPlayerModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerModel.m
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/7/31.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GAPlayerModel.h"
10 |
11 | @implementation GAPlayerModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayerView/CommonView/CMPlayerBrightnessView.h:
--------------------------------------------------------------------------------
1 | //
2 | // PlayerBrightnessView.h
3 | // AvPlayerDemo
4 | //
5 | // Created by wihan on 15/11/5.
6 | // Copyright © 2015年 wihan. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CMPlayerBrightnessView : UIView
12 |
13 | @property (nonatomic, strong)UIImageView *brightnessView;
14 | @property (nonatomic, strong)UIProgressView *brightnessProgress;
15 |
16 | /**
17 | * 设置调节亮度
18 | */
19 | @property (nonatomic, assign) float progress;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayerView/CommonView/CMPlayerTimeView.h:
--------------------------------------------------------------------------------
1 | //
2 | // PlayerTimeView.h
3 | // AvPlayerDemo
4 | //
5 | // Created by wihan on 15/10/27.
6 | // Copyright © 2015年 wihan. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CMPlayerTimeView : UIView
12 |
13 | @property (nonatomic,copy)NSString * timeString;
14 | @property (nonatomic,assign)CGFloat progressValue;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayerView/CommonView/GALoadingView.h:
--------------------------------------------------------------------------------
1 | //
2 | // GALoadingView.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/27.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface GALoadingView : UIView
14 |
15 | - (void)startAnimating;
16 |
17 | - (void)stopAnimating;
18 |
19 | @end
20 |
21 | NS_ASSUME_NONNULL_END
22 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayerView/CommonView/GALoadingView.m:
--------------------------------------------------------------------------------
1 | //
2 | // GALoadingView.m
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/27.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GALoadingView.h"
10 |
11 | @interface GALoadingView ()
12 |
13 | // 加载框
14 | @property (nonatomic, strong) UIActivityIndicatorView *activity;
15 |
16 | @end
17 |
18 | @implementation GALoadingView
19 |
20 | - (instancetype)init {
21 | if (self = [super init]) {
22 | self.backgroundColor = [UIColor blackColor];
23 | self.alpha = 0.6;
24 | [self setupView];
25 | }
26 | return self;
27 | }
28 |
29 | - (void)setupView {
30 | [self addSubview:self.activity];
31 | }
32 |
33 | - (void)setupLayout {
34 | CGFloat width = self.frame.size.width;
35 | CGFloat height = self.frame.size.height;
36 | self.activity.frame = CGRectMake((width - 30) * 0.5, (height - 30) * 0.5, 30, 30);
37 | }
38 |
39 | - (void)startAnimating {
40 | [self setupLayout];
41 | [self.activity startAnimating];
42 | self.hidden = NO;
43 | }
44 |
45 | - (void)stopAnimating {
46 | [self.activity stopAnimating];
47 | self.hidden = YES;
48 | }
49 |
50 | - (UIActivityIndicatorView *)activity {
51 | if (!_activity) {
52 | _activity = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
53 | }
54 | return _activity;
55 | }
56 |
57 | @end
58 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayerView/CommonView/GAPlayerAdAlertView.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerAdAlertView.h
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/8.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GAPlayerAdAlertView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayerView/CommonView/GAPlayerAdAlertView.m:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerAdAlertView.m
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/8.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GAPlayerAdAlertView.h"
10 |
11 | @interface GAPlayerAdAlertView ()
12 |
13 | @property (nonatomic, strong) UILabel *countdownLbl;
14 |
15 | @end
16 |
17 | @implementation GAPlayerAdAlertView
18 |
19 |
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayerView/GAPlayerItemModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerItemModel.h
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/2.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /**
12 | * 手势类型
13 | */
14 | typedef NS_ENUM(NSUInteger, PlayUrlType) {
15 | /** 正文内容 */
16 | kPlayUrlTypeBody = 0,
17 | /** 头部广告 */
18 | kPlayUrlTypeBeginAd = 1,
19 | /** 结尾广告 */
20 | kPlayUrlTypeEndAd = 2
21 | };
22 |
23 |
24 | @interface GAPlayerItemModel : NSObject
25 |
26 | /**
27 | 播放id
28 | */
29 | @property (nonatomic, strong) NSString *videoId;
30 |
31 | /**
32 | 当前播放地址
33 | */
34 | @property (nonatomic, strong) NSString *currentClaritUrl;
35 |
36 | /**
37 | 当前播放清晰度
38 | */
39 | @property (nonatomic, strong) NSString *currentClaritName;
40 |
41 | /**
42 | 当前播放倍速
43 | */
44 | @property (nonatomic, strong) NSString *currentSpeed;
45 |
46 | /**
47 | 播放类型
48 | */
49 | @property (nonatomic, assign) PlayUrlType playUrlType;
50 |
51 | /**
52 | 是否需要滑动
53 | */
54 | @property (nonatomic, assign) BOOL isDrag;
55 |
56 | /**
57 | 是否在线
58 | */
59 | @property (nonatomic, assign) BOOL isOnline;
60 |
61 | /**
62 | 清晰度数组
63 | */
64 | @property (nonatomic, strong) NSArray *claritList;
65 |
66 | /**
67 | 清晰度数组
68 | */
69 | @property (nonatomic, strong) NSArray *speedList;
70 |
71 | /**
72 | 播放视频名称
73 | */
74 | @property (nonatomic, copy) NSString *hasVideoTitle;
75 |
76 | /**
77 | 视频总时长
78 | */
79 | @property (nonatomic, assign) NSTimeInterval totalInterval;
80 |
81 | /**
82 | 注意:此只为 记录 切换清晰度时的播放进度
83 | */
84 | @property (nonatomic, assign) NSTimeInterval currentInterval;
85 |
86 | /**
87 | 片头广告
88 | */
89 | @property (nonatomic, strong) NSString *beginningAdUrl;
90 |
91 | /**
92 | 片尾广告
93 | */
94 | @property (nonatomic, strong) NSString *endingAdUrl;
95 |
96 | @end
97 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayerView/GAPlayerItemModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerItemModel.m
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/2.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GAPlayerItemModel.h"
10 |
11 | @implementation GAPlayerItemModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayerView/GAPlayerView+GANetworkProcess.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerView+GANetworkProcess.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/30.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GAPlayerView.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface GAPlayerView (GANetworkProcess)
14 |
15 | - (void)startNetworkProcess;
16 |
17 | - (void)stopNetworkProcess;
18 |
19 | @end
20 |
21 | NS_ASSUME_NONNULL_END
22 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayerView/GAPlayerView+GANetworkProcess.m:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerView+GANetworkProcess.m
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/30.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GAPlayerView+GANetworkProcess.h"
10 | #import "CENetMonitorManger.h"
11 |
12 | @implementation GAPlayerView (GANetworkProcess)
13 |
14 | #pragma mark - public
15 | - (void)startNetworkProcess {
16 | [[CENetMonitorManger sharedInstance] addNetworkChangeBlock:^(NetworkMonitorType monitorType) {
17 |
18 | } idClass:@"CENetMonitorManger"];
19 | }
20 |
21 | - (void)stopNetworkProcess {
22 | [[CENetMonitorManger sharedInstance] removeNetMonitorBlcokWithIdClass:@"CENetMonitorManger"];
23 | }
24 |
25 | #pragma mark - private
26 | - (void)makeProgressNetworkProcess:(NetworkMonitorType)monitorType {
27 | if (monitorType == kNetMonTypeUnAble) {
28 |
29 | } else if (monitorType == kNetMonTypeWWAN) {
30 |
31 | } else if (monitorType == kNetMonTypeWiFi) {
32 |
33 | }
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayerView/GAPlayerView+GestureAction.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerView+GestureAction.h
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/6.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GAPlayerView.h"
10 |
11 | @interface GAPlayerView (GestureAction)
12 |
13 | /**
14 | 注册手势
15 | */
16 | - (void)registerForGestureEvents:(void(^)(GsetureType gsetureType,CGFloat moveValue))gsetureBlock;
17 |
18 | /**
19 | 开启/恢复 手势
20 | */
21 | - (void)startForGestureEvents;
22 |
23 | /**
24 | 取消手势
25 | */
26 | - (void)cancelForGestureEvents;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayerView/GAPlayerViewModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerViewModel.h
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/2.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GAPlayerItemModel.h"
11 | #import
12 | #import "GAPlayerModel.h"
13 |
14 | @interface GAPlayerViewModel : NSObject
15 |
16 | @property (nonatomic, strong) GAPlayerItemModel *curItemModel;
17 |
18 | /**
19 | 解析外界数据
20 | */
21 | - (void)thePlayerParsesTheData:(NSDictionary *)dataDict successBlock:(void(^)(BOOL success,id object))successBlock;
22 |
23 | /**
24 | 根据 playerItemModel 获得播放model
25 | */
26 | - (GAPlayerModel *)makeProgressPlayerModelWith:(GAPlayerItemModel *)playerItemModel;
27 |
28 | /**
29 | 组织 playerItemModel 中倍速的数据
30 | */
31 | - (void)makeProgressSpeedList:(GAPlayerItemModel *)playerItemModel;
32 |
33 | /**
34 | 处理亮度改变的数据
35 | */
36 | - (CGFloat)makeProgressGestureBrightnessChange:(CGFloat)moveValue;
37 |
38 | /**
39 | 处理音量改变的数据
40 | */
41 | - (CGFloat)makeProgressGestureVolumeChange:(CGFloat)moveValue playHigh:(CGFloat)high;
42 |
43 | /**
44 | 处理进度改变的数据
45 | */
46 | - (CGFloat)makeProgressGestureProgressChange:(CGFloat)moveValue
47 | currentWidth:(CGFloat)currentWidth
48 | currentValue:(CGFloat)currentValue;
49 |
50 | /**
51 | 处理当前播放地址
52 | */
53 | - (NSString *)makeProgressCurrentPlayerUrl:(GAPlayerItemModel *)playerItemModel;
54 |
55 | /**
56 | 判断是否有视频需要继续播放
57 | */
58 | - (BOOL)judgeVideoNeedContinueToPlayed:(GAPlayerItemModel *)playerItemModel;
59 |
60 | /**
61 | 处理广告倒计时
62 | */
63 | - (NSString *)processAdCountdown:(NSTimeInterval)totalDuration currentPlaybackTime:(NSTimeInterval)currentPlaybackTime ;
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayerView/Tool/GAPlayerTool.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerTool.h
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/1.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GAPlayerTool : NSObject
12 |
13 | + (NSString *)convertPlayTimeToString:(double)time;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayerView/Tool/GAPlayerTool.m:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerTool.m
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/1.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GAPlayerTool.h"
10 |
11 | @implementation GAPlayerTool
12 |
13 | /**
14 | * 转换时间
15 | */
16 | + (NSString *)convertPlayTimeToString:(double)time
17 | {
18 | //转成秒数
19 | NSDate *currentDate = [NSDate dateWithTimeIntervalSince1970:time];
20 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
21 | [formatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
22 |
23 | [formatter setDateFormat:(time/3600>=1)? @"hh:mm:ss":@"mm:ss"];
24 | NSString *currentTimeStr = [formatter stringFromDate:currentDate];
25 | return currentTimeStr;
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/GAPlayer/Class/PlayView/PlayerView/Tool/SomehowTheScreen/UIView+SomehowTheScreen.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+SomehowTheScreen.h
3 | // SomehowTheScreen
4 | //
5 | // Created by 宫傲 on 2018/8/2.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface UIView (SomehowTheScreen)
13 |
14 | /**
15 | 注册横竖屏的回调
16 | */
17 | - (void)registerLandscapeCallBack:(void(^)(UIInterfaceOrientation deviceOrientation,UIInterfaceOrientation statusBarOrientation))directionChangeBlcok;
18 |
19 | /**
20 | 将屏幕转向指定方向
21 | */
22 | - (void)toOrientation:(UIInterfaceOrientation)deviceOrientation;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Tool/NSObject+GABackgroundMonitoring.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+GABackgroundMonitoring.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/11/14.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | typedef void(^BackgroundMonitoringBlock)(BOOL isBackground);
14 |
15 | @interface NSObject (GABackgroundMonitoring)
16 |
17 | /**
18 | 注册进入后台 进入前台事件
19 | */
20 | - (void)registergroundBlock:(void(^)(BOOL isBackground))monitoringBlock;
21 |
22 | /**
23 | 继续前后台监听
24 | */
25 | - (void)resumegroundListen;
26 |
27 | /**
28 | 暂停前后台监听
29 | */
30 | - (void)pausegroundListen;
31 |
32 | @end
33 |
34 | NS_ASSUME_NONNULL_END
35 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Tool/NetworkMonitoring/CENetMonitorManger.h:
--------------------------------------------------------------------------------
1 | //
2 | // CENetMonitorManger.h
3 | // DongAoAcc
4 | //
5 | // Created by 宫傲 on 2018/8/29.
6 | // Copyright © 2018年 wihan. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /**
12 | * 网络类型
13 | */
14 | typedef NS_ENUM(NSUInteger, NetworkMonitorType) {
15 | /** 断网 */
16 | kNetMonTypeUnAble = 0,
17 | /** 移动网络 */
18 | kNetMonTypeWWAN,
19 | /** wifi */
20 | kNetMonTypeWiFi
21 | };
22 |
23 | /**
24 | * 网络变化的类型
25 | */
26 | typedef NS_ENUM(NSUInteger, NetworkChangeType) {
27 | /** WiFi -> 移动网络 */
28 | kNetChaTypeWiToWW = 0,
29 | /** WiFi -> 断网 */
30 | kNetChaTypeWiToUA,
31 | /** 移动网络 -> 断网 */
32 | kNetChaTypeWWToUA,
33 | /** 断网 -> 移动网络 */
34 | kNetChaTypeUAToWW
35 | };
36 |
37 | typedef void(^CENetMonNetworkChangeBlock)(NetworkMonitorType monitorType);
38 |
39 | @interface CENetMonitorManger : NSObject
40 |
41 | @property (nonatomic, assign) BOOL allowWwanDownload;
42 |
43 | + (instancetype)sharedInstance;
44 |
45 | /**
46 | * 开启监听
47 | */
48 | - (void)startMonitor;
49 |
50 | /**
51 | * 添加网络变化回调
52 | */
53 | - (void)addNetworkChangeBlock:(CENetMonNetworkChangeBlock)networkChangeBlock
54 | idClass:(NSString *)idClass;
55 |
56 | /**
57 | * 删除回调
58 | */
59 | - (void)removeNetMonitorBlcokWithIdClass:(NSString *)idClass;
60 |
61 | /**
62 | * 获取当前网络环境
63 | */
64 | - (NetworkMonitorType)acquisitionNetworkEnvironment;
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Tool/PublicParamTool/GAPublicParamTool.h:
--------------------------------------------------------------------------------
1 | //
2 | // GAPublicParamTool.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/27.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #define kIsPlaying @"isPlaying"
12 |
13 | @interface GAPublicParamTool : NSObject
14 |
15 | //是否正在播放
16 | @property (nonatomic, assign) BOOL isPlaying;
17 |
18 | + (instancetype)sharedInstance;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/GAPlayer/Class/Tool/PublicParamTool/GAPublicParamTool.m:
--------------------------------------------------------------------------------
1 | //
2 | // GAPublicParamTool.m
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/27.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "GAPublicParamTool.h"
10 |
11 | @implementation GAPublicParamTool
12 |
13 | + (instancetype)sharedInstance {
14 | static dispatch_once_t onceToken;
15 | static GAPublicParamTool *sharedInstance;
16 | dispatch_once(&onceToken, ^{
17 | sharedInstance = [[GAPublicParamTool alloc] init];
18 | });
19 | return sharedInstance;
20 | }
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/GAPlayer/Framework/AFNetworking/AFNetworking.h:
--------------------------------------------------------------------------------
1 | // AFNetworking.h
2 | //
3 | // Copyright (c) 2013 AFNetworking (http://afnetworking.com/)
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in
13 | // all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | // THE SOFTWARE.
22 |
23 | #import
24 | #import
25 |
26 | #ifndef _AFNETWORKING_
27 | #define _AFNETWORKING_
28 |
29 | #import "AFURLRequestSerialization.h"
30 | #import "AFURLResponseSerialization.h"
31 | #import "AFSecurityPolicy.h"
32 | #import "AFNetworkReachabilityManager.h"
33 |
34 | #import "AFURLConnectionOperation.h"
35 | #import "AFHTTPRequestOperation.h"
36 | #import "AFHTTPRequestOperationManager.h"
37 |
38 | #if ( ( defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || \
39 | ( defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 ) )
40 | #import "AFURLSessionManager.h"
41 | #import "AFHTTPSessionManager.h"
42 | #endif
43 |
44 | #endif /* _AFNETWORKING_ */
45 |
--------------------------------------------------------------------------------
/GAPlayer/Framework/FBKVOController/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 | FMWK
17 | CFBundleShortVersionString
18 | 1.2.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.2.0
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/GAPlayer/Framework/FBKVOController/KVOController.h:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright (c) 2014-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
--------------------------------------------------------------------------------
/GAPlayer/Framework/FBKVOController/NSObject+FBKVOController.h:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright (c) 2014-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "FBKVOController.h"
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | Category that adds built-in `KVOController` and `KVOControllerNonRetaining` on any instance of `NSObject`.
18 |
19 | This makes it convenient to simply create and forget a `FBKVOController`,
20 | and when this object gets dealloc'd, so will the associated controller and the observation info.
21 | */
22 | @interface NSObject (FBKVOController)
23 |
24 | /**
25 | @abstract Lazy-loaded FBKVOController for use with any object
26 | @return FBKVOController associated with this object, creating one if necessary
27 | @discussion This makes it convenient to simply create and forget a FBKVOController, and when this object gets dealloc'd, so will the associated controller and the observation info.
28 | */
29 | @property (nonatomic, strong) FBKVOController *KVOController;
30 |
31 | /**
32 | @abstract Lazy-loaded FBKVOController for use with any object
33 | @return FBKVOController associated with this object, creating one if necessary
34 | @discussion This makes it convenient to simply create and forget a FBKVOController.
35 | Use this version when a strong reference between controller and observed object would create a retain cycle.
36 | When not retaining observed objects, special care must be taken to remove observation info prior to deallocation of the observed object.
37 | */
38 | @property (nonatomic, strong) FBKVOController *KVOControllerNonRetaining;
39 |
40 | @end
41 |
42 | NS_ASSUME_NONNULL_END
43 |
--------------------------------------------------------------------------------
/GAPlayer/Framework/FBKVOController/NSObject+FBKVOController.m:
--------------------------------------------------------------------------------
1 | /**
2 | Copyright (c) 2014-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "NSObject+FBKVOController.h"
11 |
12 | #import
13 |
14 | #if !__has_feature(objc_arc)
15 | #error This file must be compiled with ARC. Convert your project to ARC or specify the -fobjc-arc flag.
16 | #endif
17 |
18 | #pragma mark NSObject Category -
19 |
20 | NS_ASSUME_NONNULL_BEGIN
21 |
22 | static void *NSObjectKVOControllerKey = &NSObjectKVOControllerKey;
23 | static void *NSObjectKVOControllerNonRetainingKey = &NSObjectKVOControllerNonRetainingKey;
24 |
25 | @implementation NSObject (FBKVOController)
26 |
27 | - (FBKVOController *)KVOController
28 | {
29 | id controller = objc_getAssociatedObject(self, NSObjectKVOControllerKey);
30 |
31 | // lazily create the KVOController
32 | if (nil == controller) {
33 | controller = [FBKVOController controllerWithObserver:self];
34 | self.KVOController = controller;
35 | }
36 |
37 | return controller;
38 | }
39 |
40 | - (void)setKVOController:(FBKVOController *)KVOController
41 | {
42 | objc_setAssociatedObject(self, NSObjectKVOControllerKey, KVOController, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
43 | }
44 |
45 | - (FBKVOController *)KVOControllerNonRetaining
46 | {
47 | id controller = objc_getAssociatedObject(self, NSObjectKVOControllerNonRetainingKey);
48 |
49 | if (nil == controller) {
50 | controller = [[FBKVOController alloc] initWithObserver:self retainObserved:NO];
51 | self.KVOControllerNonRetaining = controller;
52 | }
53 |
54 | return controller;
55 | }
56 |
57 | - (void)setKVOControllerNonRetaining:(FBKVOController *)KVOControllerNonRetaining
58 | {
59 | objc_setAssociatedObject(self, NSObjectKVOControllerNonRetainingKey, KVOControllerNonRetaining, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
60 | }
61 |
62 | @end
63 |
64 |
65 | NS_ASSUME_NONNULL_END
66 |
--------------------------------------------------------------------------------
/GAPlayer/Framework/FMDB/FMDB.h:
--------------------------------------------------------------------------------
1 | #import "FMDatabase.h"
2 | #import "FMResultSet.h"
3 | #import "FMDatabaseAdditions.h"
4 | #import "FMDatabaseQueue.h"
5 | #import "FMDatabasePool.h"
6 |
--------------------------------------------------------------------------------
/GAPlayer/Framework/IJKMediaFramework.framework/Headers/IJKKVOController.h:
--------------------------------------------------------------------------------
1 | /*
2 | * IJKKVOController.h
3 | *
4 | * Copyright (c) 2014 Bilibili
5 | * Copyright (c) 2014 Zhang Rui
6 | *
7 | * This file is part of ijkPlayer.
8 | *
9 | * ijkPlayer is free software; you can redistribute it and/or
10 | * modify it under the terms of the GNU Lesser General Public
11 | * License as published by the Free Software Foundation; either
12 | * version 2.1 of the License, or (at your option) any later version.
13 | *
14 | * ijkPlayer is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 | * Lesser General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with ijkPlayer; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 | */
23 |
24 | #import
25 |
26 | @interface IJKKVOController : NSObject
27 |
28 | - (id)initWithTarget:(NSObject *)target;
29 |
30 | - (void)safelyAddObserver:(NSObject *)observer
31 | forKeyPath:(NSString *)keyPath
32 | options:(NSKeyValueObservingOptions)options
33 | context:(void *)context;
34 | - (void)safelyRemoveObserver:(NSObject *)observer
35 | forKeyPath:(NSString *)keyPath;
36 |
37 | - (void)safelyRemoveAllObservers;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/GAPlayer/Framework/IJKMediaFramework.framework/Headers/IJKMPMoviePlayerController.h:
--------------------------------------------------------------------------------
1 | /*
2 | * IJKMPMoviePlayerController.h
3 | *
4 | * Copyright (c) 2013 Bilibili
5 | * Copyright (c) 2013 Zhang Rui
6 | *
7 | * This file is part of ijkPlayer.
8 | *
9 | * ijkPlayer is free software; you can redistribute it and/or
10 | * modify it under the terms of the GNU Lesser General Public
11 | * License as published by the Free Software Foundation; either
12 | * version 2.1 of the License, or (at your option) any later version.
13 | *
14 | * ijkPlayer is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 | * Lesser General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with ijkPlayer; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 | */
23 |
24 | #import "IJKMediaPlayback.h"
25 | #import
26 |
27 | @interface IJKMPMoviePlayerController : MPMoviePlayerController
28 |
29 | - (id)initWithContentURL:(NSURL *)aUrl;
30 | - (id)initWithContentURLString:(NSString *)aUrl;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/GAPlayer/Framework/IJKMediaFramework.framework/Headers/IJKMediaModule.h:
--------------------------------------------------------------------------------
1 | /*
2 | * IJKMediaModule.h
3 | *
4 | * Copyright (c) 2013 Bilibili
5 | * Copyright (c) 2013 Zhang Rui
6 | *
7 | * This file is part of ijkPlayer.
8 | *
9 | * ijkPlayer is free software; you can redistribute it and/or
10 | * modify it under the terms of the GNU Lesser General Public
11 | * License as published by the Free Software Foundation; either
12 | * version 2.1 of the License, or (at your option) any later version.
13 | *
14 | * ijkPlayer is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 | * Lesser General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with ijkPlayer; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 | */
23 |
24 | #import
25 |
26 | @interface IJKMediaModule : NSObject
27 |
28 | + (IJKMediaModule *)sharedModule;
29 |
30 | @property(atomic, getter=isAppIdleTimerDisabled) BOOL appIdleTimerDisabled;
31 | @property(atomic, getter=isMediaModuleIdleTimerDisabled) BOOL mediaModuleIdleTimerDisabled;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/GAPlayer/Framework/IJKMediaFramework.framework/Headers/IJKMediaPlayer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * IJKMediaPlayer.h
3 | *
4 | * Copyright (c) 2013 Bilibili
5 | * Copyright (c) 2013 Zhang Rui
6 | *
7 | * This file is part of ijkPlayer.
8 | *
9 | * ijkPlayer is free software; you can redistribute it and/or
10 | * modify it under the terms of the GNU Lesser General Public
11 | * License as published by the Free Software Foundation; either
12 | * version 2.1 of the License, or (at your option) any later version.
13 | *
14 | * ijkPlayer is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 | * Lesser General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with ijkPlayer; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 | */
23 |
24 | #import "IJKMediaPlayback.h"
25 | #import "IJKMPMoviePlayerController.h"
26 |
27 | #import "IJKFFOptions.h"
28 | #import "IJKFFMoviePlayerController.h"
29 |
30 | #import "IJKAVMoviePlayerController.h"
31 |
32 | #import "IJKMediaModule.h"
33 |
--------------------------------------------------------------------------------
/GAPlayer/Framework/IJKMediaFramework.framework/Headers/IJKNotificationManager.h:
--------------------------------------------------------------------------------
1 | /*
2 | * IJKNotificationManager.h
3 | *
4 | * Copyright (c) 2016 Bilibili
5 | * Copyright (c) 2016 Zhang Rui
6 | *
7 | * This file is part of ijkPlayer.
8 | *
9 | * ijkPlayer is free software; you can redistribute it and/or
10 | * modify it under the terms of the GNU Lesser General Public
11 | * License as published by the Free Software Foundation; either
12 | * version 2.1 of the License, or (at your option) any later version.
13 | *
14 | * ijkPlayer is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 | * Lesser General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with ijkPlayer; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 | */
23 |
24 | #import
25 |
26 | @interface IJKNotificationManager : NSObject
27 |
28 | - (nullable instancetype)init;
29 |
30 | - (void)addObserver:(nonnull id)observer
31 | selector:(nonnull SEL)aSelector
32 | name:(nullable NSString *)aName
33 | object:(nullable id)anObject;
34 |
35 | - (void)removeAllObservers:(nonnull id)observer;
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/GAPlayer/Framework/IJKMediaFramework.framework/Headers/IJKSDLGLViewProtocol.h:
--------------------------------------------------------------------------------
1 | /*
2 | * IJKSDLGLViewProtocol.h
3 | *
4 | * Copyright (c) 2017 Bilibili
5 | * Copyright (c) 2017 raymond
6 | *
7 | * This file is part of ijkPlayer.
8 | *
9 | * ijkPlayer is free software; you can redistribute it and/or
10 | * modify it under the terms of the GNU Lesser General Public
11 | * License as published by the Free Software Foundation; either
12 | * version 2.1 of the License, or (at your option) any later version.
13 | *
14 | * ijkPlayer is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 | * Lesser General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with ijkPlayer; if not, write to the Free Software
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 | */
23 |
24 | #ifndef IJKSDLGLViewProtocol_h
25 | #define IJKSDLGLViewProtocol_h
26 |
27 | #import
28 |
29 | typedef struct IJKOverlay IJKOverlay;
30 | struct IJKOverlay {
31 | int w;
32 | int h;
33 | UInt32 format;
34 | int planes;
35 | UInt16 *pitches;
36 | UInt8 **pixels;
37 | int sar_num;
38 | int sar_den;
39 | CVPixelBufferRef pixel_buffer;
40 | };
41 |
42 | @protocol IJKSDLGLViewProtocol
43 | - (UIImage*) snapshot;
44 | @property(nonatomic, readonly) CGFloat fps;
45 | @property(nonatomic) CGFloat scaleFactor;
46 | @property(nonatomic) BOOL isThirdGLView;
47 | - (void) display_pixels: (IJKOverlay *) overlay;
48 | @end
49 |
50 | #endif /* IJKSDLGLViewProtocol_h */
51 |
--------------------------------------------------------------------------------
/GAPlayer/Framework/IJKMediaFramework.framework/IJKMediaFramework:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:9188702c51ec25b239d33470bc8f8a8f4df31cbad26a789df812fdbc7cd507b0
3 | size 164718264
4 |
--------------------------------------------------------------------------------
/GAPlayer/Framework/IJKMediaFramework.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeisSunShine/GAPlayer/0ce4fc32af87b7eea14af29a84f024517076f367/GAPlayer/Framework/IJKMediaFramework.framework/Info.plist
--------------------------------------------------------------------------------
/GAPlayer/Framework/IJKMediaFramework.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module IJKMediaFramework {
2 | umbrella header "IJKMediaFramework.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/GAPlayer/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
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 | UIBackgroundModes
29 |
30 | audio
31 |
32 | UILaunchStoryboardName
33 | LaunchScreen
34 | UIMainStoryboardFile
35 | Main
36 | UIRequiredDeviceCapabilities
37 |
38 | armv7
39 |
40 | UIStatusBarHidden
41 |
42 | UISupportedInterfaceOrientations
43 |
44 | UIInterfaceOrientationPortrait
45 |
46 | UISupportedInterfaceOrientations~ipad
47 |
48 | UIInterfaceOrientationPortrait
49 | UIInterfaceOrientationPortraitUpsideDown
50 | UIInterfaceOrientationLandscapeLeft
51 | UIInterfaceOrientationLandscapeRight
52 |
53 | UIViewControllerBasedStatusBarAppearance
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/GAPlayer/PrefixHeader.pch:
--------------------------------------------------------------------------------
1 | //
2 | // PrefixHeader.pch
3 | // IJKPlayer-Demo
4 | //
5 | // Created by 宫傲 on 2018/8/1.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #ifndef PrefixHeader_pch
10 | #define PrefixHeader_pch
11 |
12 | // 颜色
13 | #define kMyColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
14 |
15 | #define ScreenHeight ([UIScreen mainScreen].bounds.size.height)
16 | #define ScreenWidth ([UIScreen mainScreen].bounds.size.width)
17 | #define ScreenScale [UIScreen mainScreen].scale
18 |
19 | #define isIPhoneX_Xs (ScreenWidth == 375.0 && ScreenHeight == 812.0) || (ScreenWidth == 812.0 && ScreenHeight == 375.0)
20 | #define isIPhoneXR (((ScreenWidth == 414.0 && ScreenHeight == 896.0) && ScreenScale == 2.0) || ((ScreenWidth == 896.0 && ScreenHeight == 414.0) && ScreenScale == 2.0))
21 | #define isIPhoneXsMax (((ScreenWidth == 414.0 && ScreenHeight == 896.0) && ScreenScale == 3.0) || ((ScreenWidth == 896.0 && ScreenHeight == 414.0) && ScreenScale == 3.0))
22 | #define isIPhoneXAbove (isIPhoneX_Xs || isIPhoneXR || isIPhoneXsMax)
23 |
24 | #define StatusBarHeight ((isIPhoneX_Xs || isIPhoneXR || isIPhoneXsMax) ? 44.0 : 20.0)
25 | #define NavBarHeight 44.0
26 | #define StatusNavBarHeight (StatusBarHeight + NavBarHeight)
27 | #define TabBarHeight (isIPhoneXAbove ? 83.0 : 49.0)
28 | #define BottomSafeAreaHeight (isIPhoneXAbove? 34.0 : 0.0)
29 |
30 |
31 | #import "DonwloadServiceProtocol.h"
32 |
33 | #define kLocalPlayURL @"http://127.0.0.1:1025/"
34 |
35 | #endif /* PrefixHeader_pch */
36 |
--------------------------------------------------------------------------------
/GAPlayer/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/13.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/GAPlayer/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/13.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 |
19 | }
20 |
21 |
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/GAPlayer/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // GAPlayer
4 | //
5 | // Created by 宫傲 on 2018/8/13.
6 | // Copyright © 2018年 宫傲. 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 |
--------------------------------------------------------------------------------
/GAPlayerTests/GAPlayerTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerTests.m
3 | // GAPlayerTests
4 | //
5 | // Created by 宫傲 on 2018/8/13.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GAPlayerTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation GAPlayerTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/GAPlayerTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/GAPlayerUITests/GAPlayerUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // GAPlayerUITests.m
3 | // GAPlayerUITests
4 | //
5 | // Created by 宫傲 on 2018/8/13.
6 | // Copyright © 2018年 宫傲. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GAPlayerUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation GAPlayerUITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 |
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 |
22 | // In UI tests it is usually best to stop immediately when a failure occurs.
23 | self.continueAfterFailure = NO;
24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
25 | [[[XCUIApplication alloc] init] launch];
26 |
27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
28 | }
29 |
30 | - (void)tearDown {
31 | // Put teardown code here. This method is called after the invocation of each test method in the class.
32 | [super tearDown];
33 | }
34 |
35 | - (void)testExample {
36 | // Use recording to get started writing UI tests.
37 | // Use XCTAssert and related functions to verify your tests produce the correct results.
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/GAPlayerUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------