urlXfer = createObject("roUrlTransfer")
urlXfer.SetCertificatesFile("common:/certs/ca-bundle.crt")
urlXfer.InitClientCertificates()
urlXfer.setUrl(uri)
urlXfer.setPort(m.port)
urlXfer.AddHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36")
' ********** Copyright 2016 Roku Corp. All Rights Reserved. **********
Function loadConfig() as Object
arr = [
'##### Format for inputting stream info #####
'## For each channel, enclose in brackets ##
'{
' Title: Channel Title
' streamFormat: Channel stream type (ex. "hls", "ism", "mp4", etc..)
' Logo: Channel Logo (ex. "http://Roku.com/Roku.jpg)
' Stream: URL to stream (ex. http://hls.Roku.com/talks/xxx.m3u8)
'}
{
Title: "CANAL 1"
streamFormat: "hls"
Logo: "pkg:/images/canal-1-.jpg"
Stream: "http://canal-streaming.com/playlist.m3u8"
}
{
Title: "CANAL 2"
streamFormat: "hls"
Logo: "pkg:/images/canal-2-.jpg"
Stream: "http://canal-streaming.com/playlist.m3u8"
}
{
Title: "CANAL 3"
streamFormat: "hls"
Logo: "pkg:/images/canal-3-.jpg"
Stream: "http://canal-streaming.com/playlist.m3u8"
}
'##### Make sure all Channel content is above this line #####
]
return arr
End Functio
"MasterRed" wrote:
Saludos Marcelo, mi consulta es parecida a la de matrixebiz o sino igual:
Estoy usando la nueva sdk de roku Multilive: https://github.com/rokudev/multi-live-channel, muy diferente a las anteriores versiones del player, entre este paquete se encuentra la carpeta components y el archivo config.brs, el cual relaciono a continuación, es un ejemplo con varios streaming, la pregunta es: en donde debo colocar el encabezado para el User-Agent, ya que algunos de los streaming a emitir solo podrían funcionar con el User-Agent, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36, he dedicado mucho tiempo a esto pero sin éxito alguno, de antemano gracias por el apoyo y la atención prestada.
Name: HttpHeaders
Type: array of strings
If set, the Scene Graph Audio or Video node sends these headers to the server. Each string must be of the format "name:value" When used with a Scene Graph Audio or Video node, the node or global HttpAgent is found, as explained elsewhere in this documentation. When this Content Meta-Data is played and this attribute is set, all HTTP headers in the agent are cleared and replaced with the headers defined by this attribute.
"marcelo.cabral" wrote:
All you need to do is add the headerurlXfer = createObject("roUrlTransfer")
urlXfer.SetCertificatesFile("common:/certs/ca-bundle.crt")
urlXfer.InitClientCertificates()
urlXfer.setUrl(uri)
urlXfer.setPort(m.port)
urlXfer.AddHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36")
The documentation is here:
https://sdkdocs.roku.com/display/sdkdoc/ifHttpAgent#ifHttpAgent-AddHeader(nameasString,valueasString...
<item sdImg="https://images/RobHopkins.jpg" hdImg="https://mages/RobHopkins.jpg">
<title>Rob Hopkins: Transition to a world without oil</title>
<contentId>10012</contentId>
<contentType>Talk</contentType>
<contentQuality>SD</contentQuality>
<streamFormat>hls</streamFormat>
<media>
<streamQuality>SD</streamQuality>
<streamBitrate>0</streamBitrate>
<streamUrl>http://video.ted.com/talks/podcast/RobHopkins_2009G_480.m3u8</streamUrl>
</media>
<synopsis></synopsis>
<genres></genres>
<runtime></runtime>
</item>
("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36")
<item sdImg="https://images/RobHopkins.jpg" hdImg="https://mages/RobHopkins.jpg">
<title>Rob Hopkins: Transition to a world without oil</title>
<contentId>10012</contentId>
<contentType>Talk</contentType>
<contentQuality>SD</contentQuality>
<streamFormat>hls</streamFormat>
<media>
<streamQuality>SD</streamQuality>
<streamBitrate>0</streamBitrate>
<streamUrl>http://video.ted.com/talks/podcast/RobHopkins_2009G_480.m3u8</streamUrl>
</media>
<synopsis></synopsis>
<genres></genres>
<runtime></runtime>
</item>
("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36")
"Mozilla/5.0 (iPad; CPU OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Version/10.0 Mobile/14D27 Safari/602.1"