我用的是windows media playe通过dlna接入的homeassistant
播放歌曲时,查看播放器状态时显示的属性是
sound_mode_list:
- FactoryDefaults
volume_level: 0.2
is_volume_muted: false
media_content_id: >-
http://m8.music.126.net/ymusic/obj/d43d/6827aa94709657afc672a45300b624ed.mp3
media_content_type: music
media_duration: 288
media_position: 146
media_position_updated_at: '2022-12-06T14:19:36.624253+00:00'
media_title: Home Assistant
media_track: 1
shuffle: false
repeat: 'off'
friendly_name: PC02
supported_features: 496143
就是这个 media_title: Home Assistant 值不是动态的,一直不变,播放器界面显示Home Assistant 我在nodered中一直想把歌曲名字赋值给media_title一直不成功报错。
{
"media_content_id":"http://m8.music.126.net/ymusic/obj/d43d/6827aa94709657afc672a45300b624ed.mp3",
"media_content_type":"music",
"announce":"true",
"media_title":"test"
}
调用服务时,显示 "Call-service error. extra keys not allowed @ data['media_title']" 为什么不能把media_title 这个参数传递给播放器?实在搞不懂了。请大佬赐教。
|