April 24, 201511 yr I have a client who broadcast live radio not internet based, they require a live player on their site. We have found Shoutcast (www.shoutcast.com), their website has a player that plays across the site, even when you change pages, short of using an iframe does anyone know how we can achieve this function. Also I would like to ask if there is an alternative to target_blank should we wish to have a player open in a new window that does not use javascript or jquery as we do not want to exclude those who turn javascript off in their browsers. Thanks Edited April 24, 201511 yr by kezzyme85
April 25, 201511 yr My approach would be to use Ajax for the whole website. You'll need JavaScript for that though. To be honest, I really think you are better to build the website with JS as a requirement and warn users that they need it switched on in order to use the website. I'm not sure of exact stats, but the significant majority have JavaScript enabled. I agree, the percentage of websites that require JavaScript now is huge, you'd be pretty used to many sites simply not working if JavaScript was turned off, if possible we should try to provide a fallback, but it's not always practical to do so. The number of folk who browse with JS turned off must be really low now.
April 25, 201511 yr All radio sites i use always opens the player in a new window, this would be the easiest way if the site is already developed, if not as they said above js/ajax would be the best option. Maybe have them both so you can support non JS users
April 26, 201511 yr ...Also I would like to ask if there is an alternative to target_blank should we wish to have a player open in a new window that does not use javascript or jquery as we do not want to exclude those who turn javascript off in their browsers... target="_blank" is your only option for new windows if you do not want to use JavaScript window,open(); but why not use both: Set up links where you prevent the default link-action for js users (event.preventDefault(); or return false;) then use the href attribute of your links as the url parameter. Somthing like: window.open(this.href); for non js users the links would gracefully degrade to target="_blank"
April 26, 201511 yr I don't usually comment in the development section but since in this case kezzyme85 is my business partner i think i need to make the question a little clearer. Although you have all given an answer to the question itself, we thank you for that, would anyone know how shoutcast in perticular have achieved it? Neither of us know ajax but javascript or jquery may be an option, although we did not want to use target blank because its deprecated Thanks
April 26, 201511 yr Morning guys, i've us this before to help a local charity radio http://oliverneedham.co.uk/basicradioconsole/ Seems to do the job and was pretty easy to use to be honest. Hope this helps
April 26, 201511 yr I think Shoutcast are using jPlayer.There is nothing wrong with using target="_blank". It may have been depreciated in XHTML but is perfectly valid HTML5.http://www.w3.org/TR/2014/REC-html5-20141028/browsers.html#valid-browsing-context-name-or-keyword
April 26, 201511 yr Wynn is correct. The target blank attribute is not deprecated it was taken out of the XHTML Strict specs because it was considered best to let users determine how links should open. But It was back in the HTML5 specs again.
April 26, 201511 yr I think Shoutcast are using jPlayer. There is nothing wrong with using target="_blank". It may have been depreciated in XHTML but is perfectly valid HTML5. http://www.w3.org/TR/2014/REC-html5-20141028/browsers.html#valid-browsing-context-name-or-keyword Wynn is correct. The target blank attribute is not deprecated it was taken out of the XHTML Strict specs because it was considered best to let users determine how links should open. But It was back in the HTML5 specs again.Thank you, i never realisedWe do however still wish to find out how we could have the player continue to play across pages without opening a new window ( as it is in the example site) the reason for this is because i am thinking about the ux and ui for users on mobile devices, whether opening a new window would destroy ux. Accessability is a concern, I realise that those who turn off javascript are small in number but we prefer not to exclude them if we can. Maybe there is a php solution? Sonething that could emulate frames for example without actually being a frame?
April 26, 201511 yr Thank you, i never realised We do however still wish to find out how we could have the player continue to play across pages without opening a new window ( as it is in the example site) the reason for this is because i am thinking about the ux and ui for users on mobile devices, whether opening a new window would destroy ux. Accessability is a concern, I realise that those who turn off javascript are small in number but we prefer not to exclude them if we can. Maybe there is a php solution? Sonething that could emulate frames for example without actually being a frame? In that case an AJAX solution is really your best option. Use a solution where you load different page content into a single page so that all http requests are executed without a page refresh (which would stop the musicplayer) . The easiest way to use AJAX is with jQuerys load() method. Alternatively you could load the content for the different pages in a main content iframe on a single page and target that frame for all your menu links. That solution is not recomended by many but it would require no JS. Edited April 26, 201511 yr by Nillervision
May 3, 201511 yr Assume you're looking for an effect like https://soundcloud.com/? If so, you'll need a little bit more than Ajax yes, thats what we are looking for, the issue is that neither of us know ajax
Create an account or sign in to comment