Playing m4ps on macOS

Hi guys,
Is there a way of playing m4p files from an Xojo app? The ‘sound’ class won’t play these files - assuming (but disappointed) that it’s the copy protection that’s stopping it working. Considering the app is on the same device that is authorised to play the files I was hoping it would work. I can play mp3 without any issue so I am assuming my code is good.

Any clues / ideas?

THANKS

have you tried the movieplayer or the htmlviewer controls?

If I press space on an m4p file in Finder to try to play it, I get a message that says “Protected music can only be played with iTunes or QuickTime Player”.

So it would seem like you’ll need to find an unprotected version.

[quote=416304:@Paul Lefebvre]If I press space on an m4p file in Finder to try to play it, I get a message that says “Protected music can only be played with iTunes or QuickTime Player”.

So it would seem like you’ll need to find an unprotected version.[/quote]
Ah, I assumed that m4p was a typo and that David meant mp4 :stuck_out_tongue:

A lot of apple DRM’d music which was initially avaialble in m4p format may now be available un-DRMd and got as regular old aac files – I think this may require some tricks with apple’s iTune match service? Also note that being able to play non-DRM’d audio doesn’t mean you have a license to play or distribute DRM’d audio necessarily.

These are definitely DRM’d files - downloaded via Apple Music and yep they have a m4p extension. Guessing that m4p files can come from a variety of sources across the iTunes eco-system.

I just wanted to play random snippets from the ‘Music Library’ aka - any file under ~/Music (“guess that song” style).

Disappointing that only iTunes can play these files and not even afplay seems to work.
I was hoping the the OS would be able to verify my iTunes Store credentials and allow the OS audio frameworks to play the files while I remain signed into the store, but it seems that is wholly the function of iTunes.
Not really sure what extra protection they are putting in place by limiting the function to iTunes only - in fact, there isn’t any as far as I can tell.

I might have to explore using AppleScript to drive iTunes - not ideal.

Thanks all.