chaklasiyanikun
Roku Guru

Hud Display For a 30 Second

I created one Hud in Roku. It Displayed successfully. But It's Required to press every time ok key. But I not write any code for ok key. I tried to set timmer here It's Display for 30 Seconds. But I'm not getting any idea which place set timmer so It work.  anyone know this situation.

my xml code is here

<Group id="hudgroup" opacity="0">
<LayoutGroup id="infogroup" layoutDirection="horiz" itemspacings="[27]" translation="[0,600]">
	<Rectangle id="background" width="1920" height="130" opacity="0.8" color="0x000000">
	   <Rectangle id="WhiteRectangle" color="0xFFFFFFFF" width="220" height="130">
	     <Poster id="poster" width="220" height="130" />
	   </Rectangle>
	   <Label id="title" font="font:MediumBoldSystemFont" translation="[230,10]" />
           <Label id="description" font="font:SmallestSystemFont" width="1000" wrap="true" maxLines="2" ellipsisText="..." translation="[230,60]" />
        </Rectangle>
</LayoutGroup>
<Animation id="slideanimation"	duration="3" repeat="false" easeFunction="linear">
       <FloatFieldInterpolator id="slideanimationinterpolator" key="[0, 0]" keyValue="[0.0, 1.0]" fieldToInterp="hudgroup.opacity" />
</Animation>
</Group>

My brightScript Code is Here.

sub OnContentChanged()
   item = m.top.content ' ?"m.top.content : "
   m.top.content m.title.text = m.top.content.title
   m.description.text = m.top.content.text
   m.poster.uri = m.top.content.hdposterurl
 if item <> invalid AND item.metadata <> invalid
   SetValue(m.title, item.metadata, "title")
   SetValue(m.description, item.metadata, "description")
   SetValue(m.poster, item.metadata, "poster") 
   ?"hud failed to set item"
 end if
end sub
function SetValue(node, item, field as String, defaultValue = "" as String)
  value = defaultValue
  if item.get(field) <> invalid then
   value = item.get(field)
  end if
' ?"value="value node.text = value
end function

Anyone know How doing I wrong Here.

Tags (1)
0 Kudos
Community is Temporarily in Read-Only Mode!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. You will not be able to log in or post new comments or kudos during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 12 and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

Thanks for your patience — we’re excited to share what’s next!