# Watch IPTV - uibuilder

**URL:** <https://discourse.nodered.org/t/watch-iptv-uibuilder/16881>\
**Category:** Share Your Projects\
**Created:** [19 October 2019 12:14 UTC](https://discourse.nodered.org/t/watch-iptv-uibuilder/16881 "2019-10-19T12:14:19Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [21 November 2019 12:26 UTC](https://discourse.nodered.org/t/watch-iptv-uibuilder/16881/21 "2019-11-21T12:26:21Z")

</div>

The value `in` msg.topic is defined, but in the function the variable `topic` is not the same as `msg.topic`. So in the line  
`topic = msg.payload.country`  
you could have used  
`foo = msg.payload.country`  
and since you have not defined `foo` you would get an error.

If you were using 'foo' the return would be  
`return {filename:filename,topic:foo};`

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [21 November 2019 12:33 UTC](https://discourse.nodered.org/t/watch-iptv-uibuilder/16881/22 "2019-11-21T12:33:36Z")

</div>

I'm confused. the variable `topic` is being set, nothing undefined about it, unless it is not set and it ends up at return with an undefined variable, ie. if it was not setup correctly. Because your suggestion only captures the error that is thrown, it would still not work.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [21 November 2019 13:16 UTC](https://discourse.nodered.org/t/watch-iptv-uibuilder/16881/23 "2019-11-21T13:16:05Z")

</div>

There is a bug in your code but I know why I am seeing it and you are not.

Assume that the incoming msg does not have a msg.payload.category and msg.payload.category and msg.payload.search. in that case the first and second IF statements are false and the variable `topic` will not exist. Since msg.payload.search also does not exist, the third IF statement will result in a TRUE condition and it will try to return a msg using wat is in a variable `topic` that has never been set causing the `topic is not defined` error to pop up in the debug. Adding the `var topic = '';` removes this error from happening _in this situation_.

Now for the reason this is happening. (notice that I am the second person to report this error). It has to do with messing up the install. In my case (due to another issue I'm looking into) the files were installed in a different folder than is needed, so I was getting the default uibuilder page. Clicking the 'increment' button will cause the error to show up.

The addition of the one line of code to the function will prevent the error from occurring.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [21 November 2019 14:57 UTC](https://discourse.nodered.org/t/watch-iptv-uibuilder/16881/24 "2019-11-21T14:57:59Z")

</div>

> The addition of the one line of code to the function will prevent the error from occurring.

But it would still not work (the page and the streams that is)  
I have modified the readme with the correct path.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [21 November 2019 16:06 UTC](https://discourse.nodered.org/t/watch-iptv-uibuilder/16881/25 "2019-11-21T16:06:33Z")

</div>

> [@bakman2](#):
>
> But it would still not work

the flow wouldn't do what you want, but it wouldn't cause the error to show up.

---

<div class="post-metadata">

**Author:** ![i8beef](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/i8beef/32/3161_2.png) [@i8beef](https://discourse.nodered.org/u/i8beef)\
**Post date:** [21 November 2019 17:01 UTC](https://discourse.nodered.org/t/watch-iptv-uibuilder/16881/26 "2019-11-21T17:01:50Z")

</div>

Chrome can play HLS streams without INSTALLING extensions, you just have to use the JS media source extensions stuff with something like [HLS.js](https://github.com/video-dev/hls.js/).

Its actually how I embed my camera stream into my node-red-dashboard interfaces...

---

<div class="post-metadata">

**Author:** ![genik70](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/genik70/32/1392_2.png) [@genik70](https://discourse.nodered.org/u/genik70)\
**Post date:** [8 December 2019 14:21 UTC](https://discourse.nodered.org/t/watch-iptv-uibuilder/16881/27 "2019-12-08T14:21:16Z")

</div>

Hi all!

While using Watch IPTV I got some issues. Such as:

1. After the last update of "uibuilder' to the version 2.0.6 the app stopped working. I had to get back to the version 2.0.5. Were there any breaking changes?

2. Has anyone found matching browser which works natively with HLS stream? Except Safari.

3. Maybe the question doesn't belong to this particular theme, but maybe you could answer me. I'm trying to give an access to the "watch IPTV" from the outside of my network. I'm using reverse proxy server Caddy. But somehow only the first page could be opened. In the debugging regime Chrome F12 I can see a lot of mistakes.

> Refused to apply style from 'https://[myaddress].duckdns.org/uibuilder/vendor/bootstrap-vue/dist/bootstrap-vue.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.Refused to apply style from 'https://[myaddress].duckdns.org/uibuilder/vendor/bootstrap-vue/dist/bootstrap-vue.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

> Failed to load resource: the server responded with a status of 404 ()

Thanks for any suggestions!

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 December 2019 14:48 UTC](https://discourse.nodered.org/t/watch-iptv-uibuilder/16881/28 "2019-12-08T14:48:43Z")

</div>

> [@genik70](#):
>
> After the last update of "uibuilder' to the version 2.0.6 the app stopped working. I had to get back to the version 2.0.5. Were there any breaking changes?

Not that I am aware of. Are there any errors showing either in the Node-RED log or the browser console?

You can always see the changes on the Releases page:

> **[Releases · TotallyInformation/node-red-contrib-uibuilder](https://github.com/TotallyInformation/node-red-contrib-uibuilder/releases)**
>
> Easily create data-driven web UI's for Node-RED using any (or no) front-end framework. - TotallyInformation/node-red-contrib-uibuilder

Also, if you click on the code in the left margin for a release, you will get all of the actual changes since the previous release - the CHANGELOG file also contains a link that will show you those.  
Release page: ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/69496c87186430e4194a84394bd34183eb6ac7c0.png) Changelog: ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/0cab860dcf712e94cc815f6bf137ca98d091a99c.png)

> **[Comparing v2.0.5...v2.0.6 · TotallyInformation/node-red-contrib-uibuilder](https://github.com/TotallyInformation/node-red-contrib-uibuilder/compare/v2.0.5...v2.0.6)**
>
> Easily create data-driven web UI's for Node-RED using any (or no) front-end framework. - Comparing v2.0.5...v2.0.6 · TotallyInformation/node-red-contrib-uibuilder

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/a/a15e6a558d0ca90370002000311f5e7486b33d9a.png)

> [@genik70](#):
>
> Has anyone found matching browser which works natively with HLS stream? Except Safari.

> **[Can I use... Support tables for HTML5, CSS3, etc](https://caniuse.com/#search=hls)**
>
> "Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.

> [@genik70](#):
>
> I can see a lot of mistakes

The CSS warnings are because you don't have `type="text/css" ` on your CSS links in the index.html file. This changed with a version update of Node-RED at some point and relates to the ExpressJS app servers created.

> [@genik70](#):
>
> Failed to load resource: the server responded with a status of 404 ()

We need to know which resource this is. If you open the network tab of your browser and reload the page, you should be able to spot it easily enough.

You might also want to share at least the outline of your html.

[Previous page](https://discourse.nodered.org/t/watch-iptv-uibuilder/16881.md?page=1)
