Module: player/Media

Manage the video or audio elements embedded in a presentation.

This module is part of the Sozi player embedded in each presentation.

Source:

Members

(inner, constant) mediaToStartByFrameId :object

A dictionary of video and audio elements to start in each frame.

Type:
  • object
Source:

(inner, constant) mediaToStopByFrameId :object

A dictionary of video and audio elements to stop in each frame.

Type:
  • object
Source:

(inner) player :module:player/Player.Player

The current Sozi player.

Type:
Source:

(inner, constant) soziNs :string

The Sozi namespace URI.

Type:
  • string
Source:

(inner, constant) svgNs :string

The SVG namespace URI.

Type:
  • string
Source:

(inner, constant) xhtmlNs :string

The XHTML namespace URI.

Type:
  • string
Source:

Methods

(static) disable()

Disable video and audio support in the current presentation.

This function disables the frameChange event handler and pauses all playing videos.

Source:

(static) init(p)

Initialize the video and audio element management.

This function transforms custom XML video and audio into their HTML counterparts.

It extracts the start/stop frame information for each media element, and registers a frameChange event handler to start and stop media in the appropriate frames.

Parameters:
Name Type Description
p module:player/Player.Player

The current Sozi player.

Source:

(inner) defaultEventHandler(evt)

A default event handler that prevents the propagation of an event.

For instance, this function prevents a click event inside a video element from also triggering a transition in the current presentation.

Parameters:
Name Type Description
evt Event

The DOM event to stop.

Source:
Listens to Events:
  • event:click
  • event:mousedown
  • event:mouseup
  • event:mousemove
  • event:contextmenu

(inner) onFrameChange()

Start or stop media on frame change.

Source:
Listens to Events: