LGTV -WebOS - Is there a way to open an URL on the TV browser?

时间秒杀一切 提交于 2020-05-14 09:06:07

问题


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

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

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.

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?


回答1:


I used this approach.

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);
        },
    });
}

It requires webOS.js or webOSTV.js library.



来源:https://stackoverflow.com/questions/61416919/lgtv-webos-is-there-a-way-to-open-an-url-on-the-tv-browser

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!