5

I need a function that can stream audio from the third party website.

Suppose.

Controller

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
}

I have a same playlist as below 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

I have a playlist of the songs to stream audio. But purpose is to protect the audio original URL path.

I tried Defa Protector to encrypt the URL of audio. Below is the url

https://sites.google.com/site/defaprotectorhelp/

It's working, But when i add 4 or more songs in playlist. It shows me below error.

Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause().

For this error also tried this stackoverflow solution. But still error is same.

When i use the original path of audio. It's working perfectly.

Community
  • 1
  • 1
tusharchavda007
  • 223
  • 2
  • 12

0 Answers0