Playing YouTube video in LG TV

Hi everybody. I am new to LG. I want to play a YouTube video from my app.

When I run my app in the Simulator (on Window 10) it telling me:

‘errorCode: -101, errorText: “The app was not found.”’

If I buy a LG TV, will I be able to launch YouTube ?

What is YouTube’s appId ?

=======================

It seems that no apps, beside my app, are installed within the simulator.

Here is the code I run:

var request = webOS.service.request('luna://com.webos.applicationManager', {
  method: 'launch',
  parameters: {
    id: 'com.webos.app.browser',
    params: {
      url: 'https://see-a-movie.com/',
    },
  },
  onSuccess: function (inResponse) {
    console.log('The app is launched');
    // To-Do something
  },
  onFailure: function (inError) {
    console.log('Failed to launch the app');
    console.log('[' + inError.errorCode + ']: ' + inError.errorText);
    // To-Do something
    return;
  },
});

webOS TV apps are web-based. It’s not much different from general web app development. You can find more information by searching Google for how to play YouTube videos in HTML. Thank you.