本文介绍了索尼ZR5音频控制API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何发送到我的Sony ZR5音频流,例如 http://air.radiorecord.ru: 805/chil_320 使用api?谢谢.
How i can send to my Sony ZR5 audio stream like http://air.radiorecord.ru:805/chil_320 using api?Thank you.
推荐答案
由于该设备具有内置的chromecast引擎,因此您也可以使用它来流URL.我正在使用带有此代码的python的ATM.
As this device have build-in chromecast engine, you can too use it to stream url. ATM I m using python with this code.
import time
import pychromecast
name = ''
chromecasts = pychromecast.get_chromecasts()
for cc in chromecasts:
print (cc.device.friendly_name)
name = cc.device.friendly_name
cast = next(cc for cc in chromecasts if cc.device.friendly_name == name)
cast.wait()
print(cast.device)
print(cast.status)
mc = cast.media_controller
mc.play_media('https://c1icy.prod.playlists.ihrhls.com/7053_icy', 'audio/mp3')
mc.block_until_active()
print(mc.status)
mc.pause()
time.sleep(5)
mc.play()
这篇关于索尼ZR5音频控制API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!