From 525365f2eb02661d252747e286028f3a694865d2 Mon Sep 17 00:00:00 2001 From: Mengwangchao Date: Thu, 28 Mar 2024 16:29:29 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E4=BF=AE=E6=94=B9readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 2e8d4afbf14134ca9a792ecfccf7d613213a961a) --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c8f220a..fd679a4 100644 --- a/README.md +++ b/README.md @@ -74,23 +74,27 @@ pod 'qplayer2-core', '1.4.2' 请查阅document目录下的api文档 -#### 接入文档 +##### 接入文档 https://developer.qiniu.com/pili/12225/qplayer2-ios-side +##### QPlayer2 隐私文件介绍 + +1. PrivacyInfo.xcprivacy 已包含在 qplayer2_core.framework 中 + + + ##### Demo介绍 1. demo 工程内的 长视频播放页 是基于 qplayer2-core来实现的 1. demo 下载:https://testflight.apple.com/join/YocXmZ2j -1. PrivacyInfo.xcprivacy 已包含在 QPlayer2 sdk 中 - -#### 技术支持与交流 +##### 技术支持与交流 产品及服务咨询:400-808-9176 From 75aa0067602bc497782ad02bb72ff841b1013dd2 Mon Sep 17 00:00:00 2001 From: Mengwangchao Date: Wed, 17 Apr 2024 17:39:02 +0800 Subject: [PATCH 02/15] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=BD=B4=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit c7ad3bb78bdb4a3bfd13a1d71a2721163c2daf8b) --- .../LongVideo/QNPlayerViewController.m | 3 +- .../Public/ElementView/QNButtonView.m | 2 - qplayer2demo/qplayer2demo/Resource/urls.json | 87 ++++++++++++++++++- 3 files changed, 87 insertions(+), 5 deletions(-) diff --git a/qplayer2demo/qplayer2demo/LongVideo/QNPlayerViewController.m b/qplayer2demo/qplayer2demo/LongVideo/QNPlayerViewController.m index 1a311c9..d34f62e 100644 --- a/qplayer2demo/qplayer2demo/LongVideo/QNPlayerViewController.m +++ b/qplayer2demo/qplayer2demo/LongVideo/QNPlayerViewController.m @@ -174,7 +174,8 @@ - (void)viewDidLoad { for (NSDictionary *dic in urlArray) { BOOL islive = [[dic valueForKey:@"isLive"] intValue]==0? NO:YES; - QMediaModelBuilder *modleBuilder = [[QMediaModelBuilder alloc] initWithIsLive:islive]; + BOOL isReconstructTimeLine = [[dic valueForKey:@"isReconstructTimeLine"] intValue]==0? NO:YES; + QMediaModelBuilder *modleBuilder = [[QMediaModelBuilder alloc] initWithIsLive:islive isReconstructTimeLine:isReconstructTimeLine]; // [modle setValuesForKeysWithDictionary:dic]; NSMutableArray *streams = [NSMutableArray array]; diff --git a/qplayer2demo/qplayer2demo/Public/ElementView/QNButtonView.m b/qplayer2demo/qplayer2demo/Public/ElementView/QNButtonView.m index 4f28982..814c224 100644 --- a/qplayer2demo/qplayer2demo/Public/ElementView/QNButtonView.m +++ b/qplayer2demo/qplayer2demo/Public/ElementView/QNButtonView.m @@ -240,8 +240,6 @@ - (void)onStateChange:(QPlayerContext *)context state:(QPlayerState)state{ -(void)onProgressChanged:(QPlayerContext *)context progress:(NSInteger)progress duration:(NSInteger)duration{ if(self.mIsNeedUpdatePrograss){ - - long long currentSeconds = progress/1000; float currentSecondsDouble = progress/1000.0; long long totalSeconds = self.mPlayer.controlHandler.duration/1000; diff --git a/qplayer2demo/qplayer2demo/Resource/urls.json b/qplayer2demo/qplayer2demo/Resource/urls.json index ff7adae..f6c0b88 100644 --- a/qplayer2demo/qplayer2demo/Resource/urls.json +++ b/qplayer2demo/qplayer2demo/Resource/urls.json @@ -2,6 +2,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -72,6 +73,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -98,6 +100,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -114,6 +117,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -130,6 +134,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -146,6 +151,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -162,6 +168,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -178,6 +185,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -194,6 +202,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -210,6 +219,7 @@ { "isLive": 1, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -256,6 +266,7 @@ { "isLive": 1, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -302,6 +313,7 @@ { "isLive": 1, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -317,6 +329,7 @@ }, { "isLive": 1, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -363,11 +376,12 @@ { "isLive": 1, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", "urlType": 0, - "url": "rtmp://pili-rtmp.qnsdk.com/sdk-live/6666", + "url": "rtmp://internal-player.cloudvdn.com/.i/c2RrLWxpdmU6c2RrLWxpdmUvNjY2Ng==?role=portalio&cdn-src-referer=vdn", "quality": 1080, "isSelected": 1, "backupUrl": "", @@ -409,11 +423,12 @@ { "isLive": 1, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", "urlType": 0, - "url": "http://pili-hls.qnsdk.com/sdk-live/6666.m3u8", + "url": "rtmp://pili-rtmp.qnsdk.com/sdk-live/6666", "quality": 360, "isSelected": 1, "backupUrl": "", @@ -425,6 +440,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -443,6 +459,7 @@ { "isLive": 1, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -459,6 +476,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -475,6 +493,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -491,6 +510,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -507,6 +527,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -523,6 +544,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -539,6 +561,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -555,6 +578,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -571,6 +595,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -587,6 +612,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -603,6 +629,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -620,6 +647,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -636,6 +664,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -652,6 +681,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -668,6 +698,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -684,6 +715,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -700,6 +732,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -716,6 +749,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -732,6 +766,7 @@ { "isLive": 1, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -748,6 +783,7 @@ { "isLive": 1, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -764,6 +800,7 @@ { "isLive": 1, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -780,6 +817,7 @@ { "isLive": 1, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -796,6 +834,7 @@ { "isLive": 1, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -812,6 +851,7 @@ { "isLive": 1, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -828,6 +868,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -844,6 +885,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -860,6 +902,7 @@ { "isLive": 1, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -876,6 +919,7 @@ { "isLive": 1, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -892,6 +936,7 @@ { "isLive": 1, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -908,6 +953,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -926,6 +972,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -950,6 +997,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -973,6 +1021,7 @@ }, { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -989,6 +1038,7 @@ { "isLive": 0, + "isReconstructTimeLine" : 0, "streamElements": [ { "userType": "", @@ -1002,6 +1052,39 @@ "mp4QNDrmFileKey" : "filenew", } ] + }, + { + + "isLive": 0, + "isReconstructTimeLine" : 1, + "streamElements": [ + { + "userType": "", + "urlType": 0, + "url": "https://video.medmeeting.com/recordings/z1.yihuibao-test.yihuibao-test_20240412181120417_140983/1712962721_1713006137.m3u8", + "quality": 960, + "isSelected": 1, + "backupUrl": "", + "referer": "" + } + ] + }, + { + + "isLive": 0, + "isReconstructTimeLine" : 1, + "streamElements": [ + { + "userType": "", + "urlType": 0, + "url": "http://demo-videos.qnsdk.com/bbk-bt709.mp4", + "quality": 1280, + "isSelected": 1, + "backupUrl": "", + "referer": "", + + } + ] } ] From e9fdf0da208a18ce3414b2b3ab29ef7aad399e25 Mon Sep 17 00:00:00 2001 From: Mengwangchao Date: Wed, 17 Apr 2024 17:40:51 +0800 Subject: [PATCH 03/15] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=BB=91=E5=B1=8F?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 5ed4e1941722a1fe1ab39520d6c853e8a4b86fd2) --- qplayer2demo/qplayer2demo/Resource/urls.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qplayer2demo/qplayer2demo/Resource/urls.json b/qplayer2demo/qplayer2demo/Resource/urls.json index f6c0b88..ece1c50 100644 --- a/qplayer2demo/qplayer2demo/Resource/urls.json +++ b/qplayer2demo/qplayer2demo/Resource/urls.json @@ -381,7 +381,7 @@ { "userType": "", "urlType": 0, - "url": "rtmp://internal-player.cloudvdn.com/.i/c2RrLWxpdmU6c2RrLWxpdmUvNjY2Ng==?role=portalio&cdn-src-referer=vdn", + "url": "rtmp://pili-rtmp.qnsdk.com/sdk-live/6666", "quality": 1080, "isSelected": 1, "backupUrl": "", @@ -428,7 +428,7 @@ { "userType": "", "urlType": 0, - "url": "rtmp://pili-rtmp.qnsdk.com/sdk-live/6666", + "url": "http://pili-hls.qnsdk.com/sdk-live/6666.m3u8", "quality": 360, "isSelected": 1, "backupUrl": "", From aa94bbc31e5291a5eae54e15dbf420dc020398c2 Mon Sep 17 00:00:00 2001 From: Mengwangchao Date: Thu, 18 Apr 2024 16:01:02 +0800 Subject: [PATCH 04/15] =?UTF-8?q?=E9=9F=B3=E9=A2=91=E6=8A=A2=E5=8D=A0?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E7=A7=BB=E6=A4=8D=E5=88=B0demo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qplayer2demo.xcodeproj/project.pbxproj | 16 ++- .../LongVideo/QNPlayerViewController.m | 11 +- .../qplayer2demo/QNotificationCenterHelper.h | 24 ++++ .../qplayer2demo/QNotificationCenterHelper.m | 104 ++++++++++++++++++ .../ShortVideo/QNCellPlayerViewController.m | 10 +- .../QNSamplePlayerWithQRenderView.h | 3 + .../QNSamplePlayerWithQRenderView.m | 1 - 7 files changed, 161 insertions(+), 8 deletions(-) create mode 100644 qplayer2demo/qplayer2demo/QNotificationCenterHelper.h create mode 100644 qplayer2demo/qplayer2demo/QNotificationCenterHelper.m diff --git a/qplayer2demo/qplayer2demo.xcodeproj/project.pbxproj b/qplayer2demo/qplayer2demo.xcodeproj/project.pbxproj index 77d3f28..b71b452 100644 --- a/qplayer2demo/qplayer2demo.xcodeproj/project.pbxproj +++ b/qplayer2demo/qplayer2demo.xcodeproj/project.pbxproj @@ -82,6 +82,9 @@ BA78EDAA2A89FAFE001DE624 /* QNShortVideoPlayerViewCache.m in Sources */ = {isa = PBXBuildFile; fileRef = BA78EDA92A89FAFE001DE624 /* QNShortVideoPlayerViewCache.m */; }; BA78EDB02A8A205A001DE624 /* QNMikuClientManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BA78EDAF2A8A205A001DE624 /* QNMikuClientManager.m */; }; BA8977B62A6E52EB007C1F84 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BA8977B52A6E52EB007C1F84 /* CoreMedia.framework */; }; + BAD375002BCE85BA00C04D12 /* qplayer2_core.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BAD374FF2BCE85BA00C04D12 /* qplayer2_core.framework */; }; + BAD375012BCE85BA00C04D12 /* qplayer2_core.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = BAD374FF2BCE85BA00C04D12 /* qplayer2_core.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + BAD375082BD0CBB200C04D12 /* QNotificationCenterHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = BAD375072BD0CBB200C04D12 /* QNotificationCenterHelper.m */; }; BAD4CFDE2AD642B900D7F9FC /* qplayer2demoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = BAD4CFDD2AD642B900D7F9FC /* qplayer2demoUITests.m */; }; BAD4CFE02AD642B900D7F9FC /* qplayer2demoUITestsLaunchTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BAD4CFDF2AD642B900D7F9FC /* qplayer2demoUITestsLaunchTests.m */; }; /* End PBXBuildFile section */ @@ -104,6 +107,7 @@ dstSubfolderSpec = 10; files = ( BA3E5B042A8CB85F00032327 /* MikuDelivery.framework in Embed Frameworks */, + BAD375012BCE85BA00C04D12 /* qplayer2_core.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -230,6 +234,9 @@ BA908F322A5E53120080E10A /* qplayer2_core.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = qplayer2_core.framework; sourceTree = BUILT_PRODUCTS_DIR; }; BAAD19762A65450000DB96FF /* qplayer2_core.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = qplayer2_core.framework; sourceTree = BUILT_PRODUCTS_DIR; }; BAC57C682AB84F7C006F2F8D /* qplayer2_core.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = qplayer2_core.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + BAD374FF2BCE85BA00C04D12 /* qplayer2_core.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = qplayer2_core.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + BAD375062BD0CBB200C04D12 /* QNotificationCenterHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QNotificationCenterHelper.h; sourceTree = ""; }; + BAD375072BD0CBB200C04D12 /* QNotificationCenterHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QNotificationCenterHelper.m; sourceTree = ""; }; BAD4CFDB2AD642B900D7F9FC /* qplayer2demoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = qplayer2demoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; BAD4CFDD2AD642B900D7F9FC /* qplayer2demoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = qplayer2demoUITests.m; sourceTree = ""; }; BAD4CFDF2AD642B900D7F9FC /* qplayer2demoUITestsLaunchTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = qplayer2demoUITestsLaunchTests.m; sourceTree = ""; }; @@ -251,6 +258,7 @@ files = ( 50B1F3D5289BBF7A0074E02D /* Foundation.framework in Frameworks */, BA3E5B032A8CB85F00032327 /* MikuDelivery.framework in Frameworks */, + BAD375002BCE85BA00C04D12 /* qplayer2_core.framework in Frameworks */, BA67ABB02A6FE23000BE06FA /* CoreAudio.framework in Frameworks */, 50387155292CA3410000C4DD /* CoreMotion.framework in Frameworks */, 616D0BA391829A738EA77F6B /* libPods-qplayer2demo.a in Frameworks */, @@ -290,6 +298,8 @@ 977927EE29B71BE5006E7931 /* QNDoublePlayerViewController.h */, 50B1F436289CC62D0074E02D /* QNPublicHeader.h */, 977927EF29B71BF1006E7931 /* QNDoublePlayerViewController.m */, + BAD375062BD0CBB200C04D12 /* QNotificationCenterHelper.h */, + BAD375072BD0CBB200C04D12 /* QNotificationCenterHelper.m */, 50B1F45B289CC62D0074E02D /* Resource */, 50B1F458289CC62D0074E02D /* ScanCode */, 50B1F43A289CC62D0074E02D /* toast */, @@ -505,6 +515,7 @@ CA90BF8B289B846C0087543B /* Frameworks */ = { isa = PBXGroup; children = ( + BAD374FF2BCE85BA00C04D12 /* qplayer2_core.framework */, BA7F4C8A2B9EA22E005FDE98 /* qplayer2_core.framework */, BA0FD0B32B43B822009C9390 /* qplayer2_core.framework */, BA4823782AD3A7AB009F43AA /* qplayer2_core.framework */, @@ -732,6 +743,7 @@ 50B1F489289CC62D0074E02D /* QNPlayerSettingsView.m in Sources */, 50B1F48E289CC62D0074E02D /* QNClassModel.m in Sources */, 50B1F48D289CC62D0074E02D /* QNPlayerConfigViewController.m in Sources */, + BAD375082BD0CBB200C04D12 /* QNotificationCenterHelper.m in Sources */, BA78ED972A85CDA4001DE624 /* QNSamplePlayerWithQRenderView.m in Sources */, 5076C9612906ADC3007763E7 /* QNPlayerShortVideoMaskView.m in Sources */, 50B1F491289CC62D0074E02D /* QNToastView.m in Sources */, @@ -981,7 +993,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.4.2; + MARKETING_VERSION = 1.4.3; PODS_PODFILE_DIR_PATH = "${SRCROOT}/."; PODS_ROOT = "${SRCROOT}/Pods"; PRODUCT_BUNDLE_IDENTIFIER = com.qiniu.qplayer2demo; @@ -1042,7 +1054,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.4.2; + MARKETING_VERSION = 1.4.3; PODS_PODFILE_DIR_PATH = "${SRCROOT}/."; PODS_ROOT = "${SRCROOT}/Pods"; PRODUCT_BUNDLE_IDENTIFIER = com.qiniu.qplayer2demo; diff --git a/qplayer2demo/qplayer2demo/LongVideo/QNPlayerViewController.m b/qplayer2demo/qplayer2demo/LongVideo/QNPlayerViewController.m index d34f62e..0ec8bd0 100644 --- a/qplayer2demo/qplayer2demo/LongVideo/QNPlayerViewController.m +++ b/qplayer2demo/qplayer2demo/LongVideo/QNPlayerViewController.m @@ -26,6 +26,7 @@ #import "NSDataToCVPixelBufferRefHelper.h" #import #import +#import "QNotificationCenterHelper.h" #define PL_PLAYER_VIDEO_ROOT_FOLDER @"PLPlayerFloder" #define GET_PL_PLAYER_VIDEO_FOLDER(folderName) [PL_PLAYER_VIDEO_ROOT_FOLDER stringByAppendingPathComponent:folderName] #define PL_PLAYER_VIDEO_REVERSER GET_PL_PLAYER_VIDEO_FOLDER(@"PLPlayerCacheFile") @@ -93,7 +94,7 @@ @interface QNPlayerViewController () @property (nonatomic, assign) NSInteger mFirstVideoTime; @property (nonatomic, assign) int mSEINum; @property (nonatomic, strong) NSString *mSEIString; - +@property (nonatomic, strong) QNotificationCenterHelper* mNotifi; @property (nonatomic, assign) BOOL mIsStartPush; @property (nonatomic, assign) int mVideoHeight; @property (nonatomic, assign) int mVideoWidth; @@ -109,7 +110,7 @@ - (void)dealloc { self.mSession.delegate = nil; self.mSession = nil; } - + self.mNotifi = nil; NSLog(@"QNPlayerViewController dealloc"); } @@ -246,7 +247,8 @@ - (void)viewDidLoad { [self.view addSubview:self.mToastView]; [self playerContextAllCallBack]; - + self.mNotifi = [[QNotificationCenterHelper alloc]initWithPlayerView:self.mPlayerView]; + [self.mPlayerView.controlHandler setLogLevel:LOG_INFO]; } #pragma mark - 初始化 PLStreaming @@ -696,8 +698,8 @@ -(void)onAudioData:(QPlayerContext *)context sampleRate:(int)sampleRate format:( } -(void)onStateChange:(QPlayerContext *)context state:(QPlayerState)state{ + self.mIsPlaying = NO; if (state == QPLAYER_STATE_PREPARE) { - self.mSubtitleLabel.text = @""; [self.mMaskView loadActivityIndicatorView]; [self.mToastView addText:@"开始拉视频数据"]; @@ -1288,6 +1290,7 @@ - (void)deleteUrlString:(UIButton *)button { [self presentViewController:alertVc animated:YES completion:nil]; } + #pragma mark - 显示提示信息 - (void)showHintViewWithText:(NSString *)hintStr diff --git a/qplayer2demo/qplayer2demo/QNotificationCenterHelper.h b/qplayer2demo/qplayer2demo/QNotificationCenterHelper.h new file mode 100644 index 0000000..152a124 --- /dev/null +++ b/qplayer2demo/qplayer2demo/QNotificationCenterHelper.h @@ -0,0 +1,24 @@ +// +// QNotificationCenterHelper.h +// qplayer2demo +// +// Created by Dynasty Dream on 2024/4/18. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface QNotificationCenterHelper : NSObject + +-(instancetype)initWithPlayerView:(QPlayerView *) qplayer; + +-(instancetype)initWithPlayerContext:(QPlayerContext *) context; + +-(instancetype)init NS_UNAVAILABLE; + +-(instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/qplayer2demo/qplayer2demo/QNotificationCenterHelper.m b/qplayer2demo/qplayer2demo/QNotificationCenterHelper.m new file mode 100644 index 0000000..d502503 --- /dev/null +++ b/qplayer2demo/qplayer2demo/QNotificationCenterHelper.m @@ -0,0 +1,104 @@ +// +// QNotificationCenterHelper.m +// qplayer2demo +// +// Created by Dynasty Dream on 2024/4/18. +// + +#import "QNotificationCenterHelper.h" +@interface QNotificationCenterHelper() + +@property (nonatomic, strong) QPlayerView* mPlayerView; +@property (nonatomic, strong) QPlayerContext* mPlayerContext; +@property (nonatomic, assign) BOOL mIsPlaying; +@end +@implementation QNotificationCenterHelper + +-(instancetype)initWithPlayerContext:(QPlayerContext *) context{ + self = [super init]; + if (self) { + self.mPlayerContext = context; + self.mIsPlaying = NO; + //被打断和打断终止通知监听 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAVAudioSessionInterruption:) name:AVAudioSessionInterruptionNotification object:nil]; + + //已经进入到前台 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onUIApplicationWillEnterForeground:) name:UIApplicationDidBecomeActiveNotification object:nil]; + + [self.mPlayerContext.controlHandler addPlayerStateListener:self]; + } + return self; +} +-(instancetype)initWithPlayerView:(QPlayerView *)qplayer{ + self = [super init]; + if (self) { + self.mPlayerView = qplayer; + self.mIsPlaying = NO; + //被打断和打断终止通知监听 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAVAudioSessionInterruption:) name:AVAudioSessionInterruptionNotification object:nil]; + + //已经进入到前台 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onUIApplicationWillEnterForeground:) name:UIApplicationDidBecomeActiveNotification object:nil]; + + [self.mPlayerView.controlHandler addPlayerStateListener:self]; + } + return self; +} + + +#pragma mark - 系统通知监听 +-(void)onAVAudioSessionInterruption:(NSNotification *)note{ + NSDictionary *userInfo = note.userInfo; + AVAudioSessionInterruptionType type = [userInfo[AVAudioSessionInterruptionTypeKey] unsignedIntegerValue]; + if (AVAudioSessionInterruptionTypeBegan == type) { + NSLog(@"player be interrupted by other audio"); + if (self.mIsPlaying) { + if (self.mPlayerView != nil) { + [self.mPlayerView.controlHandler pauseRender]; + }else if(self.mPlayerContext != nil){ + [self.mPlayerContext.controlHandler pauseRender]; + } + + } + + } +} +- (void)onUIApplicationWillEnterForeground:(NSNotification *)note{ + if (self.mPlayerView != nil) { + [self.mPlayerView.controlHandler resumeAudioSessionCategory]; + [self.mPlayerView.controlHandler resumeRender]; + }else if(self.mPlayerContext != nil){ + [self.mPlayerContext.controlHandler resumeAudioSessionCategory]; + [self.mPlayerContext.controlHandler resumeRender]; + } + +} +- (void)onStateChange:(QPlayerContext *)context state:(QPlayerState)state{ + if (self.mPlayerView != nil) { + if ((context.controlHandler == self.mPlayerView.controlHandler) && state == QPLAYER_STATE_PLAYING) { + self.mIsPlaying = YES; + } + else{ + self.mIsPlaying = NO; + } + }else if(self.mPlayerContext != nil){ + if ((context.controlHandler == self.mPlayerContext.controlHandler) && state == QPLAYER_STATE_PLAYING) { + self.mIsPlaying = YES; + } + else{ + self.mIsPlaying = NO; + } + } +} + +- (void)dealloc +{ + if (self.mPlayerView) { + self.mPlayerView = nil; + } + if (self.mPlayerContext) { + self.mPlayerContext = nil; + } + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} +@end diff --git a/qplayer2demo/qplayer2demo/ShortVideo/QNCellPlayerViewController.m b/qplayer2demo/qplayer2demo/ShortVideo/QNCellPlayerViewController.m index 20d098b..24d99bb 100644 --- a/qplayer2demo/qplayer2demo/ShortVideo/QNCellPlayerViewController.m +++ b/qplayer2demo/qplayer2demo/ShortVideo/QNCellPlayerViewController.m @@ -13,6 +13,7 @@ #import "QNSamplePlayerWithQRenderView.h" #import "QNMikuClientManager.h" #import "QNToastView.h" +#import "QNotificationCenterHelper.h" static NSString *status[] = { @"Unknow", @"Preparing", @@ -50,6 +51,7 @@ @interface QNCellPlayerViewController () @property (nonatomic, strong) QNToastView *mToastView; @property (nonatomic, assign) int mModelsNum; @property (nonatomic, assign) int mCurrentPlayingNum; +@property (nonatomic, strong) QNotificationCenterHelper* mNotifi; @end @@ -67,6 +69,7 @@ - (void)viewDidDisappear:(BOOL)animated{ _mToastView = nil; _mCurrentCell = nil; self.mPlayer = nil; + self.mNotifi = nil; } - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; @@ -168,7 +171,7 @@ - (void)viewDidLoad { _mToastView = [[QNToastView alloc]initWithFrame:CGRectMake(0, PL_SCREEN_HEIGHT - 350, 200, 300)]; [self.view addSubview:_mToastView]; - + self.mNotifi = [[QNotificationCenterHelper alloc]initWithPlayerContext:self.mPlayer.mPlayerContext]; } @@ -341,6 +344,8 @@ -(void)updatePlayCell:(QNCellPlayerTableViewCell *)cell scroll:(BOOL)scroll{ if(_mCurrentCell == nil){ _mCurrentCell = cell; self.mPlayer = [self.mShortVideoPlayerViewCache fetchPlayerView:0]; + self.mNotifi = nil; + self.mNotifi = [[QNotificationCenterHelper alloc]initWithPlayerContext:self.mPlayer.mPlayerContext]; [self.mShortVideoPlayerViewCache changePosition:0]; [self playerContextAllCallBack]; _mCurrentCell.mPlayerView = self.mPlayer; @@ -352,6 +357,9 @@ -(void)updatePlayCell:(QNCellPlayerTableViewCell *)cell scroll:(BOOL)scroll{ [self.mShortVideoPlayerViewCache recyclePlayerView:self.mPlayer]; //拿取下一个cell所需要的播放器 self.mPlayer = [self.mShortVideoPlayerViewCache fetchPlayerView:[cell.mModelKey intValue]]; + + self.mNotifi = nil; + self.mNotifi = [[QNotificationCenterHelper alloc]initWithPlayerContext:self.mPlayer.mPlayerContext]; //添加listener [self playerContextAllCallBack]; //切换当前正在播放的 playItem 位置 diff --git a/qplayer2demo/qplayer2demo/ShortVideo/QNSamplePlayerWithQRenderView.h b/qplayer2demo/qplayer2demo/ShortVideo/QNSamplePlayerWithQRenderView.h index 4380eca..dc745a2 100644 --- a/qplayer2demo/qplayer2demo/ShortVideo/QNSamplePlayerWithQRenderView.h +++ b/qplayer2demo/qplayer2demo/ShortVideo/QNSamplePlayerWithQRenderView.h @@ -54,6 +54,9 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic, strong) QPlayerRenderHandler *renderHandler; + +@property (nonatomic,strong) QPlayerContext *mPlayerContext; + @end NS_ASSUME_NONNULL_END diff --git a/qplayer2demo/qplayer2demo/ShortVideo/QNSamplePlayerWithQRenderView.m b/qplayer2demo/qplayer2demo/ShortVideo/QNSamplePlayerWithQRenderView.m index c7a9129..c68dde2 100644 --- a/qplayer2demo/qplayer2demo/ShortVideo/QNSamplePlayerWithQRenderView.m +++ b/qplayer2demo/qplayer2demo/ShortVideo/QNSamplePlayerWithQRenderView.m @@ -11,7 +11,6 @@ @interface QNSamplePlayerWithQRenderView() -@property (nonatomic,strong) QPlayerContext *mPlayerContext; @end @implementation QNSamplePlayerWithQRenderView From 514d8620275de8412b1ce1f5f9ffa7973fda29f3 Mon Sep 17 00:00:00 2001 From: Mengwangchao Date: Fri, 19 Apr 2024 14:01:59 +0800 Subject: [PATCH 05/15] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=BD=B4=E9=BB=98=E8=AE=A4=E4=B8=BAtrue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 300cffb47c724327ca24db98f43edcfa487a7854) --- qplayer2demo/qplayer2demo/Resource/urls.json | 115 ++++++++----------- 1 file changed, 49 insertions(+), 66 deletions(-) diff --git a/qplayer2demo/qplayer2demo/Resource/urls.json b/qplayer2demo/qplayer2demo/Resource/urls.json index ece1c50..940d16a 100644 --- a/qplayer2demo/qplayer2demo/Resource/urls.json +++ b/qplayer2demo/qplayer2demo/Resource/urls.json @@ -2,7 +2,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -73,7 +73,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -100,7 +100,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -117,7 +117,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -134,7 +134,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -151,7 +151,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -168,7 +168,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -185,7 +185,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -202,7 +202,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -219,7 +219,7 @@ { "isLive": 1, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -266,7 +266,7 @@ { "isLive": 1, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -313,7 +313,7 @@ { "isLive": 1, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -329,7 +329,7 @@ }, { "isLive": 1, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -376,7 +376,7 @@ { "isLive": 1, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -423,7 +423,7 @@ { "isLive": 1, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -440,7 +440,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -459,7 +459,7 @@ { "isLive": 1, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -476,7 +476,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -493,7 +493,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -510,7 +510,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -527,7 +527,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -544,7 +544,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -561,7 +561,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -578,7 +578,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -612,7 +612,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -629,7 +629,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -647,7 +647,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -664,7 +664,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -681,7 +681,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -698,7 +698,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -715,7 +715,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -732,7 +732,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -749,7 +749,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -766,7 +766,7 @@ { "isLive": 1, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -783,7 +783,7 @@ { "isLive": 1, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -800,7 +800,7 @@ { "isLive": 1, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -817,7 +817,7 @@ { "isLive": 1, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -834,7 +834,7 @@ { "isLive": 1, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -851,7 +851,7 @@ { "isLive": 1, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -868,7 +868,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -885,7 +885,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -902,7 +902,7 @@ { "isLive": 1, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -919,7 +919,7 @@ { "isLive": 1, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -936,7 +936,7 @@ { "isLive": 1, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -953,7 +953,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -972,7 +972,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -997,7 +997,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -1021,7 +1021,7 @@ }, { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -1038,7 +1038,7 @@ { "isLive": 0, - "isReconstructTimeLine" : 0, + "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -1068,23 +1068,6 @@ "referer": "" } ] - }, - { - - "isLive": 0, - "isReconstructTimeLine" : 1, - "streamElements": [ - { - "userType": "", - "urlType": 0, - "url": "http://demo-videos.qnsdk.com/bbk-bt709.mp4", - "quality": 1280, - "isSelected": 1, - "backupUrl": "", - "referer": "", - - } - ] } ] From ed160be8cccdcb3b0787ed81def029e9dad1a8f7 Mon Sep 17 00:00:00 2001 From: Mengwangchao Date: Wed, 24 Apr 2024 17:18:08 +0800 Subject: [PATCH 06/15] =?UTF-8?q?=E5=B1=8F=E8=94=BD=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=BD=B4=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 70e9c1d9730dd3b535e1dc7aa515f692d568465f) --- .../LongVideo/QNPlayerViewController.m | 2 +- qplayer2demo/qplayer2demo/Resource/urls.json | 98 +++++++++---------- 2 files changed, 49 insertions(+), 51 deletions(-) diff --git a/qplayer2demo/qplayer2demo/LongVideo/QNPlayerViewController.m b/qplayer2demo/qplayer2demo/LongVideo/QNPlayerViewController.m index 0ec8bd0..b874090 100644 --- a/qplayer2demo/qplayer2demo/LongVideo/QNPlayerViewController.m +++ b/qplayer2demo/qplayer2demo/LongVideo/QNPlayerViewController.m @@ -176,7 +176,7 @@ - (void)viewDidLoad { for (NSDictionary *dic in urlArray) { BOOL islive = [[dic valueForKey:@"isLive"] intValue]==0? NO:YES; BOOL isReconstructTimeLine = [[dic valueForKey:@"isReconstructTimeLine"] intValue]==0? NO:YES; - QMediaModelBuilder *modleBuilder = [[QMediaModelBuilder alloc] initWithIsLive:islive isReconstructTimeLine:isReconstructTimeLine]; + QMediaModelBuilder *modleBuilder = [[QMediaModelBuilder alloc] initWithIsLive:islive]; // [modle setValuesForKeysWithDictionary:dic]; NSMutableArray *streams = [NSMutableArray array]; diff --git a/qplayer2demo/qplayer2demo/Resource/urls.json b/qplayer2demo/qplayer2demo/Resource/urls.json index 940d16a..7b54fc3 100644 --- a/qplayer2demo/qplayer2demo/Resource/urls.json +++ b/qplayer2demo/qplayer2demo/Resource/urls.json @@ -2,7 +2,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -73,7 +72,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -100,7 +98,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -117,7 +114,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -134,7 +130,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -151,7 +146,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -168,7 +162,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -185,7 +178,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -202,7 +194,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -219,7 +210,6 @@ { "isLive": 1, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -266,7 +256,6 @@ { "isLive": 1, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -313,7 +302,6 @@ { "isLive": 1, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -329,7 +317,6 @@ }, { "isLive": 1, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -376,7 +363,6 @@ { "isLive": 1, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -423,7 +409,6 @@ { "isLive": 1, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -440,7 +425,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -459,7 +443,6 @@ { "isLive": 1, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -476,7 +459,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -493,7 +475,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -510,7 +491,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -527,7 +507,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -544,7 +523,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -561,7 +539,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -578,7 +555,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -612,7 +588,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -629,7 +604,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -647,7 +621,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -664,7 +637,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -681,7 +653,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -698,7 +669,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -715,7 +685,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -732,7 +701,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -749,7 +717,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -766,7 +733,6 @@ { "isLive": 1, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -783,7 +749,6 @@ { "isLive": 1, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -800,7 +765,6 @@ { "isLive": 1, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -817,7 +781,6 @@ { "isLive": 1, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -834,7 +797,6 @@ { "isLive": 1, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -851,7 +813,6 @@ { "isLive": 1, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -868,7 +829,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -885,7 +845,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -902,7 +861,6 @@ { "isLive": 1, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -919,7 +877,6 @@ { "isLive": 1, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -936,7 +893,6 @@ { "isLive": 1, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -953,7 +909,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -972,7 +927,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -997,7 +951,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -1021,7 +974,6 @@ }, { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -1038,7 +990,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -1056,7 +1007,6 @@ { "isLive": 0, - "isReconstructTimeLine" : 1, "streamElements": [ { "userType": "", @@ -1068,6 +1018,54 @@ "referer": "" } ] + }, + { + + "isLive": 1, + "streamElements": [ + { + "userType": "", + "urlType": 0, + "url": "http://hdllive-main.autohome.com.cn/athmlive-main/z1_athmlive-main_908180.flv", + "quality": 960, + "isSelected": 1, + "backupUrl": "", + "referer": "" + } + ] + }, + { + + "isLive": 1, + "streamElements": [ + { + "userType": "", + "urlType": 0, + "url": "rtmp://pili-live-rtmp.jixiangmei.zhongwei-info.com/jixiangmei/1662026811828", + "quality": 960, + "isSelected": 1, + "backupUrl": "", + "referer": "" + } + ] + }, + { + + "isLive": 0, + + "streamElements": [ + { + "userType": "", + "urlType": 0, + "url": "http://live.zhongwei-info.com/recordings/z1.jixiangmei.1611802668861/1660906800_1660914000.m3u8", + "quality": 960, + "isSelected": 1, + "backupUrl": "", + "referer": "" + } + ] } ] + + From b09b064fcd4e6cc5a327ac058a9a452261c09ad0 Mon Sep 17 00:00:00 2001 From: Mengwangchao Date: Tue, 7 May 2024 16:09:45 +0800 Subject: [PATCH 07/15] =?UTF-8?q?=E6=9B=BF=E6=8D=A2hls=20=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit efaa1baa486d5a954e6a628983848dfff0c50b9e) --- qplayer2demo/qplayer2demo/Resource/urls.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qplayer2demo/qplayer2demo/Resource/urls.json b/qplayer2demo/qplayer2demo/Resource/urls.json index 7b54fc3..731ab20 100644 --- a/qplayer2demo/qplayer2demo/Resource/urls.json +++ b/qplayer2demo/qplayer2demo/Resource/urls.json @@ -913,12 +913,12 @@ { "userType": "", "urlType": 0, - "url": "http://80rjmu.com1.z0.glb.clouddn.com/ncyY3ioGAakS-Lg252IscrXNxyo=/Fgny-rvibYqoFP-lPkI53JfmoIx5", + "url": "https://kodo.koafun.com/qiniu-2023-1080p-new.m3u8?v=123123", "quality": 360, "isSelected": 1, "backupUrl": "", "referer": "", - "hlsDrmKey": "testtesttesttest" + "hlsDrmKey": "abcdefgh12345678" } ] @@ -1065,7 +1065,7 @@ } ] } - ] - + + From 2619015ae523dcedea589a6a7fad74b958ac3419 Mon Sep 17 00:00:00 2001 From: Mengwangchao Date: Wed, 8 May 2024 16:03:38 +0800 Subject: [PATCH 08/15] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit d810efa4262129e1c3c8b79e52b6dcbbc7d714c6) --- .../qplayer2demo/Base.lproj/Main.storyboard | 82 ++----------------- 1 file changed, 5 insertions(+), 77 deletions(-) diff --git a/qplayer2demo/qplayer2demo/Base.lproj/Main.storyboard b/qplayer2demo/qplayer2demo/Base.lproj/Main.storyboard index 904bd67..cdad03e 100644 --- a/qplayer2demo/qplayer2demo/Base.lproj/Main.storyboard +++ b/qplayer2demo/qplayer2demo/Base.lproj/Main.storyboard @@ -1,18 +1,16 @@ - - - - + + - + - + - + @@ -20,78 +18,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From e4a0e9970309288e008fdf08ddf31e45f3ef9ad2 Mon Sep 17 00:00:00 2001 From: Mengwangchao Date: Thu, 16 May 2024 15:04:32 +0800 Subject: [PATCH 09/15] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit f7a210d2537927a4063a179651da0e07ba585878) --- .../html/Classes/QMediaItemContext.html | 2 +- .../Classes/QMediaItemControlHandler.html | 2 +- .../html/Classes/QMediaModel.html | 18 ++++-- .../html/Classes/QMediaModelBuilder.html | 2 +- .../html/Classes/QPlayerContext.html | 2 +- .../html/Classes/QPlayerControlHandler.html | 62 ++++++++++++++++++- .../html/Classes/QPlayerRenderHandler.html | 2 +- .../html/Classes/QPlayerView.html | 2 +- .../html/Classes/QRenderView.html | 2 +- .../html/Classes/QStreamElement.html | 2 +- .../html/Classes/QSubtitleElement.html | 2 +- .../html/Classes/Reachability.html | 2 +- .../html/Constants/QChannelLayout.html | 2 +- .../html/Constants/QLogLevel.html | 2 +- .../html/Constants/QMediaItemNotify.html | 2 +- .../html/Constants/QMediaItemState.html | 2 +- .../QPlayerAuthenticationErrorType.html | 2 +- .../html/Constants/QPlayerBlind.html | 2 +- .../html/Constants/QPlayerDecoder.html | 2 +- .../html/Constants/QPlayerDecoderType.html | 2 +- .../html/Constants/QPlayerOpenError.html | 2 +- .../html/Constants/QPlayerRenderRatio.html | 2 +- .../html/Constants/QPlayerRenderType.html | 2 +- .../html/Constants/QPlayerSeek.html | 2 +- .../html/Constants/QPlayerShootVideoType.html | 2 +- .../html/Constants/QPlayerStart.html | 2 +- .../html/Constants/QPlayerState.html | 2 +- .../html/Constants/QPlayerURLType.html | 2 +- .../html/Constants/QSampleFormat.html | 2 +- .../html/Constants/QVideoType.html | 2 +- .../QIMediaItemCommandNotAllowListener.html | 2 +- .../QIMediaItemStateChangeListener.html | 2 +- .../Protocols/QIPlayerAudioDataListener.html | 2 +- .../html/Protocols/QIPlayerAudioListener.html | 2 +- .../QIPlayerAuthenticationListener.html | 2 +- .../Protocols/QIPlayerBiteRateListener.html | 2 +- .../Protocols/QIPlayerBufferingListener.html | 2 +- .../QIPlayerCommandNotAllowListener.html | 2 +- .../Protocols/QIPlayerDownloadListener.html | 2 +- .../html/Protocols/QIPlayerFPSListener.html | 2 +- .../Protocols/QIPlayerFormatListener.html | 2 +- .../QIPlayerMediaNetworkListener.html | 2 +- .../Protocols/QIPlayerProgressListener.html | 2 +- .../Protocols/QIPlayerQualityListener.html | 2 +- .../Protocols/QIPlayerRenderListener.html | 2 +- .../Protocols/QIPlayerSEIDataListener.html | 2 +- .../html/Protocols/QIPlayerSeekListener.html | 2 +- .../Protocols/QIPlayerShootVideoListener.html | 2 +- .../html/Protocols/QIPlayerSpeedListener.html | 2 +- .../QIPlayerStateChangeListener.html | 2 +- .../Protocols/QIPlayerSubtitleListener.html | 2 +- .../Protocols/QIPlayerVideoDataListener.html | 2 +- .../QIPlayerVideoDecodeListener.html | 2 +- .../QIPlayerVideoFrameSizeChangeListener.html | 2 +- document/qplayer2-core/html/hierarchy.html | 2 +- document/qplayer2-core/html/index.html | 2 +- 56 files changed, 128 insertions(+), 60 deletions(-) diff --git a/document/qplayer2-core/html/Classes/QMediaItemContext.html b/document/qplayer2-core/html/Classes/QMediaItemContext.html index 7f51258..b5c15ef 100644 --- a/document/qplayer2-core/html/Classes/QMediaItemContext.html +++ b/document/qplayer2-core/html/Classes/QMediaItemContext.html @@ -337,7 +337,7 @@

Declared In