Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stop a playback by id !? #21

Open
rezatbaher opened this issue Mar 8, 2016 · 1 comment
Open

stop a playback by id !? #21

rezatbaher opened this issue Mar 8, 2016 · 1 comment

Comments

@rezatbaher
Copy link

hi thanks for your efforts
i would like to stop a playback by id
multiple channels in a single stasis app have playbacks which is generated by id .
but on an event i want to stop a specific playback.
how can i achieve that ?
thanks

@AlekseyLobanov
Copy link

Works for me

def stop_playback_by_id(playback_id):
    try:
        playback = ari_client.playbacks.get(playbackId=playback_id)
    except requests.exceptions.HTTPError:
        logging.info(u"PlaybackID {} not found".format(playback_id))
        return False
    playback.stop()
    return True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants