By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,376 Members | 1,115 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,376 IT Pros & Developers. It's quick & easy.

Dynamically load video?

P: n/a
I have a html page with an embeded video and a drop list. What I would
like to do is have the user select a video from the drop list, then
replace the embeded video on the screen. Is there a way to change the
video that is embeded in a html page?

Sep 6 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
je*********@hotmail.com schrieb:
I have a html page with an embeded video and a drop list. What I would
like to do is have the user select a video from the drop list, then
replace the embeded video on the screen. Is there a way to change the
video that is embeded in a html page?


For RealPlayer you can find the documents about scripting with embedded players
on realnetworks:
http://service.real.com/help/library...realscript.htm

There's a method called DoGotoURL(string url, string target) - I don't know if
this is what you're looking for or if it's just for the use of realplayers
integrated browser...

There's another method desribed, PlayClip(url, clipinfo, related_info_url,
width, height, media_browser_url, target, bnow_playing) - sounds better.

Setting another src in the Sites sourcecode shouldn't bring you up to the
desired result - at least I assume that the player should get reloaded or at
least somehow triggered to load the new src.

About WindowsMedia or Quicktime, I don't know anything.
Sep 6 '05 #2

P: n/a
I've not worked a lot with media on webpages but some quick testing
yielded some result with Internet Explorer, and *.wmv movies (i'd think
it would be possible with other movietypes and it shouldn't be that
difficult to transfere to cross-browser compability.....

But anyways - If you have your movies embedded via the object tag, then
you can access the object by getElementById(ObjectID), and then set the
FileName property.
In my quick testing in IE this gave me the new movie without needing to
reload the page.

So basically:
var node = document.getElementById(yourObjectID)
node.FileName = newFileName.wmv

gave me the new movie.

For FireFox, which I didn't bother working out now (gotta leave
something for yourself :)), I'd think you need to get access to the
embed tag in a somewhat similar way because I belive that is the object
used, and access the "src" property.

Sep 7 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.