/    Sign up×
Community /Pin to ProfileBookmark

hey, I’m not sure if I’m in the right spot, but is there any way to have a list of links on the page, and when you click on any of them, each one brings up a different streaming video embed on the same page? I don’t want a new window to pop up. Hope that makes sense.

Please, any help is greatly appreciated.

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@96turnerriApr 02.2005 — this would not be done in JavaScript, however what media player are you thinking of embeding the videos in? WMP, Real Player, QuickTime?
Copy linkTweet thisAlerts:
@Warren86Apr 03.2005 — This works for wmv as well.


<HTML>

<Head>

<Script Language=JavaScript>

function playVideo(URL){

if (URL != "")
{
document.Player.filename = URL;
document.Player.play();
}
}


</Script>

</Head>

<Body>

<center>

<h4>Video Jukebox</h4>

</center>

<Table Width=650 Height=50 Border="0" Align="center" Cellspacing="2" Cellpadding="1">

<TR>

<TD align=center>

<Select name='videoList' onchange="playVideo(videoList.value)">

<option selected value="">Or, Choose One</option>

<option value="URL/playlist.wvx"> Play All </option>

<option value="URL/video1.mpeg"> First </option>

<option value="URL/video2.mpeg"> Second </option>

<option value="URL/video3.mpeg"> Third </option>

<option value="URL/video4.mpeg"> Fourth </option>

</Select>

</TD>

<TD align="left">

<OBJECT ID="Player" WIDTH=287 HEIGHT=225

CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95">

<PARAM NAME="BufferingTime" VALUE="30">

<PARAM NAME="AudioStream" VALUE="-1">

<PARAM NAME="AutoSize" VALUE="-1">

<PARAM NAME="Volume" VALUE="-400">

<PARAM NAME="AnimationAtStart" VALUE="-1">

</OBJECT>

</TD>

</TR>

</Table>

</Body>

</HTML>
-----------------



Create a Playlist file like this:


------------------
<ASX version ="3.0">

<Entry>

<Ref href="URL/video1.mpeg"/>

</Entry>

<Entry>

<Ref href="URL/video2.mpeg"/>

</Entry>

<Entry>

<Ref href="URL/video3.mpeg"/>

</Entry>

<Entry>

<Ref href="URL/video4.mpeg"/>

</Entry>

</ASX>

Copy and paste the above code, adjust the number of Entries as necessary, then save the

file as PlayList.wvx
Copy linkTweet thisAlerts:
@96turnerriApr 03.2005 — wmv[/QUOTE] is not a media player it is a file format, but i take it you wnat to use WMP, warrens code is pretty sound, not exactly how i would do it, but will work well
×

Success!

Help @TulipsAreBetter spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...