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.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kasiris
Channel Surfer

AudioListExample "skipcontent" and "play next"

Hello group, I have a small problem ... I'm trying to get the "AudioListExample" to programically play all of the audio's in the "audiolabellist" without user interaction. The way SceneGraph appears to me is equal to java (or in my case Android) however when I try to apply what generally works for some reason it simply don't. Below is my code and it would be a great help to findout where or how I'm going about my task wrong, thanks in advance 

 

    sub setaudio()
      audiocontent = m.audiolist.content.getChild(m.audiolist.itemFocused)
      m.audio.content = audiocontent
	  m.audio.control = "play"
	  
    end sub

    sub playaudio()
      m.audio.control = "stop"
      m.audio.control = "none"
      m.audio.control = "play"
	  
	  
    end sub

    sub controlaudioplay()
      if (m.audio.state = "finished") 
        m.audio.control = "stop"
        m.audio.control = "skipcontent"
      end if
    end sub
Labels (1)
1 REPLY 1
kasiris
Channel Surfer

Re: AudioListExample "skipcontent" and "play next"

I've tried this 

    sub playaudio()
      audiocontent = m.audiolist.content.getChild(m.audiolist.itemFocused)
      audiocontent.contentIsPlaylist=true
      m.audio.content = audiocontent
      m.audio.control = "stop"
      m.audio.control = "none"
      m.audio.control = "play"
      m.audio.nextContentIndex = "-1"
      m.audio.loop = true
    end sub

but it just put the player in loop on "itemFocused" any help anyone???

0 Kudos