python - pychromecast api connect to chromecast -
i trying connect pychromecast api chromecast home project make. connect chromecast assisted "how use" api repo on github. problem when need print status next error :
attributeerror: 'chromecast' object has no attribute 'status'
and next part of code influenced this. appreciate ! thanks.
code -
from __future__ import print_function import pychromecast cast = pychromecast.get_chromecast(friendly_name="chromecast") #print(cast.device) print(cast.status) mc = cast.media_controller mc.play_media('http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/bigbuckbunny.mp4', 'video/mp4') print(mc.status) mc.pause() time.sleep(5) mc.play()
it seems installation not proper possibly because of version of dependencies such package of zerconf , netifaces. have @ steps deep because had same problem , resolved. http://www.ozturkibrahim.com/playing-with-google-chromecast/
Comments
Post a Comment