I am messing with a very basic test app for Apple TV that uses VLCKit.
It has a single view that shows a VLC-based player in fullscreen, so very much similar to the SimplePlayback example from VLCKit.
I need to know when the player stops (because the video ends, for example). I have therefore added the VLCMediaPlayerDelegate protocol to my ViewController class:
Code: Select all
class ViewController: UIViewController, VLCMediaPlayerDelegate {
Code: Select all
override func viewDidLoad() {
super.viewDidLoad()
mediaPlayer = VLCMediaPlayer()
mediaPlayer.delegate = self
mediaPlayer.drawable = view
}
Code: Select all
public func mediaPlayerStateChanged(aNotification: NSNotification!)
{
print("### STATE CHANGED ###")
}
Is there something I'm missing here ?