Log in

View Full Version : embed audio stream into website (problem)



rodster69
01-09-2007, 12:32 PM
Hello,

I have an online radio website where i do want the audio to start playing wehen the visitor enters the page. I have allready setup all variables for the stream itself. that works!

the problem is that the audio stream starts all over again when a visitor clicks on another page. I've search and found here @ DD a script http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm
which can help me.

since i have all the variables in a file called left.htm i assume this could be the fix:D I wantt this file (left.htm) to load within the site (iframe?) and not change.

But..can someone help me with this. i use joomla as my CMS.
so the only thing i'm trying to accomplish is that the stream continues to play even when the visitor clicks to another link within my website:confused:

any help appreciated

Aragoth
01-09-2007, 04:34 PM
No fear, I had a similiar problem. The route I went with was frames. The frame will remain constant throughout the numerous pages you visit, and if you want to force the music to stop when the user travels through a specific page, use "target=_top" to stop the original frame used:

<a href="next_musical_frameset.htm" target="_top">Next</a>

Hope that helps...

rodster69
01-09-2007, 05:18 PM
thx so u telling me i can accomplish this with the DD script?
the music must not stop:(

Aragoth
01-09-2007, 05:50 PM
When I created my site, I didn't use a DD script, because I am extremely ignorant in the ways of CSS syntax, so I just used basic frames:



<html>
<head>
[Insert any function you wish to occur in the frame's head i.e. CSS styling, html commands, etc]
</head>
<body>
[body functions i.e. <bg sound=musicalfile.wma>]
</body>
</html>


The preceding code (and page) will appear when the code frame src=whateveryounamedtheframeset.html is used in a webpage (as long as the page is located in the same directory.

As for the normal page (that would host the first frame page), a basic example would be:


<html>
<body>
<frameset cols= "1%, 99%">
<frame src="whateveryounamedtheframeset.html">
<frame src="whateveryounamedtheoriginalpage.html">
</body>
</html>


By doing this, the page that was just created will contain both the music page (column width at 1%), and the original page you wished people to view (column width at 99%). All you need to do is replace the names I have given you with the actual file names, and you will have a rudimentary frameset. :)
I hope that this helps...

rodster69
01-09-2007, 08:32 PM
Hey Aragoth,

I really appreciate u'r help;look i use Joomla so i do use .css
i've includes the template so u can have an idea.

is it possible with to put this template in a frame like u described?

just put the template_css in a frame and make it call the (left.htm) where the streaming code is?
same operation? let me know.i'm getting there surely:)

Aragoth
01-10-2007, 04:37 AM
Can I see what the source code (just an easy page) looks like? I've never used anything other than notepad or notepad ++ (which I highly recommend if you want to learn the syntax yourself, or if you suck, like I do), so I don't know what it looks like or what can be done with it.

I believe that you can place the template in the frame (or even use it as the frame page) by using the code:



<Frameset Cols="??%, ??%">
<FRAME SRC= "templatename.css">
<FRAME SRC= "pagewithsongembedded.css">


That should make the template appear on the page, and it should be however large you specified (as in, if you gave it 99% in columns, it would cover 99% of the page). You can also use the Rows function as well, using the same basic forumula: Frameset Rows= "??%, ??%".

Remember, you need three pages for this:
Page 1:
Hosting page
This page will contain both the template page and the frame page with embedded audio (or background audio). This page must have the Frame SRC code for both pages (similiar to creating an <a href=> link or an <img src=> link).
Page 2.
Template page
This will have the above template.
Page 3.
Music embedded page
This page will contain the music with the code:


<html>
<body>
<bgsound src=songname.wma>


And then add the code from the variables... That's the best this newb can do... sorry...