Class

# WebAudioPlayer

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Plays sounds and provides a user interface for sound control.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                            | Type                                               | Read-Only | Shared |
|-------------------------------------------------|----------------------------------------------------|-----------|--------|
| `AllowAutoPlay<webaudioplayer.allowautoplay>`   | `Boolean</api/data_types/boolean>`                 |           |        |
| `AllowLooping<webaudioplayer.allowlooping>`     | `Boolean</api/data_types/boolean>`                 |           |        |
| `ContextualMenu<webaudioplayer.contextualmenu>` | `WebMenuItem</api/user_interface/web/webmenuitem>` |           |        |
| `ControlID<webaudioplayer.controlid>`           | `String</api/data_types/string>`                   | ✓         |        |
| `Duration<webaudioplayer.duration>`             | `Double</api/data_types/double>`                   | ✓         |        |
| `Enabled<webaudioplayer.enabled>`               | `Boolean</api/data_types/boolean>`                 |           |        |
| `HasController<webaudioplayer.hascontroller>`   | `Boolean</api/data_types/boolean>`                 |           |        |
| `Height<webaudioplayer.height>`                 | `Integer</api/data_types/integer>`                 |           |        |
| `Indicator<webaudioplayer.indicator>`           | `Indicators<webuicontrol.indicators>`              |           |        |
| `Left<webaudioplayer.left>`                     | `Integer</api/data_types/integer>`                 |           |        |
| `LockBottom<webaudioplayer.lockbottom>`         | `Boolean</api/data_types/boolean>`                 |           |        |
| `LockHorizontal<webaudioplayer.lockhorizontal>` | `Boolean</api/data_types/boolean>`                 |           |        |
| `LockLeft<webaudioplayer.lockleft>`             | `Boolean</api/data_types/boolean>`                 |           |        |
| `LockRight<webaudioplayer.lockright>`           | `Boolean</api/data_types/boolean>`                 |           |        |
| `LockTop<webaudioplayer.locktop>`               | `Boolean</api/data_types/boolean>`                 |           |        |
| `LockVertical<webaudioplayer.lockvertical>`     | `Boolean</api/data_types/boolean>`                 |           |        |
| `Name<webaudioplayer.name>`                     | `String</api/data_types/string>`                   | ✓         |        |
| `Page<webaudioplayer.page>`                     | `WebPage</api/user_interface/web/webpage>`         | ✓         |        |
| `PanelIndex<webaudioplayer.panelindex>`         | `Integer</api/data_types/integer>`                 |           |        |
| `Parent<webaudioplayer.parent>`                 | `WebView</api/user_interface/web/webview>`         | ✓         |        |
| `Position<webaudioplayer.position>`             | `Double</api/data_types/double>`                   |           |        |
| `TabIndex<webaudioplayer.tabindex>`             | `Integer</api/data_types/integer>`                 |           |        |
| `Tooltip<webaudioplayer.tooltip>`               | `WebToolTip</api/user_interface/web/webtooltip>`   |           |        |
| `Top<webaudioplayer.top>`                       | `Integer</api/data_types/integer>`                 |           |        |
| `URL<webaudioplayer.url>`                       | `String</api/data_types/string>`                   |           |        |
| `Visible<webaudioplayer.visible>`               | `Boolean</api/data_types/boolean>`                 |           |        |
| `Width<webaudioplayer.width>`                   | `Integer</api/data_types/integer>`                 |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                  | Parameters                                                                                                                                    | Returns                                      | Shared |
|-------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------|--------|
| `AcceptPictureDrop<webaudioplayer.acceptpicturedrop>` | dragActionType As `WebDragItem.DragActionTypes<webdragitem.dragactiontypes>` = `WebDragItem.DragActionTypes.All<webdragitem.dragactiontypes>` |                                              |        |
| `AcceptRawDataDrop<webaudioplayer.acceptrawdatadrop>` | dragActionType As `WebDragItem.DragActionTypes<webdragitem.dragactiontypes>` = `WebDragItem.DragActionTypes.All<webdragitem.dragactiontypes>` |                                              |        |
| `AcceptTextDrop<webaudioplayer.accepttextdrop>`       | dragActionType As `WebDragItem.DragActionTypes<webdragitem.dragactiontypes>` = `WebDragItem.DragActionTypes.All<webdragitem.dragactiontypes>` |                                              |        |
| `AllowPictureDrag<webaudioplayer.allowpicturedrag>`   | dragActionType As `WebDragItem.DragActionTypes<webdragitem.dragactiontypes>` = `WebDragItem.DragActionTypes.All<webdragitem.dragactiontypes>` |                                              |        |
| `AllowRawDataDrag<webaudioplayer.allowrawdatadrag>`   | dragActionType As `WebDragItem.DragActionTypes<webdragitem.dragactiontypes>` = `WebDragItem.DragActionTypes.All<webdragitem.dragactiontypes>` |                                              |        |
| `AllowTextDrag<webaudioplayer.allowtextdrag>`         | dragActionType As `WebDragItem.DragActionTypes<webdragitem.dragactiontypes>` = `WebDragItem.DragActionTypes.All<webdragitem.dragactiontypes>` |                                              |        |
| `Close<webaudioplayer.close>`                         |                                                                                                                                               |                                              |        |
| `CSSClasses<webaudioplayer.cssclasses>`               |                                                                                                                                               | `WebCSSClasses</api/web/webcssclasses>`      |        |
| `ExecuteJavaScript<webaudioplayer.executejavascript>` | script As `String</api/data_types/string>`                                                                                                    |                                              |        |
| `GotoURL<webaudioplayer.gotourl>`                     | url As `String</api/data_types/string>`, inNewWindow As `Boolean</api/data_types/boolean>` = `False</api/language/false>`                     |                                              |        |
| `Pause<webaudioplayer.pause>`                         |                                                                                                                                               |                                              |        |
| `Play<webaudioplayer.play>`                           |                                                                                                                                               |                                              |        |
| `SetFocus<webaudioplayer.setfocus>`                   |                                                                                                                                               |                                              |        |
| `Style<webaudioplayer.style>`                         |                                                                                                                                               | `WebStyle</api/user_interface/web/webstyle>` |        |
|                                                       | `Assigns</api/language/assigns>` style As `WebStyle</api/user_interface/web/webstyle>`                                                        |                                              |        |
| `UpdateBrowser<webaudioplayer.updatebrowser>`         |                                                                                                                                               |                                              |        |

## Events

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                              | Parameters                                                                                                                                                                                                        | Returns |
|-------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
| `Closed<webaudioplayer.closed>`                                   |                                                                                                                                                                                                                   |         |
| `ContextualMenuSelected<webaudioplayer.contextualmenuselected>`   | hitItem As `WebMenuItem</api/user_interface/web/webmenuitem>`                                                                                                                                                     |         |
| `DropObject<webaudioplayer.dropobject>`                           | obj As `WebDragItem</api/user_interface/web/webdragitem>`, action As `WebDragItem.DragActionTypes<webdragitem.dragactiontypes>`, x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>` |         |
| `DownloadAborted<webaudioplayer.downloadaborted>`                 |                                                                                                                                                                                                                   |         |
| `DownloadError<webaudioplayer.downloaderror>`                     |                                                                                                                                                                                                                   |         |
| `DownloadStalled<webaudioplayer.downloadstalled>`                 |                                                                                                                                                                                                                   |         |
| `DownloadSuspended<webaudioplayer.downloadsuspended>`             |                                                                                                                                                                                                                   |         |
| `Hidden<webaudioplayer.hidden>`                                   |                                                                                                                                                                                                                   |         |
| `Opening<webaudioplayer.opening>`                                 |                                                                                                                                                                                                                   |         |
| `PlaybackBegan<webaudioplayer.playbackbegan>`                     |                                                                                                                                                                                                                   |         |
| `PlaybackEnded<webaudioplayer.playbackended>`                     |                                                                                                                                                                                                                   |         |
| `PlaybackPaused<webaudioplayer.playbackpaused>`                   |                                                                                                                                                                                                                   |         |
| `PlaybackProgressed<webaudioplayer.playbackprogressed>`           |                                                                                                                                                                                                                   |         |
| `PlaybackReady<webaudioplayer.playbackready>`                     |                                                                                                                                                                                                                   |         |
| `PlaybackReadyThroughEnd<webaudioplayer.playbackreadythroughend>` |                                                                                                                                                                                                                   |         |
| `PositionChanged<webaudioplayer.positionchanged>`                 |                                                                                                                                                                                                                   |         |
| `Shown<webaudioplayer.shown>`                                     |                                                                                                                                                                                                                   |         |

## Property descriptions

<div id="webaudioplayer.allowautoplay">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.AllowAutoPlay

**AllowAutoPlay** As `Boolean</api/data_types/boolean>`

> When `True</api/language/true>` the audio will begin as soon as enough of it has loaded to allow it to play without having to stop to load more of it.

<div id="webaudioplayer.allowlooping">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.AllowLooping

**AllowLooping** As `Boolean</api/data_types/boolean>`

> When `True</api/language/true>`, the sound will be played repeatedly, starting over each time it reaches the end.

<div id="webaudioplayer.contextualmenu">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.ContextualMenu

**ContextualMenu** As `WebMenuItem</api/user_interface/web/webmenuitem>`

> If you assign a `WebMenuItem</api/user_interface/web/webmenuitem>` to the control, it will be displayed when the user right-clicks the control.
>
> On a `WebPage</api/user_interface/web/webpage>`, you can disable/remove the default contextual menu by an empty `WebMenuItem</api/user_interface/web/webmenuitem>` class object to this property.

<div id="webaudioplayer.controlid">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.ControlID

**ControlID** As `String</api/data_types/string>`

> Identifies the control on a per session basis.
>
> This property is read-only.

<div id="webaudioplayer.duration">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Duration

**Duration** As `Double</api/data_types/double>`

> The duration (in seconds) of time required to play the audio file.
>
> This property is read-only.

<div id="webaudioplayer.enabled">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Enabled

**Enabled** As `Boolean</api/data_types/boolean>`

> When `True</api/language/true>` the **WebControl** is drawn enabled and responds to user action. When `False</api/language/false>`, the control appears as disabled and does not respond to user actions.
>
> In the case of `WebTimer</api/web/webtimer>`, when set to `False</api/language/false>` this disables and stops the WebTimer. When set to `True</api/language/true>`, it starts the WebTimer.
>
> Disable a button when a check box value changes:
>
> ``` xojo
> If AllowSaveCheckBox.Value Then
>   SaveButton.Enabled = True
> Else
>   AllowSaveButton.Enabled = False
> End If
> ```

<div id="webaudioplayer.hascontroller">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.HasController

**HasController** As `Boolean</api/data_types/boolean>`

> When `True</api/language/true>`, the <span class="title-ref">WebAudioPlayer</span> will display a set of controls the user can use to control the audio playback.

<div id="webaudioplayer.height">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Height

**Height** As `Integer</api/data_types/integer>`

> The height (in pixels) of the control.

<div id="webaudioplayer.indicator">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Indicator

**Indicator** As `Indicators<webuicontrol.indicators>`

> The color scheme for the control.

<div id="webaudioplayer.left">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Left

**Left** As `Integer</api/data_types/integer>`

> The position of the left side of the control in pixels, relative to the web page.

<div id="webaudioplayer.lockbottom">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.LockBottom

**LockBottom** As `Boolean</api/data_types/boolean>`

> Determines whether the bottom edge of the control should stay at a set distance from the bottom edge of the parent control, if there is one, or the owning web page.

<div id="webaudioplayer.lockhorizontal">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.LockHorizontal

**LockHorizontal** As `Boolean</api/data_types/boolean>`

> LockHorizontal overrides LockLeft and LockRight. It allows you to proportionally lock a control's position to the center of its parent control (or web page).
>
> For example, if you place a control in the center of the page and sets both LockHorizontal and LockVertical, the control will stay in the center of the page.

<div id="webaudioplayer.lockleft">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.LockLeft

**LockLeft** As `Boolean</api/data_types/boolean>`

> Determines whether the left edge of the control should stay at a set distance from the left edge of the parent control, if there is one, or the owning web page.

<div id="webaudioplayer.lockright">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.LockRight

**LockRight** As `Boolean</api/data_types/boolean>`

> Determines whether the right edge of the control should stay at a set distance from the right edge of the parent control, if there is one, or the owning web page.

<div id="webaudioplayer.locktop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.LockTop

**LockTop** As `Boolean</api/data_types/boolean>`

> Determines whether the top edge of the control should stay at a set distance from the top edge of the parent control, if there is one, or the owning web page.

<div id="webaudioplayer.lockvertical">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.LockVertical

**LockVertical** As `Boolean</api/data_types/boolean>`

> LockVertical overrides LockTop and LockBottom. It allows you to proportionally lock a control's position to keep it centered within the parent control or web page.
>
> For example, if you place a control in the center of the page, and sets both LockHorizontal and LockVertical, the control will stay in the center of the page.

<div id="webaudioplayer.name">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Name

**Name** As `String</api/data_types/string>`

> The name of the control.
>
> This property is read-only.

<div id="webaudioplayer.page">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Page

**Page** As `WebPage</api/user_interface/web/webpage>`

> Identifies the web page that contains the control.
>
> This property is read-only.

<div id="webaudioplayer.panelindex">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.PanelIndex

**PanelIndex** As `Integer</api/data_types/integer>`

> If the control has been placed on a <span class="title-ref">WebTabPanel</span> or `WebPagePanel</api/user_interface/web/webpagepanel>` control, this is the panel (page/tab) that the control is on. If the control is not on a panel, it returns -1.
>
> The first panel is numbered zero. If the control has been placed on a panel of a <span class="title-ref">WebTabPanel</span> or `WebPagePanel</api/user_interface/web/webpagepanel>` control, it returns the panel number. If the control is not on a `WebPagePanel</api/user_interface/web/webpagepanel>` or <span class="title-ref">WebTabPanel</span>, it returns -1. If you change the PanelIndex to a nonexistent panel, the control will disappear until you give it a PanelIndex value that corresponds to a panel that exists.
>
> If you are looking to change the currently selected panel (page/tab), use `SelectedPanelIndex<webpagecontrol.selectedpanelindex>`.
>
> This code displays the panel index of the control that is on the page.
>
> ``` xojo
> MessageBox(Me.SelectedPanelIndex.ToString)
> ```

<div id="webaudioplayer.parent">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Parent

**Parent** As `WebView</api/user_interface/web/webview>`

> Used to get the control's parent control or page. If the parent control is a `WebContainer</api/user_interface/web/webcontainer>`, then it returns the `WebContainer</api/user_interface/web/webcontainer>`. If it is on a `WebPage</api/user_interface/web/webpage>`, it returns the `WebPage</api/user_interface/web/webpage>`.
>
> This property is read-only.

<div id="webaudioplayer.position">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Position

**Position** As `Double</api/data_types/double>`

> The number of seconds into playback at which the audio file currently is.

<div id="webaudioplayer.tabindex">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.TabIndex

**TabIndex** As `Integer</api/data_types/integer>`

> The control's position in the Tab Order. The control with a TabIndex of 0 is the first control to get the focus when the page opens in the browser.
>
> This example sets the control's TabIndex.
>
> ``` xojo
> Me.TabIndex = 2
> ```

<div id="webaudioplayer.tooltip">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Tooltip

**Tooltip** As `WebToolTip</api/user_interface/web/webtooltip>`

> Text of a message displayed as a tooltip.
>
> The tip is displayed when the user places the mouse on the control and leaves it there.
>
> This code in the Shown event of a Button sets the tooltip:
>
> ``` xojo
> Me.Tooltip = "Save changes"
> ```

<div id="webaudioplayer.top">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Top

**Top** As `Integer</api/data_types/integer>`

> The top of the control in local coordinates relative to the web page.

<div id="webaudioplayer.url">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.URL

**URL** As `String</api/data_types/string>`

> The URL from which the sound file can/will be downloaded.

<div id="webaudioplayer.visible">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Visible

**Visible** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the control is drawn. If `False</api/language/false>`, it's not.
>
> Hide a control based on a checkbox setting:
>
> ``` xojo
> If ShowEmailCheckbox.Value Then
>   Me.Visible = True
> Else
>   Me.Visible = False
> End If
> ```

<div id="webaudioplayer.width">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Width

**Width** As `Integer</api/data_types/integer>`

> The width (in pixels) of the web control.
>
> This code in the Shown event handler increases the size of the control:
>
> ``` xojo
> Me.Width = Me.Width + 50
> ```

## Method descriptions

<div id="webaudioplayer.acceptpicturedrop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.AcceptPictureDrop

**AcceptPictureDrop**(dragActionType As `WebDragItem.DragActionTypes<webdragitem.dragactiontypes>` = `WebDragItem.DragActionTypes.All<webdragitem.dragactiontypes>`)

> Allows the control to accept a picture drop of a `WebDragItem</api/user_interface/web/webdragitem>`.

<div id="webaudioplayer.acceptrawdatadrop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.AcceptRawDataDrop

**AcceptRawDataDrop**(dragActionType As `WebDragItem.DragActionTypes<webdragitem.dragactiontypes>` = `WebDragItem.DragActionTypes.All<webdragitem.dragactiontypes>`)

> Allows the control to accept a raw data drop of a `WebDragItem</api/user_interface/web/webdragitem>`.

<div id="webaudioplayer.accepttextdrop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.AcceptTextDrop

**AcceptTextDrop**(dragActionType As `WebDragItem.DragActionTypes<webdragitem.dragactiontypes>` = `WebDragItem.DragActionTypes.All<webdragitem.dragactiontypes>`)

> Allows the control to accept a picture drop of a `WebDragItem</api/user_interface/web/webdragitem>`.

<div id="webaudioplayer.allowpicturedrag">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.AllowPictureDrag

**AllowPictureDrag**(dragActionType As `WebDragItem.DragActionTypes<webdragitem.dragactiontypes>` = `WebDragItem.DragActionTypes.All<webdragitem.dragactiontypes>`)

> Allows the control to be dragged as a picture.

<div id="webaudioplayer.allowrawdatadrag">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.AllowRawDataDrag

**AllowRawDataDrag**(dragActionType As `WebDragItem.DragActionTypes<webdragitem.dragactiontypes>` = `WebDragItem.DragActionTypes.All<webdragitem.dragactiontypes>`)

> Allows the control to be dragged as raw data.

<div id="webaudioplayer.allowtextdrag">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.AllowTextDrag

**AllowTextDrag**(dragActionType As `WebDragItem.DragActionTypes<webdragitem.dragactiontypes>` = `WebDragItem.DragActionTypes.All<webdragitem.dragactiontypes>`)

> Allows the control to be dragged as text.

<div id="webaudioplayer.close">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Close

**Close**

> Removes the control from the page.

<div id="webaudioplayer.cssclasses">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.CSSClasses

**CSSClasses**

> Returns the instance of `WebCSSClasses</api/web/webcssclasses>` for this control allowing you to add CSS classes to and remove CSS classes from the control.

<div id="webaudioplayer.executejavascript">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.ExecuteJavaScript

**ExecuteJavaScript**(script As `String</api/data_types/string>`)

> Executes the JavaScript passed. The JavaScript passed can call a JavaScript function in a WebPageSource control.
>
> The Xojo web framework uses EcmaScript 6 which is more strict than previous versions of JavaScript. For more details, see the [EcmaScript 6 documentation](https://www.ecma-international.org/ecma-262/6.0/).
>
> This code in the Pressed event of a Button displays an alert using JavaScript:
>
> ``` xojo
> Me.ExecuteJavaScript("alert('Hello!');")
> ```
>
> This code will select the text in a WebTextField (or WebTextArea):
>
> ``` xojo
> WebTextField1.ExecuteJavascript("document.getElementById('" + _
> WebTextField1.ControlID + "_inner').select();")
> ```

<div id="webaudioplayer.gotourl">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.GotoURL

**GotoURL**(url As `String</api/data_types/string>`, inNewWindow As `Boolean</api/data_types/boolean>` = `False</api/language/false>`)

> Opens the passed *url* in place of the current web page or downloads a file. If *inNewWindow* is `True</api/language/true>`, the browser is asked to open the *url* in a new window.
>
> If the browser has popup windows disabled and *inNewWindow* is `True</api/language/true>`, the method silently fails and the page is not shown.
>
> If *inNewWindow* is `False</api/language/false>`, the running web app is replaced with the specified *url*. If you want to display an external web site within your web app, use the `WebHTMLViewer</api/user_interface/web/webhtmlviewer>` control.
>
> Display a web site in a new popup window:
>
> ``` xojo
> Me.GotoURL("http://www.wikipedia.org", True)
> ```

<div id="webaudioplayer.pause">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Pause

**Pause**

> Pauses audio playback.

<div id="webaudioplayer.play">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Play

**Play**

> Begins playback of the audio file.

<div id="webaudioplayer.setfocus">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.SetFocus

**SetFocus**

> If the control is enabled, this method sets the focus to the <span class="title-ref">WebUIControl</span>.
>
> This code checks for a required value when a button is pressed:
>
> ``` xojo
> If UserNameField.Text.IsEmpty Then
>   MessageBox("Please enter your UserName.")
>   UserNameField.SetFocus
>   Return
> End If
> ```

<div id="webaudioplayer.style">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Style

**Style** As `WebStyle</api/user_interface/web/webstyle>`

> Returns the `WebStyle</api/user_interface/web/webstyle>` for the control.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

**Style**(`Assigns</api/language/assigns>` style As `WebStyle</api/user_interface/web/webstyle>`)

> Assigns the *style* to the control.
>
> In the `Pressed<webbutton.pressed>` event of a `WebButton</api/user_interface/web/webbutton>`, set the text to bold:
>
> ``` xojo
> Var style As New WebStyle
> style.Bold = True
> Me.Style = style
> ```

<div id="webaudioplayer.updatebrowser">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.UpdateBrowser

**UpdateBrowser**

> Forces the current values of the control to be sent to the browser.
>
> This method is useful when you are computing values in a loop and wish to update the browser immediately rather than wait until the current method ends.
>
> This code iterates through a `RowSet</api/databases/rowset>` of `database rows</api/databases/databaserow>`, updates a `ProgressBar</api/user_interface/web/webprogressbar>` and then forces the updated `ProgressBar</api/user_interface/web/webprogressbar>` to be sent to the browser via UpdateBrowser.
>
> ``` xojo
> ProgressBar1.MaximumValue = SalesData.RowCount
> For Each row As DatabaseRow in SalesData
>   AnalyzeSales(row)
>   ProgressBar1.Value = ProgressBar1.Value + 1
>   ProgressBar1.UpdateBrowser
> Next
> ```

## Event descriptions

<div id="webaudioplayer.closed">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Closed

**Closed**

> The control has been removed from the browser either because the page has closed or the control's Close method was called.

<div id="webaudioplayer.contextualmenuselected">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.ContextualMenuSelected

**ContextualMenuSelected**(hitItem As `WebMenuItem</api/user_interface/web/webmenuitem>`)

> Called when a contextual menu item is selected. This selected item is contained in *hitItem*.

<div id="webaudioplayer.dropobject">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.DropObject

**DropObject**(obj As `WebDragItem</api/user_interface/web/webdragitem>`, action As `WebDragItem.DragActionTypes<webdragitem.dragactiontypes>`, x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`)

> Called when a dragged item is over a control that can accept it. The dragged item is contained in *obj* and the type of drag is identified by *action*.

<div id="webaudioplayer.downloadaborted">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.DownloadAborted

**DownloadAborted**

> The download was aborted by the server.

<div id="webaudioplayer.downloaderror">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.DownloadError

**DownloadError**

> An error occurred while download the sound file from the server.

<div id="webaudioplayer.downloadstalled">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.DownloadStalled

**DownloadStalled**

> The downloading of the file has stalled.

<div id="webaudioplayer.downloadsuspended">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.DownloadSuspended

**DownloadSuspended**

> The downloading of the file has been suspended.

<div id="webaudioplayer.hidden">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Hidden

**Hidden**

> The control is about to become no longer visible. This could be because the page is being closed, is being replaced as the foreground page by another page or because the control or a parent control's Visible property has been set to `False</api/language/false>`.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> This event is equivalent to the `DesktopWindow.Deactivated<desktopwindow.deactivated>` event in a desktop app.
>
> </div>

<div id="webaudioplayer.opening">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Opening

**Opening**

> The control has been created and the page is opening but has not been sent to the browser yet.
>
> The Opening event handler can be used to initialize non-visual properties and settings for controls.
>
> In most cases, you should use the `Shown<webuicontrol.shown>` event to initialize controls.

<div id="webaudioplayer.playbackbegan">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.PlaybackBegan

**PlaybackBegan**

> The playback has begun either because the either because the `Play<webaudioplayer.play>` method was called, the user pressed the Play button in the controller or `AllowAutoPlay<webaudioplayer.allowautoplay>` was True and the file has finished downloading.

<div id="webaudioplayer.playbackended">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.PlaybackEnded

**PlaybackEnded**

> Playback of the sound file has ended because the sound file finished playing and `AllowAutoPlay<webaudioplayer.allowautoplay>` is `False</api/language/false>`.

<div id="webaudioplayer.playbackpaused">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.PlaybackPaused

**PlaybackPaused**

> Playing of the sound file has paused either because the `Pause<webaudioplayer.pause>` method was called or because the user pressed the Pause button in the audio player controller.

<div id="webaudioplayer.playbackprogressed">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.PlaybackProgressed

**PlaybackProgressed**

> Playback of the sound file has progressed. If implemented, this event is called frequently while the sound is playing. However, it may be called less frequently should the device need to conserve power.

<div id="webaudioplayer.playbackready">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.PlaybackReady

**PlaybackReady**

> Enough of the sound file has downloaded such that the app can begin playing the sound. The rest of the sound file can download while the sound is playing.

<div id="webaudioplayer.playbackreadythroughend">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.PlaybackReadyThroughEnd

**PlaybackReadyThroughEnd**

> The sound file has been completely downloaded thus playback can proceed without the need to download the rest of the file while the sound is playing.

<div id="webaudioplayer.positionchanged">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.PositionChanged

**PositionChanged**

> The `Position<webaudioplayer.position>` property has changed either via code or by the user dragging the position indicator in the web audio player controller.

<div id="webaudioplayer.shown">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebAudioPlayer.Shown

**Shown**

> The control has appeared on the currently displayed page. This could be because its parent page just finished loading, its parent page has come to the foreground or the control is now visible having been previously invisible because it or its parent control's Visible property has been set to `True</api/language/true>`.
>
> Use the Shown event for initializing your controls or doing anything that would interact with other controls or user interface elements on the web page instead of the `Opening<webcontrol.opening>` event.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> This event is the web equivalent to the `DesktopWindow.Activated<desktopwindow.activated>` event.
>
> </div>

## Notes

MP3 files are supported for all supported browsers. WAV files are supported on Windows only. Ogg files are supported for FireFox only.

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | Web |
| **Operating Systems** | All |

<div class="seealso">

`WebUIControl</api/user_interface/web/webuicontrol>` parent class

</div>
