PDA

View Full Version : change the 'src' value using javascript



grglaz
01-04-2008, 11:18 PM
hello

i want to know if there is any way to change the src value in the embed code using javasript.
i want to embed a media player to stream mms urls and for this i want to use some buttons links to change the channel on the media player.is there a way to use javasript in the src value or i have to load eatch time a different page for each channel?

jscheuer1
01-05-2008, 05:01 AM
As far as I know, the support for this is uneven to non-existent. A Flash object should be able to be made to both play and allow for a playlist of sound files. Or, you could supply different pages viewable through an iframe.

grglaz
01-06-2008, 10:53 PM
As far as I know, the support for this is uneven to non-existent. A Flash object should be able to be made to both play and allow for a playlist of sound files. Or, you could supply different pages viewable through an iframe.

yea since now i use html files for each channel.but it would be better if i could use only one embeded wmp and with javascript to change the src value.also i think that flash cann't play mms urls.

jscheuer1
01-07-2008, 03:15 AM
I'm not too much up on Flash, but when it's what will work best for what I am doing, I try to work it out. Flash may not be able to play your sound files in their current format, or maybe it can. I really don't know. However, it is almost certain that if they are converted to a format that Flash can play, it would be no problem.

The trouble with other players is that, you don't know what player you will get. It all depends upon what the user has configured for that file type. And, as is suggested by your remarks, they might not even have an application available that can play them.

That's why I would lean toward Flash in this situation.

Have a look here:

http://www.boutell.com/newfaq/creating/audio.html