Created
February 7, 2017 20:09
-
-
Save LukeChannings/6ec328f92a85f7c4e2547682c619ab32 to your computer and use it in GitHub Desktop.
play-video.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import pychromecast | |
URL = sys.argv[1] | |
chromecasts = pychromecast.get_chromecasts() | |
cast = next(cc for cc in chromecasts if cc.device.friendly_name == "Living Room") | |
print(cast.device.model_name) # Chromecast Ultra | |
mc = cast.media_controller | |
mc.play_media(URL, 'video/mp4') | |
print(mc.status) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment