Search code examples
iosavplayertvostopshelf

Can we play an Video in tvOS TopShelf natively?


I have just started development of an app for tvOS and i wanted to play the video in tvOS TopShelf.

I have seen that we can do like this http://www.brianjcoleman.com/tvos-tutorial-top-shelf/ but here its showing an image in topshelf and on click of play button we can open the particular view controller and can play the video.

Thanks in advance.


Solution

  • A TopShelf extension can not define an action on any gesture. The extension only returns an NSArray describing the topshelf items or nil (using static image inside App then). The topshelf item have properties for displayURL and playURL, which are followed with the click or the play gesture respectively and they should match a URL Scheme defined inside your App (or 3rd party App).