# Roku channel stream has 1 too many clicks

**URL:** <https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692>\
**Category:** Archived\
**Tags:** roku-developer-program\
**Created:** [January 5, 2016, 8:14pm UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692 "2016-01-05T20:14:51Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![matrixebiz](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@matrixebiz](https://forum.developer.roku.com/u/matrixebiz)\
**Post date:** [March 14, 2016, 1:20am UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/21 "2016-03-14T01:20:00Z")

</div>

also, do the channel icons have to be in png? jpg is smaller sizes. plus do we need all those brs files? my channel is too big in size for Roku 1’s so I would like to delete the extra ones or do they make it compatible with the older roku’s?

---

<div class="post-metadata">

**Author:** ![Komag](https://avatars.discourse-cdn.com/v4/letter/k/5fc32e/32.png) [@Komag](https://forum.developer.roku.com/u/Komag)\
**Post date:** [March 14, 2016, 10:23am UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/22 "2016-03-14T10:23:50Z")

</div>

You’re still talking about 2mb size limit? It doesn’t apply any more, at all. Old Rokus are no longer supported by the company - new channels aren’t available for them at all, regardless of size, so you can completely ignore them.

---

<div class="post-metadata">

**Author:** ![matrixebiz](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@matrixebiz](https://forum.developer.roku.com/u/matrixebiz)\
**Post date:** [March 14, 2016, 11:43am UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/23 "2016-03-14T11:43:30Z")

</div>

yeah, the size is 2.5 mb now. Not sure why zipping it makes it bigger because the size of the raw files are only 1.2 mb

---

<div class="post-metadata">

**Author:** ![Komag](https://avatars.discourse-cdn.com/v4/letter/k/5fc32e/32.png) [@Komag](https://forum.developer.roku.com/u/Komag)\
**Post date:** [March 14, 2016, 3:16pm UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/24 "2016-03-14T15:16:59Z")

</div>

I’ve never seen that happen, I’m skeptical

---

<div class="post-metadata">

**Author:** ![matrixebiz](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@matrixebiz](https://forum.developer.roku.com/u/matrixebiz)\
**Post date:** [March 14, 2016, 8:19pm UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/25 "2016-03-14T20:19:54Z")

</div>

is it easy to have the channel look at a pastbin file/playlist instead of having the direct streams (m3u8) in the code so that if I need to change a stream link right away I don’t have to package an update and wait for Roku to publish the update to the channel, I can just change the link in my pastbin file on the fly and be done with it?

---

<div class="post-metadata">

**Author:** ![belltown](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@belltown](https://forum.developer.roku.com/u/belltown)\
**Post date:** [March 14, 2016, 8:32pm UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/26 "2016-03-14T20:32:07Z")

</div>

> “matrixebiz” wrote:  
> is it easy?  
> Obviously not, or you would have done it already. If you can be more specific about why it’s not working, it will be easier to help you.

---

<div class="post-metadata">

**Author:** ![matrixebiz](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@matrixebiz](https://forum.developer.roku.com/u/matrixebiz)\
**Post date:** [March 14, 2016, 8:55pm UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/27 "2016-03-14T20:55:19Z")

</div>

Unfortunately I have no idea on what to change in the code to have the channel pull my channels from a pastbin link instead of the current XML file.  
So what I mean is, is it easy for you 🙂 to guide me how to do it and what to change or is it hard and I will need to re-write the whole channel instead of just changing a few pointers in the current Main.brs file. So for me, it is currently Hard since I would not know where to start but if is just a matter of showing me where to change a few pointers, then it will be easy for me from then on 🙂

---

<div class="post-metadata">

**Author:** ![belltown](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@belltown](https://forum.developer.roku.com/u/belltown)\
**Post date:** [March 14, 2016, 9:41pm UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/28 "2016-03-14T21:41:32Z")

</div>

Change “pkg:/blahblahblah” to “[http://pastebin/raw/blahblahblah](http://pastebin/raw/blahblahblah)” or whatever the url is for your xml files, images, etc.

---

<div class="post-metadata">

**Author:** ![matrixebiz](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@matrixebiz](https://forum.developer.roku.com/u/matrixebiz)\
**Post date:** [March 14, 2016, 9:59pm UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/29 "2016-03-14T21:59:25Z")

</div>

In my Main.brs I have;  
’ Parse the top-level Xml file, passing the resultant hierarchical content list to the UI display function  
uiDisplay (parseXmlDocument (“pkg:/xml/links.xml”))

So when I change it to;

’ Parse the top-level Xml file, passing the resultant hierarchical content list to the UI display function  
uiDisplay (parseXmlDocument (“[http://pastebin.com/raw/Wg5r2766](http://pastebin.com/raw/Wg5r2766)”))

Says unable to to parse xml because the pastbin site/file is not an xml it is a playlist of m3u8 links

---

<div class="post-metadata">

**Author:** ![belltown](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@belltown](https://forum.developer.roku.com/u/belltown)\
**Post date:** [March 14, 2016, 10:02pm UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/30 "2016-03-14T22:02:14Z")

</div>

Does it work when you use: uiDisplay (parseXmlDocument (“pkg:/xml/links.xml”)) ?

---

<div class="post-metadata">

**Author:** ![matrixebiz](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@matrixebiz](https://forum.developer.roku.com/u/matrixebiz)\
**Post date:** [March 14, 2016, 10:06pm UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/31 "2016-03-14T22:06:16Z")

</div>

Oh, crap, I see what you are saying now. Post a copy of the xml file to pastbin because currently the pastbin raw file is a playlist of m3u links not an xml.

I’ll try that now.

---

<div class="post-metadata">

**Author:** ![belltown](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@belltown](https://forum.developer.roku.com/u/belltown)\
**Post date:** [March 14, 2016, 10:08pm UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/32 "2016-03-14T22:08:07Z")

</div>

… and change any references in the xml file and other files it includes to use either http:// or pkg:// depending on where your resources are located.

---

<div class="post-metadata">

**Author:** ![matrixebiz](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@matrixebiz](https://forum.developer.roku.com/u/matrixebiz)\
**Post date:** [March 14, 2016, 10:18pm UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/33 "2016-03-14T22:18:24Z")

</div>

Ok, now that was easy 🙂  
I didn’t need to change anything in the xml file either because the resources are the same so when it parses the xml where ever it is, the roku still knows to grab the image from my images location item : sdImg=“pkg:/images/C214x144Sd.png”

So I didn’t actually need to change anything else except the link to where my xml is in Main.brs

Thx again

---

<div class="post-metadata">

**Author:** ![matrixebiz](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@matrixebiz](https://forum.developer.roku.com/u/matrixebiz)\
**Post date:** [June 24, 2016, 6:56pm UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/34 "2016-06-24T18:56:41Z")

</div>

> “belltown” wrote:
> 
> If instead you were to use the NewVideoPlayer ([http://forums.roku.com/viewtopic.php?f=34&t=91672&p=516080](http://forums.roku.com/viewtopic.php?f=34&t=91672&p=516080)), which you can get from [https://github.com/belltown/Roku-NewVideoPlayer](https://github.com/belltown/Roku-NewVideoPlayer)  
> **Hi belltown, is there a reason why you removed the “showFeed.brs” file from your SDK?**

**I read that if I want to help users who have lower internet speeds to read hls streams properly to help loading issues, I should add the below code to my XML file to adjust the quality of the stream on the fly?;**

```auto

<switchingStrategy>full-adaptation</switchingStrategy>

```

**but for this to work properly, I also need to add the below to the showFeed.brs file;**

```auto

if item.StreamFormat = "" then 'set default streamFormat to mp4 if doesn't exist in xml
            item.StreamFormat = "HLS"
        endif
      If item.StreamFormat="hls" then
                 item.SwitchingStrategy="full-adaptation"
              End If

```

**but this file doesn’t exist anymore in your updated SDK package. Is this not needed anymore?**

---

<div class="post-metadata">

**Author:** ![belltown](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@belltown](https://forum.developer.roku.com/u/belltown)\
**Post date:** [June 24, 2016, 8:39pm UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/35 "2016-06-24T20:39:54Z")

</div>

According to the documentation, the default HLS SwitchingStrategy is “full-adaptation”, so it shouldn’t be necessary to specify this in the content meta-data. However, I’ve updated [NewVideoPlayer](https://github.com/belltown/Roku-NewVideoPlayer) on GitHub to allow you to specify full-adaptation in a Roku Feed (or any other allowable value for switching strategy), if the streamFormat is “hls” (see [categories.xml](https://github.com/belltown/Roku-NewVideoPlayer/blob/master/xml/categories.xml))

The file that handles the change is [RokuFeed.brs](https://github.com/belltown/Roku-NewVideoPlayer/blob/master/source/RokuFeed.brs)

---

<div class="post-metadata">

**Author:** ![matrixebiz](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@matrixebiz](https://forum.developer.roku.com/u/matrixebiz)\
**Post date:** [June 24, 2016, 9:11pm UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/36 "2016-06-24T21:11:29Z")

</div>

Ok, thanks I’ll check it out.  
On the thread I was reading (Can’t find it now and I think it was from last year) the ‘default HLS SwitchingStrategy’ code was broken or something so hence the reason why users had to manually add the code I mentioned above to force it but maybe that is fixed already ??

Will this help with the users Roku’s who have slower internet speeds constantly pause and do the Loading … thing every few minutes?  
or is there something else I can code in for this detection? a drop in quality is less annoying than that Loading screen all the time.  
(I have no control over the stream source/feed so I can’t lower the HD video quality at the source)

---

<div class="post-metadata">

**Author:** ![belltown](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@belltown](https://forum.developer.roku.com/u/belltown)\
**Post date:** [June 24, 2016, 9:30pm UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/37 "2016-06-24T21:30:26Z")

</div>

If the stream is encoded at a bitrate that’s higher than the users’ internet connections can handle, then there’s nothing you can do about that.

---

<div class="post-metadata">

**Author:** ![matrixebiz](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@matrixebiz](https://forum.developer.roku.com/u/matrixebiz)\
**Post date:** [June 26, 2016, 12:32am UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/38 "2016-06-26T00:32:46Z")

</div>

Hi belltown, as the channel reads my feed XML file and if I wanted to add something to the end of the streamUrl, like an authentication code for streams that contain ‘HD’ in the title, EG;

```auto

	 <item sdImg="pkg:/images/Tsc214x144Sd.png" hdImg="pkg:/images/Tsc290x218Hd.png">
            <title>Stream HD</title>
            <description></description>
            <streamFormat>hls</streamFormat>
			<media>
                <streamQuality>HD</streamQuality>
                <streamBitrate>0</streamBitrate>
                <streamUrl>http://stream.m3u8?id=</streamUrl>
            </media>
            <synopsis></synopsis>
            <genres></genres>
            <live>True</live>
        </item>

```

Where and which file can I modify to add this code in? The ‘authentication code’ is generated elsewhere so I cannot add it directly to the feed XMl file beforehand. Like for example, the XML is read and if the title has HD in it, then streamUrl = streamUrl + authentication code

Thank you

---

<div class="post-metadata">

**Author:** ![belltown](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@belltown](https://forum.developer.roku.com/u/belltown)\
**Post date:** [June 26, 2016, 1:15am UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/39 "2016-06-26T01:15:32Z")

</div>

> “matrixebiz” wrote:  
> Where and which file can I modify to add this code in? The ‘authentication code’ is generated elsewhere so I cannot add it directly to the feed XMl file beforehand. Like for example, the XML is read and if the title has HD in it, then streamUrl = streamUrl + authentication code  
> RokuFeed.brs in parseRokuItem() right after line 345, e.g:

```auto

        stream.url = _getXmlString (media, "streamUrl")
        stream.url = stream.url + authenticationCode

```

---

<div class="post-metadata">

**Author:** ![matrixebiz](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@matrixebiz](https://forum.developer.roku.com/u/matrixebiz)\
**Post date:** [June 26, 2016, 1:30am UTC](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692/40 "2016-06-26T01:30:15Z")

</div>

Hello, that is great for all the streams but like I mentioned I only want it to add the ‘authenticationcode’ to only the streams that have ‘HD’ in the Stream HD. Thx

[Previous page](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692.md?page=1)

[Next page](https://forum.developer.roku.com/t/roku-channel-stream-has-1-too-many-clicks/7692.md?page=3)
