Skip to content

Commit

Permalink
Merge pull request #5 from lawder/release/v1.0.0
Browse files Browse the repository at this point in the history
v1.0.0 release
  • Loading branch information
lawder authored Jun 29, 2018
2 parents 66c26b6 + aa2b5cc commit 46c069e
Show file tree
Hide file tree
Showing 33 changed files with 1,057 additions and 175 deletions.
15 changes: 15 additions & 0 deletions APIDiffs/api-diffs-1.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# QNRTCKit 0.2.0 to 1.0.0 API Differences

## General Headers

```
QNRTCSession.h
```

- *Added* method `- (instancetype)initWithCaptureEnabled:(BOOL)captureEnabled;`
- *Added* method `- (void)pushPixelBuffer:(CVPixelBufferRef)pixelBuffer;`
- *Added* method `- (void)pushAudioBuffer:(AudioBuffer *)audioBuffer;`

- *Added* property `@property (nonatomic, assign, readonly) BOOL captureEnabled;`


12 changes: 8 additions & 4 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
PODS:
- Bugsnag (5.15.4)
- QNRTCKit (0.2.0)
- QNRTCKit (1.0.0)

DEPENDENCIES:
- Bugsnag (= 5.15.4)
- QNRTCKit (from `../QNRTCKit.podspec`)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Bugsnag

EXTERNAL SOURCES:
QNRTCKit:
:path: ../QNRTCKit.podspec
:path: "../QNRTCKit.podspec"

SPEC CHECKSUMS:
Bugsnag: df1d395695ddf795aa35c23ef4eaef4a04ddcffd
QNRTCKit: 00542e4218ead6494bf0f4490e26265171f2ee31
QNRTCKit: 28ae27de7fb283715e4c96fa66c93951e867008d

PODFILE CHECKSUM: a3da902c30391294160165266837eb7a0701c1d7

COCOAPODS: 1.4.0
COCOAPODS: 1.5.3
4 changes: 2 additions & 2 deletions Example/Pods/Local Podspecs/QNRTCKit.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

258 changes: 134 additions & 124 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Example/Pods/Target Support Files/Bugsnag/Bugsnag.xcconfig

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 12 additions & 16 deletions Example/QNRTCKitDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/* Begin PBXBuildFile section */
5029EC5434AD3A66D8A128FD /* libPods-QNRTCKitDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D8BB45036542B95EF652274E /* libPods-QNRTCKitDemo.a */; };
B003EE9320E6130A009FC2C5 /* QRDMicrophoneSource.m in Sources */ = {isa = PBXBuildFile; fileRef = B003EE9020E61309009FC2C5 /* QRDMicrophoneSource.m */; };
B003EE9420E6130A009FC2C5 /* QRDScreenRecorderViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B003EE9220E61309009FC2C5 /* QRDScreenRecorderViewController.m */; };
B0769C6F1FBA97100051F9C2 /* VideoToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B0769C6E1FBA97090051F9C2 /* VideoToolbox.framework */; };
B0769C751FBADAFD0051F9C2 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B0769C741FBADAF70051F9C2 /* GLKit.framework */; };
B07BB0C72064E61D009218C1 /* user_agreement.html in Resources */ = {isa = PBXBuildFile; fileRef = B07BB0C62064E61C009218C1 /* user_agreement.html */; };
Expand Down Expand Up @@ -46,6 +48,10 @@

/* Begin PBXFileReference section */
474E520E8ACB91CC17307E39 /* Pods-QNRTCKitDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QNRTCKitDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-QNRTCKitDemo/Pods-QNRTCKitDemo.release.xcconfig"; sourceTree = "<group>"; };
B003EE8F20E61309009FC2C5 /* QRDScreenRecorderViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QRDScreenRecorderViewController.h; sourceTree = "<group>"; };
B003EE9020E61309009FC2C5 /* QRDMicrophoneSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QRDMicrophoneSource.m; sourceTree = "<group>"; };
B003EE9120E61309009FC2C5 /* QRDMicrophoneSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QRDMicrophoneSource.h; sourceTree = "<group>"; };
B003EE9220E61309009FC2C5 /* QRDScreenRecorderViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QRDScreenRecorderViewController.m; sourceTree = "<group>"; };
B04AF08A1F9652A6009BAFEF /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; };
B04AF08C1F9652C7009BAFEF /* libicucore.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libicucore.tbd; path = usr/lib/libicucore.tbd; sourceTree = SDKROOT; };
B0769C6A1FBA96930051F9C2 /* libc++.1.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.1.tbd"; path = "usr/lib/libc++.1.tbd"; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -148,6 +154,8 @@
children = (
B0C660571F94F98300999C9F /* AppDelegate.h */,
B0C660581F94F98300999C9F /* AppDelegate.m */,
B003EE9120E61309009FC2C5 /* QRDMicrophoneSource.h */,
B003EE9020E61309009FC2C5 /* QRDMicrophoneSource.m */,
C30F0F96201033BD00A2A1CA /* QRDRTCViewController.h */,
C30F0F97201033BD00A2A1CA /* QRDRTCViewController.m */,
C3F800C6200E012A00ECDDC9 /* QRDLoginViewController.h */,
Expand All @@ -157,6 +165,8 @@
B07BB0CA2064E670009218C1 /* QRDAgreementViewController.h */,
B07BB0C82064E670009218C1 /* QRDAgreementViewController.m */,
B07BB0C92064E670009218C1 /* QRDAgreementViewController.xib */,
B003EE8F20E61309009FC2C5 /* QRDScreenRecorderViewController.h */,
B003EE9220E61309009FC2C5 /* QRDScreenRecorderViewController.m */,
C30F0F88200F58EF00A2A1CA /* ViewTools */,
C3F800A9200CB41600ECDDC9 /* QRDPublicHeader.h */,
C3AB77102062355F00A90770 /* launchImage@2x.jpg */,
Expand Down Expand Up @@ -200,7 +210,6 @@
B0C660521F94F98300999C9F /* Resources */,
B04AF0921F9652FB009BAFEF /* Embed Frameworks */,
45FBCD51C47E0F48596AE5CC /* [CP] Embed Pods Frameworks */,
5C8B6A591DB6EF1DC73526AA /* [CP] Copy Pods Resources */,
942A63FB5AAA43E9BE0ADEF9 /* Upload Bugsnag dSYM */,
);
buildRules = (
Expand Down Expand Up @@ -291,21 +300,6 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-QNRTCKitDemo/Pods-QNRTCKitDemo-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
5C8B6A591DB6EF1DC73526AA /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-QNRTCKitDemo/Pods-QNRTCKitDemo-resources.sh\"\n";
showEnvVarsInLog = 0;
};
942A63FB5AAA43E9BE0ADEF9 /* Upload Bugsnag dSYM */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -352,7 +346,9 @@
C30F0F83200F416500A2A1CA /* QRDSettingViewController.m in Sources */,
B0C660591F94F98300999C9F /* AppDelegate.m in Sources */,
B0C6606A1F94F98300999C9F /* main.m in Sources */,
B003EE9320E6130A009FC2C5 /* QRDMicrophoneSource.m in Sources */,
C30F0F98201033BD00A2A1CA /* QRDRTCViewController.m in Sources */,
B003EE9420E6130A009FC2C5 /* QRDScreenRecorderViewController.m in Sources */,
B07BB0CB2064E670009218C1 /* QRDAgreementViewController.m in Sources */,
C30F0F91200F590C00A2A1CA /* QRDSettingView.m in Sources */,
);
Expand Down
2 changes: 1 addition & 1 deletion Example/QNRTCKitDemo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.2.0</string>
<string>1.0.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
59 changes: 48 additions & 11 deletions Example/QNRTCKitDemo/QRDLoginViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#import "QRDAgreementViewController.h"
#import "QRDUserNameView.h"
#import "QRDJoinRoomView.h"
#import "QRDScreenRecorderViewController.h"

#define QRD_LOGIN_TOP_SPACE (QRD_iPhoneX ? 140: 100)

Expand Down Expand Up @@ -52,7 +53,7 @@ - (void)viewDidLoad {

self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(95, QRD_LOGIN_TOP_SPACE + 192, QRD_SCREEN_WIDTH - 198, QRD_SCREEN_HEIGHT - QRD_LOGIN_TOP_SPACE - 340)];
self.imageView.image = [UIImage imageNamed:@"qn_niu"];
[self.view addSubview:_imageView];
[self.view insertSubview:_imageView atIndex:0];
}

- (void)setupLoginViewWithStorage:(BOOL)storage {
Expand All @@ -72,7 +73,12 @@ - (void)setupLoginViewWithStorage:(BOOL)storage {
- (void)setupJoinRoomView {
_joinRoomView = [[QRDJoinRoomView alloc] initWithFrame:CGRectMake(QRD_SCREEN_WIDTH/2 - 150, QRD_LOGIN_TOP_SPACE, 308, 185)];
_joinRoomView.roomTextField.delegate = self;
NSString *roomName = [[NSUserDefaults standardUserDefaults] objectForKey:@"QN_ROOM_NAME"];
_joinRoomView.roomTextField.text = roomName;
[_joinRoomView.joinButton addTarget:self action:@selector(joinAction:) forControlEvents:UIControlEventTouchUpInside];
_joinRoomView.confButton.selected = YES;
[_joinRoomView.confButton addTarget:self action:@selector(confButtonClick:) forControlEvents:UIControlEventTouchUpInside];
[_joinRoomView.screenButton addTarget:self action:@selector(screenButtonClick:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:_joinRoomView];

_setButton = [[UIButton alloc] initWithFrame:CGRectMake(QRD_SCREEN_WIDTH - 36, QRD_LOGIN_TOP_SPACE - 68, 24, 24)];
Expand Down Expand Up @@ -127,11 +133,11 @@ - (void)nextAction:(UIButton *)next {
- (void)joinAction:(UIButton *)join {
[self.view endEditing:YES];

NSString *roomId;
NSString *roomName;
if (_joinRoomView.roomTextField.text.length != 0) {
_joinRoomView.roomTextField.text = [_joinRoomView.roomTextField.text stringByReplacingOccurrencesOfString:@" " withString:@""];
if ([self checkRoomName:_joinRoomView.roomTextField.text]) {
roomId = _joinRoomView.roomTextField.text;
roomName = _joinRoomView.roomTextField.text;
} else{
[self showAlertWithMessage:@"请按要求正确填写房间名称!"];
return;
Expand All @@ -140,17 +146,29 @@ - (void)joinAction:(UIButton *)join {
[self showAlertWithMessage:@"请填写房间名称!"];
return;
}
QRDRTCViewController *rtcVC = [[QRDRTCViewController alloc] init];
rtcVC.roomId = roomId;
rtcVC.userId = [[NSUserDefaults standardUserDefaults] objectForKey:@"QN_USER_ID"];


NSString *userId = [[NSUserDefaults standardUserDefaults] objectForKey:@"QN_USER_ID"];
NSDictionary *configDic = [[NSUserDefaults standardUserDefaults] objectForKey:@"QN_SET_CONFIG"];
if (configDic) {
if (!configDic) {
configDic = @{@"VideoSize":NSStringFromCGSize(CGSizeMake(480, 640)), @"FrameRate":@20, @"Bitrate":@600};
}

[[NSUserDefaults standardUserDefaults] setObject:roomName forKey:@"QN_ROOM_NAME"];
[[NSUserDefaults standardUserDefaults] synchronize];
if (_joinRoomView.confButton.selected) {
QRDRTCViewController *rtcVC = [[QRDRTCViewController alloc] init];
rtcVC.roomName = roomName;
rtcVC.userId = userId;
rtcVC.configDic = configDic;
} else{
rtcVC.configDic = @{@"VideoSize":NSStringFromCGSize(CGSizeMake(480, 640)), @"FrameRate":@20, @"Bitrate":@600};
[self.navigationController pushViewController:rtcVC animated:YES];
}
else {
QRDScreenRecorderViewController *recorderViewController = [[QRDScreenRecorderViewController alloc] init];
recorderViewController.roomName = roomName;
recorderViewController.userId = userId;
recorderViewController.configDic = configDic;
[self.navigationController pushViewController:recorderViewController animated:YES];
}
[self.navigationController pushViewController:rtcVC animated:YES];
}

- (void)settingAction:(UIButton *)setting {
Expand All @@ -163,6 +181,25 @@ - (void)agreementButtonClick:(id)sender {
button.selected = !button.isSelected;
}

- (void)confButtonClick:(id)sender {
if (_joinRoomView.screenButton.isSelected) {
_joinRoomView.confButton.selected = YES;
_joinRoomView.screenButton.selected = NO;
}
}

- (void)screenButtonClick:(id)sender {
if ([[[UIDevice currentDevice] systemVersion] floatValue] < 11.0) {
[self showAlertWithMessage:@"录屏分享仅支持 iOS 11 及以上系统"];
return;
}

if (_joinRoomView.confButton.isSelected) {
_joinRoomView.screenButton.selected = YES;
_joinRoomView.confButton.selected = NO;
}
}

- (void)agreementLabelTapped:(id)sender {
QRDAgreementViewController *agreementViewController = [[QRDAgreementViewController alloc] init];
[self presentViewController:agreementViewController animated:YES completion:nil];
Expand Down
Loading

0 comments on commit 46c069e

Please sign in to comment.