简体   繁体   English

在 Web App Tizen [TV] 上旋转屏幕方向

[英]Rotate screen orientation on Web App Tizen [TV]

I'm developing a Web Application on Tizen.我正在 Tizen 上开发 Web 应用程序。 My application was first developed on other platforms like iOS and Android.我的应用程序最初是在 iOS 和 Android 等其他平台上开发的。

Basically it starts on Landscape mode and plays remote content such as image, video or opens a web page.基本上它以横向模式启动并播放远程内容,如图像、视频或打开 web 页面。 It has a menu inside the app to offer people the ability to change the screen orientation inside the app manually.它在应用程序内有一个菜单,让人们能够手动更改应用程序内的屏幕方向。 This approach is quite easy on iOS and Android but on Tizen seems it doesn't work that easy.这种方法在 iOS 和 Android 上非常容易,但在 Tizen 上似乎并不那么容易。

I'm following Tizen's official documentation which send's us to: https://w3c.github.io/screen-orientation/ But, can't make it work even though I followed steps written on the link above.我正在关注 Tizen 的官方文档,该文档将我们发送到: https://w3c.github.io/screen-orientation/但是,即使我按照上面链接中写的步骤操作,也无法使其工作。

This is what I got when I try to rotate:这是我尝试旋转时得到的:

Trying with:尝试:

screen.orientation.lock('portrait-primary')

Error:错误:

Promise {}
index.html:1 Uncaught (in promise) DOMException: The page needs to be fullscreen in order to call screen.orientation.lock().

PS The app is already in fullscreen. PS该应用程序已经全屏。 The error is not relevant.该错误不相关。

Do you have any ideas?你有什么想法?

Thank you谢谢

For all to those who are still trying to achieve this:对于所有仍在努力实现这一目标的人:

After having a long discussion with Samsung, they claimed that supporting the TV orientation via code is not possible right now (Not sure if it's gonna be implemented in the future).在与三星进行了长时间的讨论后,他们声称现在无法通过代码支持电视方向(不确定将来是否会实施)。 These restrictions come due to different operability of the hardware components on different orientation.这些限制来自于硬件组件在不同方向上的不同可操作性。

The only way to rotate your screen is to do it via Samsung's TV Settings so that it can prepare its hardware for the chosen orientation.旋转屏幕的唯一方法是通过三星的电视设置来完成,这样它就可以为所选方向准备硬件。

There are a special Samsung TVs for Advertising market (Digital Signage series) that are ready to set the orientation of the screen.有专门针对广告市场的三星电视(数字标牌系列)可以设置屏幕方向。

I comercial Samsung TV sets Tizen is not able to rotate some kind of elements (as far I know the video object are one of the HTML elements that cannot be rotated)我商业三星电视机 Tizen 无法旋转某种元素(据我所知,视频 object 是无法旋转的 HTML 元素之一)

I've developed some apps for Tizen and for one customer I tried to make a video wall but it was impossible due the firmware limitation of Tizen (it's a marketing strategy in order to avoid having hotel and digital signage capabilities in commercial TV sets)我为 Tizen 开发了一些应用程序,并为一位客户尝试制作视频墙,但由于 Tizen 的固件限制,这是不可能的(这是一种营销策略,以避免在商业电视机中拥有酒店和数字标牌功能)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM