I couldn't live without the WidgetRealm demos - - - they've helped me alot in learning how to create widgets to pull in data from remote systems and render/paginate through them.
One issue I could really use some help with. I've successfully modified the JSON widget demo to pull in my own TV show listings (instead of groceries

. And I've also successfully modified the video player example to play my own videos full-screen. Now I need to figure out how to combine these 2 demos somehow to make a dynamically-loaded video-list that can be browsed/paginated through, that allows the user to click a list-item and play that video full-screen.
In the main.js file inside the JSON demo, I see this:
var cell = new KONtx.control.GridCell({
styles: $content.styles.main.cell, //Style information for the Grid Cell from 960x540.js
events: {
onSelect: function () {
//This is here just to demoonstrate how you would attache an action to the Cell
print('We clicked on the Grid Cell\nName: '+this.title.data+'\nMPEGURL: '+this.mpegurl.data)
},
}
});
And I've got the right MPEG4 video in the "this.mpegurl.data" variable printing to the terminal window properly. Yay!
That was the easy part - - - now I need to somehow pull over the right js files from the mediaplayer demo into the JSON demo and link them together.
If I look at sidebar.js in the mediaplayer demo, I see this function:
events: {
onSelect: function(event) {
KONtx.application.loadView('view-Player', { PlaylistID: 2 });
}
},
Aha! A clue. So it looks like I could copy this KONtx.application.loadView('view-Player', { PlaylistID: 2 }); into the onSelect handler in the JSON demo (above). I need to change "PlaylistID: 2" to something else related to "this.mpegurl.data", but I'm not sure the syntax. I also see that I should include the following files from the media player demo: basicplayer.js, now_playing_snippet.js, snippet.js, and add these in via the init.js file.
After that, I'm a bit lost. What I would really benefit from is a demo of these two files combined, but I haven't been able to find one, so I'm trying to mash these 2 scripts together myself and could use some guidance.