Streamerp2p Forum

Streamer P2P Radio Support ForumStreamer Mainpage www.streamerp2p.com
It is currently Wed Jun 19, 2013 1:22 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: javascript to detect IE for ActiveX Tune In link
PostPosted: Sun Jun 07, 2009 4:16 pm 
Offline
Streamer Savant
Streamer Savant
User avatar

Joined: Sun Feb 11, 2007 11:56 pm
Posts: 72
nevermind


Last edited by Phat Pizza on Tue May 25, 2010 8:32 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: javascript to detect IE for ActiveX Tune In link
PostPosted: Sat Aug 22, 2009 6:21 am 
Offline
Streamer Nerd
Streamer Nerd
User avatar

Joined: Thu Oct 13, 2005 3:27 pm
Posts: 146
Location: Earth
Station Name: SwanSong - Rock until you drop
I fully realease that my contribution now, has been posted a long time after the original.

But I like to suggest that maybe it would be better to detect if the OS (operating system) is Windows.
( as there are so many different browsers, some of which can proport to be another ) ;-)

How about

[code]
<SCRIPT TYPE="text/javascript">
<!--
if (navigator.appVersion.indexOf == "Win")
document.writeln ('<a href="http://www.streamerp2p.com/phasex.php?id=XXXXX" target="_blank">Tune In</a>');
// -->
</SCRIPT>
<NOSCRIPT>
<a href="streamerp2p://">Tune In</a>
</NOSCRIPT>
[/code]

oviously as there is presently NO non-Windows version of Steamer
hense the "elseif" is no longer required (which is why it missing from my example above) !

How-ever if you can offer a conventional stream (tcp, Icecast, Shoutcast etc)
then for non-Windows users, we could use the "else" to incert a link to the non-p2p stream

So the stript becomes (using my station as an example)

[code]
<SCRIPT TYPE="text/javascript">
<!--
if (navigator.appVersion.indexOf == "Win")
document.writeln ('<a href="http://www.streamerp2p.com/phasex.php?id=28358" target="_blank">Tune In</a>');
else
document.writeln ('<a href="http://87.117.192.112/DFI/demo_mp3.pls" target="_blank">Tune In</a>');
// -->
</SCRIPT>
<NOSCRIPT>
<a href="http://87.117.192.112/DFI/demo_mp3.pls">Tune In</a>
</NOSCRIPT>
[/code]


regards 2xQ

PS: this script could maybe also be expanded to detect browser type
or even if streamer is already installed ( thou I gess that would require a cook'e )
or maybe you know better,, Please share ;-)

PPS: I intend to play with the modified version of the script, in order to create a version
which hides the tune-streamerP2P button from view
when a non-windows visitor is viewing my station website
as I beleave there is little point in presenting them with a feature that they cannt use :-(


Reference, and script for the detection of ALL common OS's can be found here
http://www.javascripter.net/faq/operatin.htm enjoy !!

_________________
Rock until you drop
Retro 70's Hairy Grebo Biker Dude


http://www.streamerp2p.com/?t=swansong


Top
 Profile  
 
 Post subject: Re: javascript to detect IE for ActiveX Tune In link
PostPosted: Sun Aug 23, 2009 6:05 pm 
Offline
Site Admin
User avatar

Joined: Sun Oct 10, 2004 6:00 pm
Posts: 572
Location: Panama
Detecting 'windows' rather than 'internet explorer' would result in firefox users being presented with the activex link rather than the direct streamerp2p:// link.
IE users should really be presented with both an activex link and a normal streamerp2p:// link in case they are wise and have IE neutered.

Best of all would be to present the user with a bar of small icons, in different standard colours, and a tooltip text on each, one for each tuning type.
Normal streamerp2p://, activex, and unicast if enabled.
Most online radio stations have a variety of listening methods and associated icons to choose from anyway.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 0 guests


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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group