doh, my bad.
It mostly works
Trying my google home mini, right now.
Edit:
The home mini works correctly. Just moved to the next track automagically.
doh, my bad.
It mostly works
Trying my google home mini, right now.
Edit:
The home mini works correctly. Just moved to the next track automagically.
1.000.000 - dollar question ā¦ why is there no progress bar on the browser_mod media_play?
all other player (so far) report the position in track and I āneedā this to harden the auto_advance feature ā¦ (without this hardening the chromcast sometimes jumps multiple tracks for no obvious reason ā¦)
Please try the new release 20201221_3
JKW
Boom, just played the next track.
Thanks for all your hard work.
Does 20201221_3 contain support for browser_mod? Iām not seeing it listed in the available speakers list. it does show up in my devices, and I can play to it thru other means.
sure does ā¦ should be in the list ā¦ or click directly on the player ā¦ that more-info dialog should also have the browser button
JKW
got it, its working for me now. (think it needed a reboot)
Great work! I have everything working but no soundā¦
I have Sonosā¦ It gives me the error "Sonos does not support a media type of āaudio/mp3ā in the log of Home Assistantā¦ So this is a no for me then?
Hi, Iām not sure if that is a general issue with sonos or something that me can fix. Reading
Makes me believe that it is possible to stream a mp3. Can you confirm that you can stream a mp3 file via the play_media service ?
Jkw
Edit: so does it really matter to use āmusicā?
I use audio/mp3 at the moment ytube_music_player/custom_components/ytube_music_player/media_player.py at cfebe6c279e3b0aebbe21a6dc9330afb2c4a7622 Ā· KoljaWindeler/ytube_music_player Ā· GitHub
Edit2: would you feel comfortable with editing that line in the media_player.py to test if it would work with āmusicā ?
Hi,
Already tried to edit the media_player.py and changed audio/mp3 to music. Also tried audio/mp4 does not work.
Red somewhere that you need to present the full link to Sonos in order to make it workā¦ But that was a test to local mp3 files, so that should work.
If you use āmusicā as the content_id i get āIllegal MIME-Type from 192.168.x.xā in the logā¦
EDIT: something like this works with Sonos: http://hass_ip:8123/local/your.mp3
Youtube Music works fine trough the Sonos appā¦ I have no clue if i can find out what kind of info it sends to Sonos in order to make it playā¦
Strange that it works locally.
You can add a ā_LOGGER.error(_url)ā
Right here https://github.com/KoljaWindeler/ytube_music_player/blob/cfebe6c279e3b0aebbe21a6dc9330afb2c4a7622/custom_components/ytube_music_player/media_player.py#L859
To get the youtube link and try sending that with various āmusicā etc to your sonos. Or even download the file locally and then send the command ā¦ You knowā¦ figuring out if the type is the problem or the location ā¦ or whatever
So do you want me to add this line below the highlighted line, or replace it with _LOGGER.error(_url) ?
Tried it with replacing, and i do get a bunch of errors but i think it plays by video id or something:
{āvideoIdā: āKLvRXYwZNRYā, ātitleā: āZara Larsson - I Would Like (MAGNĆS Remix)ā.
After that there is all the information visible that you normally find in the description of every youtube videoā¦
just add it below
_url = res['url'] + "&sig=" + signature
so you can see it on the log.
JKW
well, that makes my Sonos speakers go to unavailable
well its very hard for me to understand what āthatā means. Adding the log output? That seams fairly unlikely.
But anyway ā¦ you could try to replace the mp3 line with MEDIA_TYPE_TRACK
ATTR_MEDIA_CONTENT_TYPE: MEDIA_TYPE_TRACK,
at least thatās what the spotify integration is usingā¦
JKW
edit: just tested with my chromcasts ā¦ works fine here ā¦ but then again ā¦ also mp3 worked ā¦ so I have the feeling that the chromcast pretty much ignores this anyway
Allright so i tested a bit more.
Adding MEDIA_TYPE_TRACK instead of āaudio/mp3ā or āmusicā does not work.
What i do have is the url how it wants to play:
Any chance that you could test the spotify Integration?
All above looks correct, the url works ā¦ At this point Iām pretty clueless what could be the problem.
I donāt have a sonos so I donāt know if play_media works with online stored media at all ā¦
Jkw
I will try to test the Spotify integration later. Waiting on the premium subscription to be active.
Tested some .mp3 files over the internet which works on my Sonos. Apart from that, Iām nowhere near a dev or anything like that, so if you are clueless, than Iām automatically too
Maybe, but you have the hardware on site
Have you tried to download a track from youtube to a local place like your www folder and send your sonos a link to that file?
E.g. test.mp3 in the www folder and send http://IP.8123/local/test.mp3 to the speaker
Jkw
Well, not on my own Home Assistant instance. I have SSL setup and it cried about an ssl issue or something. But I have found a link to a public MP3 files which plays without any issue.
āhttps://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3ā
Well basically the following thing can be the issue from my view:
1.) Sonos canāt play online stored files at all
2.) The media type has to be different from audio/mp3
3.) The youtube link are too long
4.) The youtube links are ssl
5.) The YouTube links donāt provide proper file type suffixes
6.) Something else in the file isnāt compatible with sonos
Youāve tested 1.) And 2.) And 4.)
The next logical step would be to grab the file from youtube and store/play it locally. Either with a shorter filename and with/without file type suffix
Jkw