我需要一个可以从第三方网站流式传输音频的功能.
假设.
调节器
function getStreamAudio($id){
$audioDetails = Audio::find($id); //Get audio details
$audio_full_url = $audioDetails->audio_path; //www.otherdomain.com/abc/xyz.mp3
//here i need to strem audio through id
}
Run Code Online (Sandbox Code Playgroud)
我有与HTML下面相同的播放列表
<audio src="www.mydomain.com/stream_audio/1"></audio> // src tags are excute the above function
<audio src="www.mydomain.com/stream_audio/2"></audio> // src tags are excute the above function
<audio src="www.mydomain.com/stream_audio/3"></audio> // src tags are excute the above function
Run Code Online (Sandbox Code Playgroud)
我有一个播放音频的播放列表.但目的是保护音频原始URL路径.
我试过Defa Protector来加密音频的URL.以下是网址
https://sites.google.com/site/defaprotectorhelp/
它正在工作,但是当我在播放列表中添加4首或更多歌曲时.它显示我的错误.
未捕获(在promise中)DOMException:play()请求被pause()调用中断.
对于此错误,还尝试了此stackoverflow解决方案.但仍然错误是一样的.
当我使用原始音频路径时.它工作得很好.