|
@@ -277,23 +277,23 @@
|
|
|
break;
|
|
|
case 100:
|
|
|
{
|
|
|
-// BOOL fullscreenType = [HWDataManager getBoolWithKey:Consn_player_full_screen_show];
|
|
|
-// if(fullscreenType){
|
|
|
-// [weakSelf showOpenTVP2PFun];
|
|
|
-// }
|
|
|
-// else{
|
|
|
-// [weakSelf openTvShowFun];
|
|
|
-// }
|
|
|
+ BOOL fullscreenType = [HWDataManager getBoolWithKey:Consn_player_full_screen_show];
|
|
|
+ if(fullscreenType){
|
|
|
+ [weakSelf showOpenTVP2PFun];
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ [weakSelf openTvShowFun];
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
break;
|
|
|
case 101:
|
|
|
{
|
|
|
-// self->mPlayerView.controlBtn.userInteractionEnabled = NO;
|
|
|
-// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
-// self->mPlayerView.controlBtn.userInteractionEnabled = YES;
|
|
|
-// });
|
|
|
-// [weakSelf showCloseTVP2PFun];
|
|
|
+ self.controlBtn.userInteractionEnabled = NO;
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ self->controlBtn.userInteractionEnabled = YES;
|
|
|
+ });
|
|
|
+ [weakSelf showCloseTVP2PFun];
|
|
|
}
|
|
|
break;
|
|
|
default:
|
|
@@ -395,6 +395,71 @@
|
|
|
[self.navigationController popViewControllerAnimated:YES];
|
|
|
}
|
|
|
|
|
|
+#pragma mark 显示关闭投屏提示语
|
|
|
+- (void)showOpenTVP2PFun{
|
|
|
+ /*弹窗提示TV投屏*/
|
|
|
+ ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"File_upload_Record_clear_Tip_title",nil)
|
|
|
+ msg:NSLocalizedString(@"cloudPhone_fullscreen_tvshow_tip",nil)
|
|
|
+ imageStr:@""
|
|
|
+ cancelTitle:NSLocalizedString(@"other_cancel",nil)
|
|
|
+ okTitle:NSLocalizedString(@"my_set_TVP2P_Open_sure",nil) isOkBtnHighlight:YES
|
|
|
+ didClickOk:^{
|
|
|
+ [self openTvShowFun];
|
|
|
+
|
|
|
+ //关闭全屏屏
|
|
|
+ [HWDataManager setBoolWithKey:Consn_player_full_screen_show value:NO];
|
|
|
+ [self setPlayerFullScreenNotFun];
|
|
|
+ } didClickCancel:^{
|
|
|
+
|
|
|
+ }];
|
|
|
+ nextVC.modalPresentationStyle = UIModalPresentationCustom;
|
|
|
+ [self presentViewController:nextVC animated:YES completion:^{
|
|
|
+ nextVC.view.superview.backgroundColor = [UIColor clearColor];
|
|
|
+ }];
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+#pragma mark 开始投屏
|
|
|
+- (void)openTvShowFun
|
|
|
+{
|
|
|
+ self.controlBtn.userInteractionEnabled = NO;
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ self->controlBtn.userInteractionEnabled = YES;
|
|
|
+ });
|
|
|
+ [[webRtcManager shareManager] onTvFun];
|
|
|
+
|
|
|
+ [[iToast makeText:NSLocalizedString(@"cloudPhone_TV_show_tip",nil)] show];
|
|
|
+
|
|
|
+ //数据埋点
|
|
|
+ [[netWorkManager shareInstance] DataEmbeddingPointBy:3 withEventValue:@"Cloud_tv"];
|
|
|
+}
|
|
|
+
|
|
|
+#pragma mark 显示关闭投屏提示语
|
|
|
+- (void)showCloseTVP2PFun{
|
|
|
+ /*弹窗提示TV投屏*/
|
|
|
+ ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_no_close_TV_p2p_tip",nil)
|
|
|
+ msg:@""
|
|
|
+ imageStr:@""
|
|
|
+ cancelTitle:NSLocalizedString(@"other_cancel",nil)
|
|
|
+ okTitle:NSLocalizedString(@"my_set_TVP2P_Open_sure",nil) isOkBtnHighlight:YES
|
|
|
+ didClickOk:^{
|
|
|
+ [self gotoCloseTVP2PFun];
|
|
|
+ } didClickCancel:^{
|
|
|
+ //HLog(@"2222");
|
|
|
+
|
|
|
+ }];
|
|
|
+ nextVC.modalPresentationStyle = UIModalPresentationCustom;
|
|
|
+ [self presentViewController:nextVC animated:YES completion:^{
|
|
|
+ nextVC.view.superview.backgroundColor = [UIColor clearColor];
|
|
|
+ }];
|
|
|
+}
|
|
|
+
|
|
|
+#pragma mark 确认开始TV投屏
|
|
|
+-(void)gotoCloseTVP2PFun
|
|
|
+{
|
|
|
+ [[webRtcManager shareManager] offTvFun];
|
|
|
+}
|
|
|
+
|
|
|
#pragma mark 底部按钮事件
|
|
|
- (void)didClickBottomFunBy:(NSInteger)tag
|
|
|
{
|
|
@@ -451,7 +516,7 @@
|
|
|
// NSString *commandStr = [RCCommandHelp commondToSetFullScreenPhoneSize];
|
|
|
// [self send_data:commandStr];
|
|
|
|
|
|
- NSInteger cardDensity = 480;//422;//380;//460;
|
|
|
+ NSInteger cardDensity = 380;//480;//422;//380;//460;
|
|
|
|
|
|
|
|
|
CGSize size = [RCCommandHelp commondToSetFullScreenPhoneSizeBySize];
|