Skip to Content
It is currently December 12th, 2019, 11:39 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: March 29th, 2018, 4:05 am 
Offline
New User
New User

Joined: February 25th, 2018, 6:25 am
Posts: 10
Hello,

we are including samcloud stream on our page via <audio src="..."> tag. We are getting shoutcast compatible stream url https://samcloud.spacial.com/api/listen ... x,any&m=sc. It redirects to current stream url http://xxx.live.streamtheworld.com/SP_Rxxxxx_SC which looks is changing time to time. So after some period of not playing when user trying to start music it gets silence because of actual streaming url was changed. It happens only on android chrome browser. Probably on desktop <audio> is more smart and trying to reload stream.
So to defeat this issue I'm trying manually to get new actual stream url and set it to audio src.
So the question is: what is time period of changing streaming url in case of inactivity when nobody is listening?

*UPD* Fixed <media> to <audio> in the topic title


Last edited by radiokids on April 1st, 2018, 2:33 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: March 30th, 2018, 7:18 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7889
Location: Aachen (Germany)
You're not supposed to open the site and enter the redirect target URL into your audio player, but the original URL.
HTML5 Audio will follow redirects on it's own.

This is a very minimal HTML5 Audio page proven to work with my SAM Cloud AAC+ (HEAACv1 128kbps, 44.1 kHz, Stereo) stream in Firefox.
Code:
<!DOCTYPE html>
<html>
<body>

<audio controls>
  <source src="https://samcloud.spacial.com/api/listen?sid=42879&rid=155385&f=aac,any&br=128000,any&m=sc" type="audio/aacp">
Your browser does not support the audio element.
</audio>

</body>
</html>

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: April 1st, 2018, 2:31 pm 
Offline
New User
New User

Joined: February 25th, 2018, 6:25 am
Posts: 10
Mastacheata wrote:
You're not supposed to open the site and enter the redirect target URL into your audio player, but the original URL.
HTML5 Audio will follow redirects on it's own.


Thanks for the answer. I use to do this exact way before I faced the issue in Android Chrome. It's playing if I push play button right after my page loaded. But if I push it in some period of time then it's not playing. Hence I assumed the reason is that original stream url is getting outdated.


Top
 Profile  
Reply with quote  
PostPosted: April 3rd, 2018, 6:39 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7889
Location: Aachen (Germany)
The SAMCloud API URL isn't supposed to change, the behind the scenes URL where you're redirected to, can definitely change, but that shouldn't be a problem for the browser.
HTML5 Audio support is still a bit shaky in all browsers and depends on so many variables.
To find out what the exact problem in this case is and how to eventually get around it, I suppose to ask this question (including a demo html page, the full stream URL and the exact browser version you're using) on a more technology/programming specialized platform like StackOverflow.com or on the Google Chrome Product forums (https://productforums.google.com/forum/#!forum/chrome)

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group