Wednesday, December 8, 2021

#1 2021-10-16 11:30:16 am

Registered: 2021-07-16
Posts: 2

Start internet radio on Apple Music

I'd like an apple script to start playing an internet radio station on Apple Music (Big Sur)

For example, I'd like to play the station CBC Radio One.  I can find the URL through apple music, and try to open it

tell application "Music"
    open location ""
end tell

but this does not work.

Any direction would be appreciated.


Filed under: radio, Apple Music



#2 2021-10-16 02:29:36 pm

From:: Greece
Registered: 2019-03-03
Posts: 2182

Re: Start internet radio on Apple Music

Not sure, but I think works with payed radio stations, listed in the iTunes Store. If you want listen you concrete free radio station for free, forgot the and use the browser instead:


tell application "Safari"
   open location ""
   my waitSafariWebPageLoading()
   do JavaScript "document.getElementsByClassName('playButton hero large no-border')[0].click();" in document 1
end tell

on waitSafariWebPageLoading()
   tell application "System Events" to tell application process "Safari"
       repeat until (UI element "Reload this page" of group 3 of toolbar 1 of window 1 exists) or (UI element "Reload this page" of group 2 of toolbar 1 of window 1 exists)
           delay 0.1
       end repeat
   end tell
end waitSafariWebPageLoading

Model: MacBook Pro
OS X: Catalina 10.15.7
Web Browser: Safari 14.1
Ram: 4 GB



#3 2021-10-20 12:44:24 am

Registered: 2017-12-14
Posts: 219

Re: Start internet radio on Apple Music

You can use safari to open the link: … 1388704969

The will make Safari ask if you would like to open it in Music App

The Music  app has registered that URI.

Which might be why music doesn’t open it.
Things to try:
- remove the part
- try making a URL from the link
- Check the Dictionary for info on opening streams



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)