'Extract the current state (play, pause etc) of video.
Returns:
str: current video state'

@property
def state(self):

    state_selector = self.get_element_selector(CSS_CLASS_NAMES['video_container'])
    current_state = self.q(css=state_selector).attrs('class')[0]
    logging.debug("Current    state    of    '{}'    element    is    '{}'".format(state_selector, current_state))
    if ('is-playing' in current_state):
        return 'playing'
    elif ('is-paused' in current_state):
        return 'pause'
    elif ('is-buffered' in current_state):
        return 'buffering'
    elif ('is-ended' in current_state):
        return 'finished'
