<par>

With the <media> element, provides parallel playback of separate media sources of differing types.

Syntax

<par></par>

Attributes

None.

Details

The <par> element, allows simultaneous playback of multiple media resources during a video call. In this implementation, you can simultaneously play back a single audio and a single video stream from separate sources.

Specify the media streams using child <media> elements. Exactly two such elements must be specified: one specifying an audio-only source and the other specifying a video-only source. If one of the elements references an audio-video source, playback does not occur.

For the audio source, the <media> element can either:

For the media source, the <media> element must reference an external source using the src or expr attribute.

If one of the sources cannot be played (for example, because of an error fetching a file), the other is still rendered. If a <par> element executes while in a voice call, only the audio stream plays.

The following restrictions apply to the use of <par>:

Parents

<prompt>

Children

<audio>, <media>, <property>

Examples

The following example shows how the <par> element can use the src attribute of the <media> element to reference an audio source and a video source:

<?xml version="1.0"?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
    <form>
        <block>
            <prompt>
                <par>
                    <media src="http://example.org/video.3gp"/>  <!-- Video only -->
                    <media src="http://example.org/audio.3gp"/>  <!-- Audio only -->
                </par>
            </prompt>
        </block>
    </form>
</vxml>

The following example , shows how the <par > element can enclose an audio phrase an inline SSML document. In this case, the <media> element must specify a type of application/ssml+xml.

<?xml version="1.0"?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
    <var name="num_messages" expr="3"/>
    <form>
        <block>
            <prompt>
                <par>
                    <media src="rtsp://example.org/avatar.3gp"/>  <!-- Video only -->
                    <media type="application/ssml+xml">
                        <speak version="1.0" xml:lang="en-GB">
                            Welcome to your Video Mail account!
                                You have <value expr="num_messages"/> messages.
                        </speak>
                    </media>
                </par>
            </prompt>
        </block>
</form>
</vxml>

See Also

<audio>, <media>, <prompt>