Streaming an MP3 on stdout to Jplayer using PHP

后端 未结 3 457
-上瘾入骨i
-上瘾入骨i 2021-01-23 14:54

I\'m initializing jplayer with the following parameters:

$jplayer.jPlayer(\'setMedia\',{
  mp3: data.audioMP3,
  oga: data.audioOGA
});

Assume

3条回答
  •  被撕碎了的回忆
    2021-01-23 15:41

    i think you'll struggle to prevent users discovering your media content URL, i'd say it was pretty much impossible (a quick look at the 'Network' tab on Chrome would reveal your loaded track, regardless how you coded playaudio.php).

    I'd say you were better off sticking to publishing media you don't mind sharing with the world.. Or just publish

    • A n second preview
    • A lesser quality version, e.g. 90bps / Mono

    If you really wanted to protect your resources, you could use oAuth or Access Control at the server side.

提交回复
热议问题