Vassil Catsarov
05-18-2003, 09:20 AM
Hello Folks
I'm completely new to JavaScripting, so your help will be invaluable.
How can I make a JavaScript execute itself periodocally, e.g. every second to check for example whether a particular RealVideo clip is playing and to initiate defferent behaviors - show clip info, hide the image window, etc. when a certain clip starts or stops playing.
Thank you!
Vassil Catsarov
Below there is a list with the properties, methods and events RealPlayer uses:
--***Properties***
-- Source:
-- Specifies the URL of the RealPlayer clip to play. The Source location can be pnm:, file: or http: protocol.
-- Controls:
-- Returns/Sets the visible components of the control. Valid CONTROLS include ALL, ControlPanel,
-- InfoVolumePanel, InfoPanel, StatusBar, PlayButton, StopButton, VolumeSlider, PositionSlider, PositionField,
-- StatusField, and ImageWindow.
-- Console:
-- Sets a console name used to link multiple control instances. All controls with the same console name work
-- together. For example, if you have multiple Play and Stop buttons on the same page, the console name would
-- enable them to control the same RealPlayer clip. Call this function once for each instance of the Play or Stop
-- button you want to link. The console name master links to all instances while unique links to no other instances.
-- Autostart:
-- Sets whether or not the control automatically starts playing once the source data is available. Valid values are
-- TRUE or FALSE.
-- NoLabels:
-- Suppresses the Title, Author, and Copyright label text in the controls window. The text strings in the fields are
-- still displayed.
-- AutoGotoURL:
-- Specifies how a URL will be handled. Valid values are TRUE or FALSE. TRUE indicates that the RealPlayer
-- ActiveX Control will automatically forward the URL event to the browser. FALSE indicates that the OnGotoURL
-- VBScript event will be sent instead.
-- ***Methods***
-- DoPlayPause:
-- Plays or pauses the current clip. Equivalent to clicking the Play/Pause button.
-- DoStop:
-- Stops the RealPlayer clip. Equivalent to clicking the Stop button.
-- DoNextItem:
-- Skips to the next clip in a .ram file that contains multiple clips. A .ram file is a RealMedia metafile that points
-- to one or more RealMedia files.
-- DoPrevItem:
-- Skips to the previous clip in a .ram file that contains multiple clips. A .ram file is a RealMedia metafile that points
-- to one or more RealMedia files.
-- CanPlayPause:
-- Tests if Play/Pause function is available. Returns TRUE or FALSE
-- CanStop:
-- Tests if Stop function is available. Returns TRUE or FALSE.
-- HasNextItem:
-- Tests if the next clip function is available. The next clip function is available when the connected source is a .ram
-- file that contains multiple clips, and the current clip is not the last clip in the .ram file. Returns TRUE or FALSE.
-- HasPrevItem:
-- Tests if the previous clip function is available. The previous clip function is available when the connected source
-- is a .ram file that contains multiple clips, and the current clip is not the first clip in the .ram file. Returns TRUE or FALSE.
-- AboutBox:
-- Opens the Copyright information for the control.
-- EditPreferences:
-- Opens the Preferences dialog box. Enables the end user to set his/her RealPlayer preferences. These preferences
-- are global to all RealPlayer clients on the machine.
-- HideShowStatistics:
-- Shows or hides the Connection Statistics dialog box.
-- IsStatisticsVisible:
-- Tests if the Connection Statistics dialog box is displayed. Returns TRUE or FALSE.
-- DoGotoURL(url, target):
-- Causes the control to attempt a navigation to the specified URL in the specified frame target. The container must
-- support URL browsing. Parameters: string URL, string target.
-- ***Events***
-- OnClipOpened(shortClipname,url):
-- Sent when a clip has been opened by the control. Parameters: string shortClipName, string URL.
-- OnClipClosed():
-- Sent to indicate that no clip is currently opened by the control. No parameters.
-- OnShowStatus(statusText):
-- Sent to indicate that the ActiveX Control's status text is changing. Parameters: string statusText.
-- OnGotoURL(url,target):
-- Sent when a URL event has been encountered for the currently playing RealPlayer clip. This event will only occur
-- if the AutoGotoURL property is FALSE. Parameters: string URL, string target
I'm completely new to JavaScripting, so your help will be invaluable.
How can I make a JavaScript execute itself periodocally, e.g. every second to check for example whether a particular RealVideo clip is playing and to initiate defferent behaviors - show clip info, hide the image window, etc. when a certain clip starts or stops playing.
Thank you!
Vassil Catsarov
Below there is a list with the properties, methods and events RealPlayer uses:
--***Properties***
-- Source:
-- Specifies the URL of the RealPlayer clip to play. The Source location can be pnm:, file: or http: protocol.
-- Controls:
-- Returns/Sets the visible components of the control. Valid CONTROLS include ALL, ControlPanel,
-- InfoVolumePanel, InfoPanel, StatusBar, PlayButton, StopButton, VolumeSlider, PositionSlider, PositionField,
-- StatusField, and ImageWindow.
-- Console:
-- Sets a console name used to link multiple control instances. All controls with the same console name work
-- together. For example, if you have multiple Play and Stop buttons on the same page, the console name would
-- enable them to control the same RealPlayer clip. Call this function once for each instance of the Play or Stop
-- button you want to link. The console name master links to all instances while unique links to no other instances.
-- Autostart:
-- Sets whether or not the control automatically starts playing once the source data is available. Valid values are
-- TRUE or FALSE.
-- NoLabels:
-- Suppresses the Title, Author, and Copyright label text in the controls window. The text strings in the fields are
-- still displayed.
-- AutoGotoURL:
-- Specifies how a URL will be handled. Valid values are TRUE or FALSE. TRUE indicates that the RealPlayer
-- ActiveX Control will automatically forward the URL event to the browser. FALSE indicates that the OnGotoURL
-- VBScript event will be sent instead.
-- ***Methods***
-- DoPlayPause:
-- Plays or pauses the current clip. Equivalent to clicking the Play/Pause button.
-- DoStop:
-- Stops the RealPlayer clip. Equivalent to clicking the Stop button.
-- DoNextItem:
-- Skips to the next clip in a .ram file that contains multiple clips. A .ram file is a RealMedia metafile that points
-- to one or more RealMedia files.
-- DoPrevItem:
-- Skips to the previous clip in a .ram file that contains multiple clips. A .ram file is a RealMedia metafile that points
-- to one or more RealMedia files.
-- CanPlayPause:
-- Tests if Play/Pause function is available. Returns TRUE or FALSE
-- CanStop:
-- Tests if Stop function is available. Returns TRUE or FALSE.
-- HasNextItem:
-- Tests if the next clip function is available. The next clip function is available when the connected source is a .ram
-- file that contains multiple clips, and the current clip is not the last clip in the .ram file. Returns TRUE or FALSE.
-- HasPrevItem:
-- Tests if the previous clip function is available. The previous clip function is available when the connected source
-- is a .ram file that contains multiple clips, and the current clip is not the first clip in the .ram file. Returns TRUE or FALSE.
-- AboutBox:
-- Opens the Copyright information for the control.
-- EditPreferences:
-- Opens the Preferences dialog box. Enables the end user to set his/her RealPlayer preferences. These preferences
-- are global to all RealPlayer clients on the machine.
-- HideShowStatistics:
-- Shows or hides the Connection Statistics dialog box.
-- IsStatisticsVisible:
-- Tests if the Connection Statistics dialog box is displayed. Returns TRUE or FALSE.
-- DoGotoURL(url, target):
-- Causes the control to attempt a navigation to the specified URL in the specified frame target. The container must
-- support URL browsing. Parameters: string URL, string target.
-- ***Events***
-- OnClipOpened(shortClipname,url):
-- Sent when a clip has been opened by the control. Parameters: string shortClipName, string URL.
-- OnClipClosed():
-- Sent to indicate that no clip is currently opened by the control. No parameters.
-- OnShowStatus(statusText):
-- Sent to indicate that the ActiveX Control's status text is changing. Parameters: string statusText.
-- OnGotoURL(url,target):
-- Sent when a URL event has been encountered for the currently playing RealPlayer clip. This event will only occur
-- if the AutoGotoURL property is FALSE. Parameters: string URL, string target