|
@@ -118,6 +118,10 @@
|
|
{
|
|
{
|
|
_bottomContrView = [[webRtcPlayerBottomContrView alloc] init];
|
|
_bottomContrView = [[webRtcPlayerBottomContrView alloc] init];
|
|
[self.view addSubview:_bottomContrView];
|
|
[self.view addSubview:_bottomContrView];
|
|
|
|
+ KWeakSelf
|
|
|
|
+ _bottomContrView.didClickButtonFun = ^(NSInteger tag) {
|
|
|
|
+ [weakSelf didClickBottomFunBy:tag];
|
|
|
|
+ };
|
|
|
|
|
|
/*控制按钮*/
|
|
/*控制按钮*/
|
|
UIImage *driftBtnImage = [UIImage imageNamed:@"you_icon"];
|
|
UIImage *driftBtnImage = [UIImage imageNamed:@"you_icon"];
|
|
@@ -186,6 +190,34 @@
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#pragma mark 底部按钮事件
|
|
|
|
+- (void)didClickBottomFunBy:(NSInteger)tag
|
|
|
|
+{
|
|
|
|
+ int keyType = 0;
|
|
|
|
+ if(tag == 1){//task
|
|
|
|
+ keyType = 187;
|
|
|
|
+ }
|
|
|
|
+ else if(tag == 2){//home
|
|
|
|
+ keyType = 3;
|
|
|
|
+ }
|
|
|
|
+ else if(tag == 3){//back
|
|
|
|
+ keyType = 4;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(keyType > 0){
|
|
|
|
+ [self didClickKeyEventFunBy:keyType];
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+#pragma mark 按键事件
|
|
|
|
+// home 3 back 4 task 187 volumeUp 24 volumeDown 25
|
|
|
|
+- (void)didClickKeyEventFunBy:(int)keyType
|
|
|
|
+{
|
|
|
|
+ [_mediaStream sendKey:keyType];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
#pragma mark WebRTC 回调 MediaStreamClientEventsDelegate
|
|
#pragma mark WebRTC 回调 MediaStreamClientEventsDelegate
|
|
#pragma mark - 宽高变化
|
|
#pragma mark - 宽高变化
|
|
-(void)onFrameResolutionChangedFromPeerName:(NSString*)peerName videoWidth:(int)videoWidth videoHeight:(int)videoHeight rotation:(int)rotation {
|
|
-(void)onFrameResolutionChangedFromPeerName:(NSString*)peerName videoWidth:(int)videoWidth videoHeight:(int)videoHeight rotation:(int)rotation {
|