PDA

View Full Version : i still need help on this....


DagGz
January 11th, 2003, 10:07 PM
i asked a question in a previous thread

ive seen something on another website that i would like to re-create on my own. i havent got a clue on how to do it so could someone have a look and suggest on how i might do it.

http://www.breakbeat.co.uk/dnbtv/

you click the link that you want to play and it displays in the media player that is already embedded on the page. i persume u must need to give the player some sort of id to the file knows where to play itself. i just dont know how to do it.

also the files i want to stream dont have video they are just mp3 files

degsy said it is a javascript issue (something i know nothing about)
he gave me some coding but i totally dont understand it and need help further although no one got back to me after my last reply.....hense the new thread, sorry to be a pain guys.

Steven.Bentley
January 12th, 2003, 01:23 PM
That page uses JavaScript to pass an identifier to an asp page


function Play(ProgramID, TrackID)
{
var PlayerFrame = parent.rightFrame;
PlayerFrame.location.href="mediaplayer.tv.asp?ProgramID=" + ProgramID + "&TrackID=" + TrackID
}


then the asp page will load the media player.

DagGz
January 12th, 2003, 08:01 PM
yes i know that because thats exactly what degsy told me. i just dont understand what it means or what info goes where.

first of all ive made an asp page called player_window.asp

ive aslo inserted a layer into a page and in that layer ive inserted an iframe. ive copied the html from the asp page, which has the mediaplayer embeded into the iframe. thats probably toally wrong and there is probably a much easier way of doing it but its the only way i can think of doing it with the help ive been given.

i also need to know what information goes into where on the javascript bit.

function Play(ProgramID, TrackID)
{
var PlayerFrame = parent.rightFrame;
PlayerFrame.location.href="mediaplayer.tv.asp?ProgramID=" + ProgramID + "&TrackID=" + TrackID
}


programID?....where do i get the info from, TrackID i persume is the file thats going to be played, but as the file is only going to be loaded into it once a link has been clicked do i just leave that as is? the player frame, im guessing, is the iframe in which the player is located....so that would be I1???

the rest i couldnt even guess at. so a breakdown of it would be a help.

if you cant understand this post (which is likely because i dont really know what im on about myself) then im sorry, just let me know if you cant and ill try and re-word it.

thanks

oh and sorry for being so thick :)

Steven.Bentley
January 12th, 2003, 09:10 PM
Those are the details that this particular site's asp script has used, they've written a script to handle this themselves.

You would need to get/write a script like that to output the embed tags etc if you were going to use this approach. Doesn't have to be asp, php or cgi would be fine.

I'm pretty sure that JavaScript could be used to do the same thing. The simplest way is to use frames, as the site you were looking at has, and make an HTML page with the player embedded for each item and load that HTML page into the frame.