Not working JavaScript webpage on Smart TVs

Viewed 2585

We have made a JavaScript/JQuery webpage with loads data by a HTTP-Request by AJAX, saves the data in the local storage and cricle though the data (every 10 seconds a new page with a part of the data).

This page was used to show informations for companies on a TV. A small PC manages the display and shows the page though a Chrome browser. Now the customer wants to show the page through the build in Browser of the Smart TV. It's a quite new Samsung customer display with the normal Smart TV applications.

The problem is that the page is completely blank. We tested also on other devices (Philips Smart TV, Sony Android-TV, another Samsung devices and so on). On all devices the screen is blank.

So we ask ourselfs, if there is a function or a method which isn't supported on Smart TVs. The following methods we use. Is there anything (also maybe furthermore) which isn't supported in Smart TV browsers?

  • We have big blocks of HTML code which we add in the webpage with many concat().
  • To make the reqeust we use AJAX this way:
$.ajax({
    type: 'GET',
    url: URL,
    headers: { 'Authorization': AuthCode },
    success: data => {
        $(`.${widget.name}`).remove();
        widget.render(urlData, data);
    },
    error: data => {
        render_failed = true;
        if (render_failed) { setTimeout(() => {render(urlData)}, 10000); }
    }
});
  • There is a recursion in the appliation. render() calls itself after a timeout: setTimeout(() => {render(urlData)}, 10000)
  • We only import JQuery: <script type="text/javascript" src="../js/jquery-3.4.1.min.js"></script>
1 Answers

The same problem occurred on a samsung's QLed tv. The problem was in a css. That tv's doesn't accept rgba() color format. But, the same color with a same opacity works well in #... format.) Now works well! And jquery, for example on iphones, will not work properly, if outsade $(window).on('load', function...)

Related