6 Interaction and Scripting

26.1423GPPDynamic and Interactive Multimedia Scenes (DIMS)Release 17TS

6.1 Local interaction

6.1.1 DOM Level 3 events

The supported local events and their management in DIMS are built upon the events model described in [1].

They include DOM Events (focus, activate, etc.), SVG Events (connection, load, etc.) and general XML events [19] (user events, timing, key, and pointer events).

6.1.2 Media Access Events

The media access events defined in [20] shall be supported.

6.1.3 Screen Orientation Events

The following events shall be supported.

Event Type

Namespace

Description

Interface

Bubble

Canc

"screenOrientationPortrait"

DIMS

The screen orientation has changed to typical ‘landscape’ orientation

ScreenOrientationEvent

No

No

"screenOrientationLandscape"

DIMS

The screen orientation has changed to typical ‘portrait’ orientation

ScreenOrientationEvent

No

No

interface ScreenOrientationEvent : Event
{
readonly attribute unsigned long screenWidth;
readonly attribute unsigned long screenHeight;
readonly attribute unsigned long screenAngle;
}

screenWidth – contains the new screen display or viewport width.

screenHeight -contains the new screen display or viewport height.

screenAngle – documents the angle between the primary axis of the screen, and an unrotated horizontal axis (see 5.4.2.8) with a value between 0 and 359 inclusive.

NOTE: A superset of the ScreenOrientationEvent interface is specified in [26].

6.1.4 Other Events

The events pausedevent and resumedevent from subclause 6.5.2 of [3] shall be supported.

The following events shall be supported.

Event Type

Namespace

Description

Interface

Bubble

Canc

"activatedEvent"

DIMS

Occurs when an element changes state from deactivated to activated

Event
(Annex A of [1])

No

No

"deactivatedEvent"

DIMS

Occurs when an element changes state from activated to deactivated

Event
(Annex A of [1])

No

No

6.2 Remote interaction

Client-server communication is possible in the DIMS system using three different mechanisms:

– The client can open a suitable URL. The set of valid URL forms is not specified in DIMS, and may include, for example, protocols such as HTTP [12], RTSP [16] or MailTo.

– By establishing a socket connection between the client and the server using the Connection API in the uDOM [17].

– By using the HTTP specific SVG uDOM methods getURL or postURL [17].

6.3 Scripting

SVG Tiny 1.2 contains a uDOM interface that provides linkage to a script engine and adds the possibility to modify the DOM representation of the scene from scripts.

ECMAScript mobile profile (MP) [2] can be used in conjunction with the script and handler elements and SVG µDOM API (Appendix A of [1]) in order to provide more powerful DOM manipulation, and interaction.

UEs supporting the DIMS media type shall support ECMAScript mobile profile (MP) [2] with the following extensions to uDOM API.

Table 1 adds to the table in subclause A.8.12 of [1]. It contains trait access rules for DIMS extensions.

Table 1: Trait access rules for DIMS extensions

Attribute

Trait Getter

Trait Setter

Default Values

Description

lsr:fullscreen

getTraitNS[true | false]

setTraitNS[true | false]

false

Available on <video> element

dims:fullscreen

getTraitNS[true | false]

setTraitNS[true | false]

false

Available on the <svg> element

lsr:x

getFloatTraitNS

setFloatTraitNS

0.0f

Origin x of the <rectClip>

lsr:y

getFloatTraitNS

setFloatTraitNS

0.0f

Origin y of the <rectClip>

lsr:width

getFloatTraitNS

setFloatTraitNS

0.0f

Width of the clipping region defined by <rectClip>

lsr:height

getFloatTraitNS

setFloatTraitNS

0.0f

Height of the clipping region defined by <rectClip>

smil:clipBegin

getTraitNS

setTraitNS

""

Available on <video>, <audio>, <animation>, and <updates> elements

smil:clipEnd

getTraitNS

setTraitNS

""

Available on <video>, <audio>, <animation>, and <updates> elements

dims:active

getTraitNS[true | false]

setTraitNS[true | false]

true

Available on all SVG elements

Description of getFloatTraitNS and setFloatTraitNS methods available on the TraitAccess interface:

float getFloatTraitNS(in DOMString namespaceURI, in DOMString name) raises(DOMException);

Same as getFloatTrait, but for namespaced traits. Parameter name shall be a non-qualified trait name, i.e. without prefix.

Parameters:

namespaceURI – the namespaceURI of the trait to retrieve.
name – the name of the trait to retrieve.

Return Value:

the trait value as float.

Exceptions:

DOMException – with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element or null.

DOMException – with error code TYPE_MISMATCH_ERR if requested trait’s computed value cannot be converted to a float.

void setFloatTraitNS(in DOMString namespaceURI, in DOMString name, in float value) raises(DOMException);

Same as setFloatTrait, but for namespaced traits. Parameter name shall be a non-qualified trait name, i.e. without prefix.

Parameters:

namespaceURI – the namespaceURI of the trait to be set.
name – the name of the trait to be set.
value – the value of the trait to be set as float.

Exceptions:

DOMException – with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element or null.

DOMException – with error code TYPE_MISMATCH_ERR if the requested trait’s value cannot be specified as a float (for e.g. NaN)

DOMException – with error code INVALID_ACCESS_ERR if the input value is an invalid value for the given trait or null.

ECMAScript bindings for the extensions defined in this specification can be found in Appendix D of [26].