Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
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" />
	   <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]" />
<Animation id="slideanimation"	duration="3" repeat="false" easeFunction="linear">
       <FloatFieldInterpolator id="slideanimationinterpolator" key="[0, 0]" keyValue="[0.0, 1.0]" fieldToInterp="hudgroup.opacity" />

My brightScript Code is Here.

sub OnContentChanged()
   item = ' ?" : " m.title.text =
   m.description.text =
   m.poster.uri =
 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.

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.