RoVideoScreen 不加载视频
RoVideoScreen not loading video
我有一个 Roku 应用程序,它通过启动命令提供了指向视频的链接。然后该视频显示在 roVideoScreen
对象中。但是,视频无法加载。假设所有链接都有效,任何人都可以看到出了什么问题。任何帮助表示赞赏。
count = CreateObject("roInt")
count = info.Lookup("amount").ToInt()
bitrates = CreateObject("roArray", count, false)
qualities = CreateObject("roArray", count, false)
url = CreateObject("roArray", count, false)
StreamFormat = "mp4"
title = info.Lookup("title")
index = 0
if info.DoesExist("720") = true
url = info.Lookup("720")
bitrates.Push(2500)
qualities.Push("HD")
index = index + 1
end if
if info.DoesExist("480") = true
url = info.Lookup("480")
bitrates.Push(1200)
qualities.Push("SD")
index = index + 1
end if
if info.DoesExist("360") = true
url = info.Lookup("360")
bitrates.Push(700)
qualities.Push("SD")
index = index + 1
end if
if info.DoesExist("240") = true
url = info.Lookup("240")
bitrates.Push(380)
qualities.Push("SD")
index = index + 1
end if
videoclip = CreateObject("roAssociativeArray")
videoclip.StreamBitrates = bitrates
videoclip.StreamQualities = qualities
videoclip.StreamUrls = url
videoclip.StreamFormat = StreamFormat
videoclip.Title = title
video = CreateObject("roVideoScreen")
port = CreateObject("roMessagePort")
video.SetMessagePort(port)
video.SetContent(videoclip)
video.Show()
while true
end while
我将 url
声明为一个数组,但是,将其作为字符串进行右转,因此我需要将添加到 url
的行更改为
url.SetEntry(index,info.Lookup("480"))
我有一个 Roku 应用程序,它通过启动命令提供了指向视频的链接。然后该视频显示在 roVideoScreen
对象中。但是,视频无法加载。假设所有链接都有效,任何人都可以看到出了什么问题。任何帮助表示赞赏。
count = CreateObject("roInt")
count = info.Lookup("amount").ToInt()
bitrates = CreateObject("roArray", count, false)
qualities = CreateObject("roArray", count, false)
url = CreateObject("roArray", count, false)
StreamFormat = "mp4"
title = info.Lookup("title")
index = 0
if info.DoesExist("720") = true
url = info.Lookup("720")
bitrates.Push(2500)
qualities.Push("HD")
index = index + 1
end if
if info.DoesExist("480") = true
url = info.Lookup("480")
bitrates.Push(1200)
qualities.Push("SD")
index = index + 1
end if
if info.DoesExist("360") = true
url = info.Lookup("360")
bitrates.Push(700)
qualities.Push("SD")
index = index + 1
end if
if info.DoesExist("240") = true
url = info.Lookup("240")
bitrates.Push(380)
qualities.Push("SD")
index = index + 1
end if
videoclip = CreateObject("roAssociativeArray")
videoclip.StreamBitrates = bitrates
videoclip.StreamQualities = qualities
videoclip.StreamUrls = url
videoclip.StreamFormat = StreamFormat
videoclip.Title = title
video = CreateObject("roVideoScreen")
port = CreateObject("roMessagePort")
video.SetMessagePort(port)
video.SetContent(videoclip)
video.Show()
while true
end while
我将 url
声明为一个数组,但是,将其作为字符串进行右转,因此我需要将添加到 url
的行更改为
url.SetEntry(index,info.Lookup("480"))