ap4y / OrigamiEngine

Lightweight audio engine for iOS and OSX with flac, cue, mp3, m4a, m3u support.
http://ap4y.github.com/OrigamiEngine/
MIT License
545 stars 118 forks source link

Can't play 'URLs' that redirect to a simple mp3 file #63

Closed diogobalseiro closed 9 years ago

diogobalseiro commented 9 years ago

Hi

I have several mp3 files that are behind a single temporary redirect, so they can't be accessed directly. Can Origami access them still, or it's limited to the direct url of the file?

Thanks

ap4y commented 9 years ago

I'm not sure what problem you have but most common issue maybe this: there is a limitation in the plugin system design - it uses file extension for plugin selection. Thus if your urls don't have extension, plugin manager won't be able to derive the plugin. For this reason I added custom resolvers (see #36), so you could override default behavior of the plugin manager.

diogobalseiro commented 9 years ago

Imagine this scenario.

To stream the song 'Some song' I access the audio file with this: my-service/my-api/audio_id_some_song?user_token=blabla

This will validate the user and, depending on his subscription status for example, redirect to the appropriate mp3 file such as: my-service/my-api/streaming/some-song-id?Expires=1434490702&Signature=more-bla-bla

This is done this way because the redirect is only temporary (60 secs) to prevent some abusive usage.

(This is a very basic and somewhat inaccurate example of the api, but it gets to the point)

I tried to stream some songs in the example app and it failed. Is it supposed to fail? If so, is there a way to support it?

ap4y commented 9 years ago

As I mentioned it's an expected behavior and yes you can support it by using custom resolver, check linked issue and this as an example.

diogobalseiro commented 9 years ago

Thanks for the quick response, will try it later. ;)

johngoren commented 6 years ago

Hi, the link is no longer alive for the custom resolver. Wondering if there's another URL where I could find one? I have this same issue and having trouble grabbing an MP3 file that's at the end of a Podtrac podpress redirect process.