1
mplayerplug-in supports the following javascript methods, properties and events
7
void PlayAt(in double value);
18
void Seek(in double value);
19
void Open(in string filename);
20
void SetFileName(in string filename);
24
void SetVolume(in double value);
28
void controls.pause();
33
attribute string filename;
34
readonly attribute long playState;
35
attribute boolean ShowControls;
36
attribute boolean fullscreen;
37
attribute boolean showlogo;
43
onMediaCompleteWithError(error)
54
Play(), DoPlay(), controls.play()
56
plays the current media
59
plays the current media, starting at value seconds into the media
61
Pause(), DoPause(), controls.pause()
63
pauses the playing media
65
Stop(), controls.stop()
67
stops the playing media
70
cancels the media player triggers onMediaComplete and onEndOfStream events
74
Seeks forward 10 seconds in the media
76
FastReverse(),rew(),rewind()
78
Seeks backwards 10 seconds in the media
82
Seeks "value" seconds into the media
84
Open(filename),SetFileName()
86
Opens "filename", but does not start it
90
Returns the number of seconds into the media
94
Returns the number of seconds the media is long
98
Gets percentage of media played 0 = 0% 100= 100%
99
Will return 0 for some media types since duration is not always
100
available from mplayer
103
Sets the volume to % value. So setting this to 50 sets the volume to 50% of max
106
Returns the percentage of max volume.
110
Able to get and set this property
111
x = filename, puts the URL of the current media in x
112
filename = "x", opens URL x, like Open("x")
116
Returns true if playState > 1 and < 7
121
Possible return values and meanings
139
Boolean property to make the player controls visible or not
142
Boolean property to make the player go fullscreen or not
145
Boolean property to make the logo visible or not
147
onMediaComplete, onEndOfStream
149
Events that are triggered when the playlist is empty
153
<embed onEndOfStream='alert("media done");' src="http://host/some/media.mov"></embed>
155
onMediaCompleteWithError(error)
157
Events that are triggered when the playlist is empty
161
ERROR_CODEC_FAILURE ERROR_NO_STREAM << 1
162
ERROR_EXPLICIT_KILL ERROR_NO_STREAM << 2
163
ERROR_PLAYER_INTERRUPTED ERROR_NO_STREAM << 3
164
ERROR_EXECV ERROR_NO_STREAM << 4
165
ERROR_NOT_PLAYLIST ERROR_NO_STREAM << 5
166
ERROR_FILE_NOT_FOUND ERROR_NO_STREAM << 6
170
<embed onMediaCompleteWithError='error_handler(error)' src="http://host/some/media.mov"></embed>
174
Event that is triggered when video media is uncovered by a window, might want to use
175
with the nopauseonhide embed attribute
177
<embed onVisible='someMethod();' nopauseonhide=true src="http://host/some/media.mov"></embed>
181
Event that is triggered when video media is covered by a window, might want to use
182
with the nopauseonhide embed attribute
184
<embed onHidden='someMethod();' nopauseonhide=true src="http://host/some/media.mov"></embed>
188
Event that is triggered when the embedded mplayerplug-in is destroyed, best used when mplayerplug-in
189
is in a frame and the frame is destroyed/hidden.
193
Event that is triggered when mouse button one is clicked over the plugin.
197
Event that is triggered when the mouse button is down over the plugin.
198
button is an integer that is the button that is down
202
Event that is triggered when the mouse button is released over the plugin.
203
button is an integer that is the button that is down