does anyone know how to correctly check the playback state of a player object? Im trying to build a tvOS application and I need to check when the video has ended. *This app is not native it is build using TVJS. This is what I have right now, but its not working:
if (player.playbackState == "end") {
console.log("ending")
}
Thanks again.
One possibility: Hook into event stateDidChange
then check for what you are interested in:
(with videoPlayer being kind of wrapper around the TVJS player. See https://github.com/iBaa/PlexConnectApp/blob/master/PlexConnectApp/js/VideoPlayer.js for more details.)