-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
570 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<component name="HomeScene" extends="BaseScene" xsi:noNamespaceSchemaLocation="https://devtools.web.roku.com/schema/RokuSceneGraph.xsd"> | ||
<script type="text/brightscript" uri="pkg:/components/HomeScene.brs" /> | ||
<children> | ||
<GridView id="grid" /> | ||
</children> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
sub Init() | ||
m.top.ObserveField("wasShown", "OnWasShown") | ||
end sub | ||
|
||
sub OnWasShown() | ||
m.episode_poster = m.top.findNode("episode_poster") | ||
m.episode_description = m.top.findNode("episode_description") | ||
|
||
m.audiolist = m.top.findNode("audioLabelList") | ||
m.audiolist.observeField("itemFocused", "setaudio") | ||
m.audiolist.observeField("itemSelected", "playaudio") | ||
|
||
m.audio = createObject("RoSGNode", "Audio") | ||
m.audio.observeField("state", "controlaudioplay") | ||
|
||
m.readAudioContentTask = createObject("RoSGNode", "PodcastTask") | ||
m.readAudioContentTask.observeField("content", "showaudiolist") | ||
m.readAudioContentTask.control = "RUN" | ||
end sub | ||
|
||
sub showaudiolist() | ||
m.audiolist.content = m.readAudioContentTask.content | ||
m.audiolist.setFocus(true) | ||
end sub | ||
|
||
sub setaudio() | ||
episode = m.audiolist.content.getChild(m.audiolist.itemFocused) | ||
|
||
m.episode_poster.uri = episode.hdPosterUrl | ||
m.episode_description.text = episode.Description | ||
m.audio.content = episode | ||
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 = "none" | ||
end if | ||
end sub | ||
|
||
function onKeyEvent(key as String,press as Boolean) as Boolean | ||
if press then | ||
if key = "back" | ||
if (m.audio.state = "playing") | ||
m.audio.control = "stop" | ||
return true | ||
end if | ||
end if | ||
end if | ||
return false | ||
end function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<component name="PodcastScene" extends="SGDEXComponent" xsi:noNamespaceSchemaLocation="https://devtools.web.roku.com/schema/RokuSceneGraph.xsd"> | ||
<script type="text/brightscript" uri="pkg:/components/PodcastScene.brs" /> | ||
<children> | ||
<Group> | ||
<LabelList | ||
id="audioLabelList" | ||
translation="[180, 100]" | ||
itemSize="[500, 60]" /> | ||
<Poster | ||
id="episode_poster" | ||
uri="pkg:/images/channeltv-poster-hd.png" | ||
height="250" | ||
width="250" | ||
translation="[800, 100]" /> | ||
<Label | ||
id="episode_description" | ||
width="800" | ||
wrap="true" | ||
translation="[800, 400]" /> | ||
</Group> | ||
</children> | ||
</component> |
Oops, something went wrong.