Stop Method

Description

Stops the audio stream.

Syntax
object.Stop

ParameterDescription
This method has no parameters.

Return Value

This method does not return a value.

Remarks

For safe event-driven programming, it is recommended that the Stop method be used before the Play method is called to make sure that the player is properly initialized.

If Stop is called and the audio control is not currently playing, S_FALSE error will be generated.

Web browsers cache Web pages upon moving to a new page. If a Web page playing audio is cached, the audio may still continue to play until enough pages are loaded to cause the browser to remove the page from memory. If you want the audio to stop playing when a new page is loaded, add this code to the old page:


Sub window_onUnload()
   call rtpaudio.Stop()
end sub

Example

The following code example shows how to use Stop to stop an audio player. The audio control object is called rtpaudio and a button has been created called BtnStop. When the button is clicked, the NetShow RTP Audio player will stop.


Sub BtnStop_OnClick
 call rtpaudio.Stop()
End Sub

See Also

Play

Return to the RTP Audio Control Reference.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.