/    Sign up×
Community /Pin to ProfileBookmark

<object> to run in a timeout

How can I make this:

<OBJECT ID=”Player” WIDTH=0 HEIGHT=0
CLASSID=”CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95″>
<PARAM NAME=”BufferingTime” VALUE=”10″>
<PARAM NAME=”AudioStream” VALUE=”-1″>
<PARAM NAME=”Volume” VALUE=”-400″>
<PARAM NAME=”FileName” VALUE=”media/5d.mp3″>
</OBJECT>

to run in a timeout?

to post a comment
JavaScript

9 Comments(s)

Copy linkTweet thisAlerts:
@phpnoviceJun 08.2005 — What are the exposed methods of that object?
Copy linkTweet thisAlerts:
@gebezisauthorJun 08.2005 — I don't understand

I use it for audio files
Copy linkTweet thisAlerts:
@phpnoviceJun 08.2005 — Yep, but in order to make it run on a timeout, JavaScript has to be able to manipulate the object. To do so, the object must expose methods which JavaScript can use in the desired fashion.
Copy linkTweet thisAlerts:
@gebezisauthorJun 08.2005 — I don't know what to "expose a method" means...
Copy linkTweet thisAlerts:
@phpnoviceJun 08.2005 — Ok, let's presume that the object exposes a method called "Play". If so, then you could do this:

window.setTimeout("document.getElementById('Player').Play()", 15000);

This would cause the object to play on a 15-second timeout.
Copy linkTweet thisAlerts:
@gebezisauthorJun 08.2005 — yes, the timeout works, but the mp3 still starts at the beginning and a second time in the timeout.
Copy linkTweet thisAlerts:
@phpnoviceJun 08.2005 — Meaning?
Copy linkTweet thisAlerts:
@gebezisauthorJun 08.2005 — I mean that the mp3 starts to play and when the timeout comes it starts again.

I mean I don't know what makes it start at the beginning.

the <object> is in the <body>.
Copy linkTweet thisAlerts:
@phpnoviceJun 08.2005 — There would have to be a PARAM that prevents it starting to play on its own. Otherwise, you can experiment to see if other methods are exposed such as (possibly):

.Stop()

.Pause()

.Rewind()

etc.
×

Success!

Help @gebezis 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 5.5,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

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