Secure audio streaming Streaming Extensions - Demo 12 / 13
Secure your audio files from direct download
Starting from 3.2.1 (requires flowplayer version 3.2.3), you can use the secure streaming plugin to securely stream your audio content from http and lighttpd servers.
HTML coding
We have a player container that is small so that it only holds the controlbar.
<!-- setup player container -->
<div id="audiosecure" style="display:block;width:750px;height:30px;"
href="http://flashy2.flowplayer.org:81/secvideo/1989.mp3"></div>
JavaScript coding
We use the secure streaming plugin for protecting the mp3 files from direct downloads.
// install flowplayer into container
$f("audiosecure", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf", {
// fullscreen button not needed here
plugins: {
controls: {
fullscreen: false,
height: 30,
autoHide: false
},
secure: {
// path to latest version
url: 'flowplayer.securestreaming-3.2.3.swf',
// URL used to fetch a timestamp from the server
timestamp: '4f32e0d5',
// identical to lighttpd.conf / secdownload.secret
token: 'simplek'
}
},
clip: {
autoPlay: false,
urlResolvers: 'secure'
}
});
See the audio plugin page for more demos, including streaming setups, on how to use Flowplayer for audio playback.
Take a look at a standalone version of this demo. View its source code to get things going on your page.