org.osmf.containers

# IMediaContainer - AS3 OSMF

Package | org.osmf.containers
Interface | public interface IMediaContainer
Implementors | HTMLMediaContainer, MediaContainer

Language Version: | ActionScript 3.0

Product Version: | OSMF 1.0

Runtime Versions: | Flash Player 10, AIR 1.5

Defines the interface of objects within the OSMF that act as a container to a media object.

Public Methods

| Method | Defined By
--- | --- | ---
|  | addMediaElement(element:MediaElement):MediaElement Adds a MediaElement instance to the container. | IMediaContainer
|  | containsMediaElement(element:MediaElement):Boolean Verifies if an element is a child of the container. | IMediaContainer
|  | removeMediaElement(element:MediaElement):MediaElement Removes a MediaElement instance from the container. | IMediaContainer

Method Detail

### addMediaElement

()
method

`public function addMediaElement(element:MediaElement):MediaElement`

Language Version: | ActionScript 3.0

Product Version: | OSMF 1.0

Runtime Versions: | Flash Player 10, AIR 1.5

Adds a MediaElement instance to the container. It is mandatory for implementations to dispatch a ContainerChangeEvent via the element that is being added to the container.

Parameters

| `element:MediaElement` — The MediaElement instance to add to the container.

Returns

| `MediaElement`

Throws

| `IllegalOperationError` — if the specified element is null, or already a child of the container.

### containsMediaElement

()
method

`public function containsMediaElement(element:MediaElement):Boolean`

Language Version: | ActionScript 3.0

Product Version: | OSMF 1.0

Runtime Versions: | Flash Player 10, AIR 1.5

Verifies if an element is a child of the container.

Parameters

| `element:MediaElement` — Element to verify.

Returns

| `Boolean` — True if the element if a child of the container.

### removeMediaElement

()
method

`public function removeMediaElement(element:MediaElement):MediaElement`

Language Version: | ActionScript 3.0

Product Version: | OSMF 1.0

Runtime Versions: | Flash Player 10, AIR 1.5

Removes a MediaElement instance from the container. It is mandatory for implementations to dispatch a ContainerChangeEvent via the element that is being removed from the container.

Parameters

| `element:MediaElement` — The element to remove from the container.

Returns

| `MediaElement`

Throws

| `IllegalOperationError` — if the specified element isn't a child element, or is null.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00