Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Stripped Back Status.xsl

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
junglised



Joined: 30 Jun 2010
Posts: 25
Location: Wales, UK

PostPosted: Tue Jul 20, 2010 9:09 am    Post subject: Stripped Back Status.xsl Reply with quote

I've stripped back the status file and saved is as status3.xsl. I then have an iframe on my site which pulls this file, which is working great.

you can see the file here - http://junglised.webhop.net:8000/status3.xsl
and the website it's running on here - www.junglised.co.uk

I have an auto DJ mount, and a stream mount. When a DJ isnt connected and broadcasting live, the Stream mount fall's back to the Auto DJ mount. THe issue I have is when a DJ is connected, the status still shows the auto DJ track, and the title for the DJ is placed on a line below. This then means that the iframe on my website still shows the top line which is the auto DJ track and I cant see what DJ is connected.

What would be the best way to go about this? The simplest method I can think of is change the order of the streams in the status file, so when auto DJ is playing it'll show that track, and when a DJ is connected to /Stream it'll become the top line, so that's visible in the Iframe.

Here's my status file...

Code:
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
<xsl:output omit-xml-declaration="no" method="html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
<xsl:template match = "/icestats" >
<html>
<head>
<title>Now Playing</title>
<link href="now_playing_style.css" rel="stylesheet" type="text/css" />
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">

<!--mount point stats-->
<xsl:for-each select="source">
<xsl:choose>
<xsl:when test="listeners">
<div class="roundcont">
<div class="roundtop">
</div>
<div class="newscontent">
    <div class="streamheader">
 
            <colgroup align="left" />
            <colgroup align="right" width="300" />
       
               
                <xsl:choose>
                    <xsl:when test="authenticator">
                   
                    </xsl:when>
       
                </xsl:choose>
    </div>

<xsl:if test="server_url">
</xsl:if>
<span class="now_playing_style">Now Playing :</span>
<xsl:if test="artist">
  <span class="now_playing_style"><xsl:value-of select="artist" /></span> - </xsl:if>
<span class="now_playing_style"><xsl:value-of select="title" /></span> </div>
</div>
</xsl:when>
</xsl:choose>

</xsl:for-each>
<xsl:text disable-output-escaping="yes"></xsl:text>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Back to top
View user's profile Send private message AIM Address
junglised



Joined: 30 Jun 2010
Posts: 25
Location: Wales, UK

PostPosted: Tue Jul 20, 2010 10:58 am    Post subject: Reply with quote

OK... I've done a load more reading through the forums to see if I can work this out for myself.

I've come across a post by Karl that shows I can define what stream a status page looks up..
I.E http://junglised.webhop.net:8000/status3.xsl?mount=/stream

The only issue I have now is, when no DJ is connected, although the stream itself falls back to /AutoDJ, the stream info doesn't pass through to /Stream so it appears blank.
Back to top
View user's profile Send private message AIM Address
junglised



Joined: 30 Jun 2010
Posts: 25
Location: Wales, UK

PostPosted: Tue Jul 20, 2010 11:35 am    Post subject: Reply with quote

I've come across this thread where its recommended to use a relay rather than fall back to pass the metadata through.. I dont understand how this would be setup though to automatically switch from the autoDJ stream to the live DJ stream. hmmm

http://icecast.imux.net/viewtopic.php?t=1909
Back to top
View user's profile Send private message AIM Address
junglised



Joined: 30 Jun 2010
Posts: 25
Location: Wales, UK

PostPosted: Tue Jul 20, 2010 2:37 pm    Post subject: Reply with quote

ive managed to completely mess up all of my setup trying to get this to work Laughing

i cant get my head around it at all..

What i want to achieve is this..

/stream - what everyone connects to listen, and the only mount people need to see. This will relay either the meta data of the auto DJ track, or the metadata from the live DJ stream.

/autoDJ is where ices mounts and plays a playlist continuously

/dj - the mount point DJ's log in to. This will override autoDJ as the stream that outputs to /stream

I cannot set up my icecast.xml file at all no matter how much I try. If somebody would lay out the basics for me that would be greatly appreciated. I will to the minor details, I just need the basic <mounts> <relay> and so on.

I also cant seem to get the passwords working correctly. I have a different password for /autodj as i do for /dj but i can only ever log in using the password defined in <source-password>. am i correct in thinking i need to remove this from the start of the file, so i can define individual mount passwords under each <mount> tag?
Back to top
View user's profile Send private message AIM Address
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Jul 20, 2010 3:10 pm    Post subject: Reply with quote

so you want a relay on /stream that relays /autodj from 127.0.0.1 with the mount for /stream specifying a max-listeners or other settings.

You then want a mount for /dj or several if you want different mountpoints but each falls back and overrides /autodj. Both the autodj and dj mountpoint will have either public set to 0 or no-yp set, maybe even hidden set (optional) that way those mountpoint don't advertise.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
junglised



Joined: 30 Jun 2010
Posts: 25
Location: Wales, UK

PostPosted: Tue Jul 20, 2010 3:31 pm    Post subject: Reply with quote

i think i understand. i have currently have the relay, relaying DJ, with the fallback set to autodj. this works, but the DJ isnt able to log in.

ill try swapping it around so the relay relays autodj, and the fallback is dj mount
Back to top
View user's profile Send private message AIM Address
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Jul 20, 2010 6:44 pm    Post subject: Reply with quote

If the DJ is not able to log in then then authentication is not correct. It is not clear whether you want a DJ specific user/pass but if you do then you add the <username> <password> tags for the dj mount.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber