8***@qq.com
8***@qq.com
  • 发布:2020-08-13 11:47
  • 更新:2023-04-06 14:56
  • 阅读:1459

【报Bug】横屏应用,LivePusher ,推流前置摄像头,ios 端,无法正常转横屏,android正常显示横屏。

分类:HTML5+

产品分类: HTML5+

HBuilderX版本号: 2.8.5

手机系统: iOS

手机系统版本号: iOS 13.4

手机厂商: 苹果

手机机型: iPad / iPhone

打包方式: 离线

示例代码:

pusher = new plus.video.LivePusher('pusher-box', {
'url': pushurl,
'aspect': '16:9',
'mode': 'SD',
top: top + 'px',
left: left + 'px',
width: width + 'px',
height: height + 'px'
});
plus.webview.currentWebview().append(pusher);

操作步骤:

pusher = new plus.video.LivePusher('pusher-box', {
'url': pushurl,
'aspect': '16:9',
'mode': 'SD',
top: top + 'px',
left: left + 'px',
width: width + 'px',
height: height + 'px'
});
plus.webview.currentWebview().append(pusher);

预期结果:

IOS 横屏应用,pusher推流摄像头无法正常转为横屏。

实际结果:

IOS 横屏应用,pusher推流摄像头无法正常转为横屏。

bug描述:

ios 端!!! 横屏应用!!!
LivePusher ,推流前置摄像头!!!(后置正常)
ios 端,无法正常转横屏,(android正常显示横屏)

2020-08-13 11:47 负责人:无 分享
已邀请:
9***@qq.com

9***@qq.com

你看会不会人帮你解决问题,据我多年观察,这个论坛就是个垃圾论坛,你的帖子可能两三年都不会有人帮你来解决问题

1***@qq.com

1***@qq.com

同遇到,没解决

星拾夜暝

星拾夜暝

首先,在AppDelegate.m中找到以下代码:

- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window  
{  
    // Return a bitmask of supported orientations. If you need more, use bitwise or (see commented line).  
    //return UIInterfaceOrientationMaskPortrait;  
    return UIInterfaceOrientationMaskAllButUpsideDown;  
}

然后,将代码修改为以下内容

- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window  
{  
    if (_allowRotation == YES) {  
        return UIInterfaceOrientationMaskAll;  
    }else{  
        return UIInterfaceOrientationMaskPortrait;  
    }  
}
星拾夜暝

星拾夜暝

如果您的 LivePusher 组件在 iOS 端无法正常转横屏,可能是由于以下原因之一:

您没有正确设置应用程序的屏幕方向。请确保您的应用程序已正确设置为支持横屏模式。可以在应用程序的 Info.plist 文件中添加以下键值对:

<key>UISupportedInterfaceOrientations</key>  
<array>  
    <string>UIInterfaceOrientationLandscapeRight</string>  
    <string>UIInterfaceOrientationLandscapeLeft</string>  
</array>

您没有正确设置 LivePusher 组件的屏幕方向。请确保您的 LivePusher 组件已正确设置为支持横屏模式。可以在组件的属性中添加以下键值对:

<live-pusher orientation="horizontal"></live-pusher>

您的设备可能不支持横屏模式。请检查您的设备是否支持横屏模式,并尝试在其他设备上测试 LivePusher 组件。

要回复问题请先登录注册