Webrtc support in webos tv

Hi,
I tried google meet and webrtc samples (WebRTC samples) in my WebOS 6.3.2 with the embedded browser (chrome 79) and it works properly.
In particular trying to use getUserMedia it will display the permission dialog and if the user accepts it, then the usb camera connected to the tv starts accordingly.

If I put the application sample on a different https server, then the getUserMedia api fails without asking to the user to start the device. The working application is here:

The same code moved on a different server is not working.
The server has certificates and serves the webrtc app as requested by specifications.
I tried the app installed on my server from a pc and it works propertly.

Then it seems that the embedded browser in the tv fails using the getUserMedia api on any not whitelisted site.

Can you help me to make getUserMedia working?

Thank you in advance,
Emanuele

Hi,
sorry but this is not true, at least starting from WebOS 6.3.
Did you try the above link I posted above with the embedded browser?
All the main examples of webrtc samples are working well.
The problem is that they are working only from webrtc.github.io or google.com

Sorry for the confusion. If you have HTTPS issues, please check TLS and Root Certificates. The webOS TV has a list of trusted root certificates from LG. So all webOS TV app resources must use certificates using one of the root certificates. Please make sure all resources in your app are using the proper certificate and try again. Thank you.

Hi, it appears that you may be experiencing some issues related to SSL or CORS. I recommend that you try adding some JavaScript code to your server that logs the page you’re visiting. This might give you some useful information about what’s causing the issue. Alternatively, you could simulate the page from your server as a hosted web app and launch it in debug mode, which may also help you diagnose the problem.

If you’re in need of an SSL provider that works with LG, we have had success with Sectigo. It’s affordable and works well with webOS 4.0. We had some issues with LetsEncrypt on webOS 4.0, so we switched to Sectigo.

Additionally, I recommend using adapter.js for WebRTC, as LG uses older browser engines on webOS. You may encounter issues if you don’t use adapter. This library helps with cross-browser compatibility and should help ensure that your WebRTC implementation works smoothly on LG devices.

Hi,
in order to remove any doubt, I posted the webrtc sample on github.
I also included adapter.js script in the project, so it is loaded directly from the application site and not cross domain as in the original example.

But still it doesn’t work. The exact point wher it stops is this:

infoMsg('start init...');
const stream = await navigator.mediaDevices.getUserMedia(constraints);
infoMsg('after getUserMedia');

it never exits from getUserMedia and the reason could be that it waits for the permission of the user.
But because no dialog is displayed on the tv, then it will wait forever.
The question is why the dialog appears if you execute exactly the same code on webrtc_github_io

You can try on your tv.

The example that is not working is here:
https://emabiz.github.io/gum/

This is perfectly working using a browser on a pc.

Can someone explain why the permission dialog is not displayed on the tv?
Should some permissions be enabled somewhere in tv settings?

Thank you

The WebRTC specification is currently not open. Please contact your local LG office and discuss this with them. If you don’t have the contact information, you can contact LG customer service center first. Thank you.

Hi,
thank you for your response.
It is a pity that webrtc is not available for everyone.
Webcams are natively supported, and directly connectable to the tv, Webos allows to develop web applications easily, chrome/chromium is the embedded browser, the oled panel of LG is one of the best, then giving the possibility to develop webrtc apps could be a great opportunity for everyone, also LG.
How is it possible that trying to contact the local LG customer service (like I would do if I cannot switch on/off my tv) can give me any kind of help to solve the problem?
Trying this seems a joke to me.
I need to speak with dev team of LG or someone involved in Webos project, that’s why I am writing on this site.
Do you have any dev reference to speak with about this issue?
Otherwise the real answer would be: LG gives only to google the possibility to use webrt inside the tv. For the rest of the world there is no solution.

Please let me know if there is a real solution to this issue or not.

Thank you,

Regards
Emanuele

As we said above, the WebRTC specification is currently not open. If there are any updates, we will let you know via our website. Thank you.

hi,

i don’t know if it can help.
but we found I issue when you trying to talk in webrtc from the webOs Chrome (we are the 5.0) and a new chrome (v 110) but it worked with firefox.

i needed to change the sdp to remove this line :a=extmap-allow-mixed)\r\n/gm,

offer.sdp = offer.sdp.replace(/(a=extmap-allow-mixed)\r\n/gm, “”);

[workaround from unreal](https://forums.unrealengine.com/t/pixel-streaming-chrome-94-offerextmapallowmixed/252735/6)

have a nice day.
Daniel

Hello,
I am also facing the same problem with my webRTC application on TV OS, did you fix that error?
If I can fix it, can you tell me how to do it?
Any way is fine!
Thank you!

Unfortunately not.
It seems that only the owned google apps like google meet and webrtc samples can access devices (webcam/mic) from the browser, at least this is what happen on my tv/webos version.
I hope they will change this in the future, giving access to everyone.

Hi,
You said that you have had success with Sectigo certificate. But how successful is it? Since I also use that certificate and also adapter.js but my WebRTC still not working (no showing permission dialog)
If you have actually tested the Sectigo certificate with a WebRTC app, please let me know (demo, sample code, …)
Hope you reply soon
Thank you