'Return the state of the player.'

@property
def state(self):

    if (self.media_status is None):
        return STATE_UNKNOWN
    elif self.media_status.player_is_playing:
        return STATE_PLAYING
    elif self.media_status.player_is_paused:
        return STATE_PAUSED
    elif self.media_status.player_is_idle:
        return STATE_IDLE
    elif self.cast.is_idle:
        return STATE_OFF
    return STATE_UNKNOWN
