Alternate sample files

alt=
DannyA
@dannya
10 years ago
584 posts
How/where do I tell the player to call a sample file with a different file name?

In other words, how does the player know which sample file to play?
updated by @dannya: 01/02/15 01:01:39PM
brian
@brian
10 years ago
10,148 posts
It's in the jrCore_steam_file view in the jrCore/index.php file. Specifically it looks for a ".sample" file - i.e. if it was going to stream:

jrAudio_75_audio_file.mp3

and it sees:

jrAudio_75_audio_file.mp3.sample.mp3

It will stream that instead IF the value of audio_file_item_price > 0.

You have full control over what file is streamed by registering an event listener for the "stream_file" event - if you return a $_data['stream_file'] value from your listener, the core will stream that file instead (if it exists).

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags