Commit 5d33c38a7d486711eae3cbba9d9a2ebb7f510567

Authored by 雷浩杰
1 parent e7f9a25d

1.1.0 增加 直播播放统计 和 点播播放统计

CNLiveStatSDKDemo/CNLiveStat.framework/CNLiveStat
No preview for this file type
CNLiveStatSDKDemo/CNLiveStat.framework/Headers/CNLiveStat.h
... ... @@ -41,4 +41,18 @@
41 41 */
42 42 + (void)endEvent:(NSString *)eventID;
43 43  
  44 +/* 直播播放统计
  45 + *
  46 + * channelId 直播channelId
  47 + *
  48 + */
  49 ++ (void)statLivePlayerWithChannelId:(NSString *)channelId;
  50 +
  51 +/* 点播播放统计
  52 + *
  53 + * vId 点播vId
  54 + *
  55 + */
  56 ++ (void)statVodPlayerWithVId:(NSString *)vId;
  57 +
44 58 @end
... ...
CNLiveStatSDKDemo/CNLiveStat.framework/Info.plist
No preview for this file type
CNLiveStatSDKDemo/CNLiveStatSDKDemo.xcodeproj/project.pbxproj
... ... @@ -7,17 +7,18 @@
7 7 objects = {
8 8  
9 9 /* Begin PBXBuildFile section */
  10 + 3256F7D21E0102A300510DFB /* CNLiveStat.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3256F7D11E0102A300510DFB /* CNLiveStat.framework */; };
10 11 32A77E971DD4629B00F4D4C9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 32A77E961DD4629B00F4D4C9 /* main.m */; };
11 12 32A77E9A1DD4629B00F4D4C9 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 32A77E991DD4629B00F4D4C9 /* AppDelegate.m */; };
12 13 32A77E9D1DD4629B00F4D4C9 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32A77E9C1DD4629B00F4D4C9 /* ViewController.m */; };
13 14 32A77EA01DD4629B00F4D4C9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32A77E9E1DD4629B00F4D4C9 /* Main.storyboard */; };
14 15 32A77EA21DD4629B00F4D4C9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 32A77EA11DD4629B00F4D4C9 /* Assets.xcassets */; };
15 16 32A77EA51DD4629B00F4D4C9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32A77EA31DD4629B00F4D4C9 /* LaunchScreen.storyboard */; };
16   - 32A77EAD1DD462EE00F4D4C9 /* CNLiveStat.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32A77EAC1DD462EE00F4D4C9 /* CNLiveStat.framework */; };
17 17 32A77EB01DD4636B00F4D4C9 /* TestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32A77EAF1DD4636B00F4D4C9 /* TestViewController.m */; };
18 18 /* End PBXBuildFile section */
19 19  
20 20 /* Begin PBXFileReference section */
  21 + 3256F7D11E0102A300510DFB /* CNLiveStat.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveStat.framework; sourceTree = "<group>"; };
21 22 32A77E921DD4629B00F4D4C9 /* CNLiveStatSDKDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CNLiveStatSDKDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
22 23 32A77E961DD4629B00F4D4C9 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
23 24 32A77E981DD4629B00F4D4C9 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
... ... @@ -28,7 +29,6 @@
28 29 32A77EA11DD4629B00F4D4C9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
29 30 32A77EA41DD4629B00F4D4C9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
30 31 32A77EA61DD4629B00F4D4C9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
31   - 32A77EAC1DD462EE00F4D4C9 /* CNLiveStat.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveStat.framework; sourceTree = "<group>"; };
32 32 32A77EAE1DD4636B00F4D4C9 /* TestViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestViewController.h; sourceTree = "<group>"; };
33 33 32A77EAF1DD4636B00F4D4C9 /* TestViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestViewController.m; sourceTree = "<group>"; };
34 34 /* End PBXFileReference section */
... ... @@ -38,7 +38,7 @@
38 38 isa = PBXFrameworksBuildPhase;
39 39 buildActionMask = 2147483647;
40 40 files = (
41   - 32A77EAD1DD462EE00F4D4C9 /* CNLiveStat.framework in Frameworks */,
  41 + 3256F7D21E0102A300510DFB /* CNLiveStat.framework in Frameworks */,
42 42 );
43 43 runOnlyForDeploymentPostprocessing = 0;
44 44 };
... ... @@ -48,7 +48,7 @@
48 48 32A77E891DD4629B00F4D4C9 = {
49 49 isa = PBXGroup;
50 50 children = (
51   - 32A77EAC1DD462EE00F4D4C9 /* CNLiveStat.framework */,
  51 + 3256F7D11E0102A300510DFB /* CNLiveStat.framework */,
52 52 32A77E941DD4629B00F4D4C9 /* CNLiveStatSDKDemo */,
53 53 32A77E931DD4629B00F4D4C9 /* Products */,
54 54 );
... ... @@ -330,6 +330,7 @@
330 330 32A77EAB1DD4629B00F4D4C9 /* Release */,
331 331 );
332 332 defaultConfigurationIsVisible = 0;
  333 + defaultConfigurationName = Release;
333 334 };
334 335 /* End XCConfigurationList section */
335 336 };
... ...
CNLiveStatSDKDemo/CNLiveStatSDKDemo/ViewController.m
... ... @@ -41,6 +41,28 @@
41 41 durationTestBtn.layer.borderWidth = 1;
42 42 [self.view addSubview:durationTestBtn];
43 43  
  44 + UIButton *liveTestBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  45 + liveTestBtn.frame = CGRectMake((CGRectGetWidth(self.view.frame)-150)/2, 300, 150, 50);
  46 + [liveTestBtn setTitle:@"直播播放统计" forState:UIControlStateNormal];
  47 + [liveTestBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal];
  48 + [liveTestBtn addTarget:self action:@selector(liveTestBtnAction) forControlEvents:UIControlEventTouchUpInside];
  49 + liveTestBtn.layer.cornerRadius = 10;
  50 + liveTestBtn.layer.masksToBounds = YES;
  51 + liveTestBtn.layer.borderColor = [UIColor blackColor].CGColor;
  52 + liveTestBtn.layer.borderWidth = 1;
  53 + [self.view addSubview:liveTestBtn];
  54 +
  55 + UIButton *vodTestBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  56 + vodTestBtn.frame = CGRectMake((CGRectGetWidth(self.view.frame)-150)/2, 400, 150, 50);
  57 + [vodTestBtn setTitle:@"点播播放统计" forState:UIControlStateNormal];
  58 + [vodTestBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal];
  59 + [vodTestBtn addTarget:self action:@selector(vodTestBtnAction) forControlEvents:UIControlEventTouchUpInside];
  60 + vodTestBtn.layer.cornerRadius = 10;
  61 + vodTestBtn.layer.masksToBounds = YES;
  62 + vodTestBtn.layer.borderColor = [UIColor blackColor].CGColor;
  63 + vodTestBtn.layer.borderWidth = 1;
  64 + [self.view addSubview:vodTestBtn];
  65 +
44 66 UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetHeight([UIScreen mainScreen].bounds)-60, CGRectGetWidth(self.view.frame), 30)];
45 67 label.text = @"北京中投视讯文化传媒股份有限公司";
46 68 [self.view addSubview:label];
... ... @@ -59,6 +81,16 @@
59 81 [self.navigationController pushViewController:test animated:YES];
60 82 }
61 83  
  84 +- (void)liveTestBtnAction
  85 +{
  86 + [CNLiveStat statLivePlayerWithChannelId:@"iosLivePlayStatTest"];
  87 +}
  88 +
  89 +- (void)vodTestBtnAction
  90 +{
  91 + [CNLiveStat statVodPlayerWithVId:@"iosVodPlayStatTest"];
  92 +}
  93 +
62 94 - (void)didReceiveMemoryWarning {
63 95 [super didReceiveMemoryWarning];
64 96 // Dispose of any resources that can be recreated.
... ...
统计SDK文档.pdf
No preview for this file type