LGTV -WebOS-是否可以在电视浏览器中打开URL? [英] LGTV -WebOS - Is there a way to open an URL on the TV browser?

查看:751
本文介绍了LGTV -WebOS-是否可以在电视浏览器中打开URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为LG/TV WebOS开发一个网络托管应用程序.

I am developing a web hosting app for the LG/TV WebOS.

我知道Web托管应用程序基本上是在浏览器引擎(Webkit?)中运行的.

I know that the web hosting app is basically running inside a browser engine (webkit?).

当用户要付款时(我使用Paypal是因为我不喜欢PaymentWall),该应用会将用户定向到Paypal确认页面,用户无须点击CORFIRM购买按钮.我没有看到鼠标"光标,也没有关于该主题的文档.

When the user is about to make the payment (I am using Paypal because I don't like PaymentWall), the app directs the user to the paypal confirmation page where there is no mean for the user to click on the CORFIRM PURCHASE button. I don't see the "mouse" cursor and there is no documentation I could find about the theme.

因此,我在考虑是否可以在电视的浏览器中启动该付款页面.

So, I was thinking if I could launch that payment page on the tv's browser.

该浏览器的光标会在我单击箭头时移动.

That browser has a cursor that moves when I click the arrows.

有什么办法吗?要将URL从应用程序启动到电视浏览器中?或使光标显示在应用程序内?

Any way to do that? To launch an URL from the app into the television browser? or to make the cursor appear inside the app?

推荐答案

我使用了这种方法.

openLink(url: string): void {
    webOS.service.request("luna://com.webos.applicationManager", {
        method: "launch",
        parameters: {
            id: "com.webos.app.browser",
            params: {
                target: url,
            },
        },
        onSuccess: (res: any): void => {
            console.log("Browser open success. ", res);
        },
        onFailure: (res: any): void => {
            console.log("Browser open fail. ", res);
        },
    });
}

它需要webOS.js或webOSTV.js库.

It requires webOS.js or webOSTV.js library.

这篇关于LGTV -WebOS-是否可以在电视浏览器中打开URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆