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.

8
  • Is you dont want others to download your audio ? Commented Jan 3, 2017 at 8:22
  • Yes, I want to prevent download of audio. Commented Jan 3, 2017 at 11:22
  • For security (prevent access of original path), can make 2 step authendication (Encrypt/Decreypt URL). Commented Jan 3, 2017 at 11:23
  • For Stream audio, you need some javascripts to achieve. Commented Jan 3, 2017 at 11:24
  • Can you please suggest any javascript ? @Shankar Thiyagaraajan Commented Jan 3, 2017 at 11:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.