emadalam / atvjs

Blazing fast Apple TV application development using pure JavaScript
https://emadalam.github.io/atvjs
MIT License
311 stars 49 forks source link

how can I get from catalog view to product view #31

Closed andreschmid98 closed 7 years ago

andreschmid98 commented 7 years ago

I want when I click on a thumbnail in the catalogue view to the product view to play the video of the thumbnail.

I get thumbnail and video from a json file. and this is my catalog index.js file:

let Page = ATV.Page.create({
    name: 'catalog',
    url: 'http://localhost:9001/assets/data/video.json',
    template: template,
    events: {
        select: 'onSelect'
    },

    onSelect(e) {
        ATV.Navigation.navigate('product');
    }
});

And I don't know how I can play the video when I get to the product(video) view.

emadalam commented 7 years ago

Have you seen the below boilerplate and the fully functional demo app. It has all the basic samples including the movie catalog using real APIs and a player with sample hls streams.

https://github.com/emadalam/appletv-demo https://github.com/emadalam/appletv-boilerplate