Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
elmik3
Level 7

LIVE HLS configuration

Hi, I have a little question; I have my private channel roku where I broadcast content hls, I want to know if there is a way to configure my channel for live transmission, I tried modifying this part of the code: (showfeed.brs): item.Live = "true"

item = init_show_feed_item()

        'fetch all values from the xml for the current show

        item.Live = "true"
        item.hdImg            = validstr(curShow@hdImg) 
        item.sdImg            = validstr(curShow@sdImg) 
        item.ContentId        = validstr(curShow.contentId.GetText()) 
        item.Title            = validstr(curShow.title.GetText()) 
        item.Description      = validstr(curShow.description.GetText()) 
        item.ContentType      = validstr(curShow.contentType.GetText())
        item.ContentQuality   = validstr(curShow.contentQuality.GetText())
        item.Synopsis         = validstr(curShow.synopsis.GetText())
        item.Genre            = validstr(curShow.genres.GetText())
        item.Runtime          = validstr(curShow.runtime.GetText())
        item.HDBifUrl         = validstr(curShow.hdBifUrl.GetText())
        item.SDBifUrl         = validstr(curShow.sdBifUrl.GetText())
        'item.StreamFormat     = validstr(curShow.streamFormat.GetText())
        'item.SwitchingStrategy= validstr(curShow.SwitchingStrategy.GetText())
        if item.StreamFormat = "" then  'set default streamFormat to mp4 if doesn't exist in xml
           item.StreamFormat = "hls"
        endif
        
        'map xml attributes into screen specific variables
        item.ShortDescriptionLine1 = item.Title 
        item.ShortDescriptionLine2 = item.Description
        item.HDPosterUrl           = item.hdImg
        item.SDPosterUrl           = item.sdImg

        item.Length = strtoi(item.Runtime)
        item.Categories = CreateObject("roArray", 5, true)
        item.Categories.Push(item.Genre)
        item.Actors = CreateObject("roArray", 5, true)
        item.Actors.Push(item.Genre)
        item.Description = item.Synopsis
        
        'Set Default screen values for items not in feed
        item.HDBranded = false
        item.IsHD = false
        item.StarRating = "90"
        item.ContentType = "episode" 

        'media may be at multiple bitrates, so parse an build arrays
        for idx = 0 to 4
            e = curShow.media[idx]
            if e  <> invalid then
                item.StreamBitrates.Push(strtoi(validstr(e.streamBitrate.GetText())))
                item.StreamQualities.Push(validstr(e.streamQuality.GetText()))
                item.StreamUrls.Push(validstr(e.streamUrl.GetText()))
            endif
        next idx
        
        showCount = showCount + 1
        feed.Push(item)

        skipitem:

    next

End Function





And configuring my xml file like this: <live>true</live>
<item sdImg="http://LOGO.PNG" hdImg="http://LOGO.PNG">
<title>MYCHANNEL</title>
[size=85][font=Helvetica Neue, Helvetica, Arial, sans-serif]<contentQuality>HD</contentQuality>[/font][/size]
<streamFormat>HLS</streamFormat>
<media>
<live>true</live>
<streamQuality>HD</streamQuality>
<streamBitrate>0</streamBitrate>
<streamUrl>https://mychannel.com/index.m3u8</streamUrl>
</media>
<synopsis>Sin Descripcion</synopsis>
<generes>Clip</generes>
[size=85][font=Helvetica Neue, Helvetica, Arial, sans-serif]</item>[/font][/size]


But it does not work, I have seen in other channels that even the progress bar shows this icon and my channel does not show it. If you know a trick, I would appreciate your support.

mychannel:


others channels:
0 Kudos
2 REPLIES 2
renojim
Community Streaming Expert

Re: LIVE HLS configuration

"elmik3" wrote:
item.Live = "true"


You want:
item.Live = true

No quotes.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
elmik3
Level 7

Re: LIVE HLS configuration

I think it makes me look stupid :|, but it worked perfectly, thankyou @renojim
0 Kudos