DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Media

The Media content element acts as a dispatcher for different media output formats.

Media element and media formats

The MEDIA element and the various media formats

The Media content element is a dispatcher which gets its HTML output from one of the available render objects. By default, these render objects include SWFOBJECT (Flash driven by Javascript), QTOBJECT (Quicktime driven by Javascript) and MULTIMEDIA (the original MULTIMEDIA object rendered with EMBED tags).

The renderType defines which object is used for rendering. If set to its default value of "auto", the Media content element uses the media file's extension to choose the right renderer. This auto-detection may not work as well for external URLs so setting the renderType manually is preferable in that case.

If one of the existing renderTypes does not meet your needs, new renderTypes can be registered and rendered with a custom extension.

The Media content element contains the following third-party files in typo3/contrib/flashmedia:

  • qtobject/qtobject.js (Javascript for QTOBJECT)
  • swfobject/swfobject.js (Javascript for SWFOBJECT)
  • swfobject/expressInstall.swf (this is displayed if Flash version of client is too low)
  • flvplayer.swf (TYPO3 video player for flv, swf, mp4, m4u etc)
  • player.swf (Audio player from 1pixelout)
  • player.txt (License for audio player)

If you want to use a different player, it can be configured via TypoScript.

MEDIA Reference

flexParams

Property

flexParams

Data type

stdWrap

Description

Used for Flexform configuration of the content element

Default

flexParams.field = pi_flexform

alternativeContent

Property

alternativeContent

Data type

stdWrap

Description

Alternative content

Default

alternativeContent.field = bodytext

type

Property

type

Data type

string

Description

Defines media type: video/audio

Default

video

renderType

Property

renderType

Data type

string

Description

Used for select the render object. Possible renderTypes are: auto/swf/qt/object. Extensions may add custom renderTypes as well.

Default

auto

allowEmptyUrl

Property

allowEmptyUrl

Data type

boolean

Description

If set to 0 you see a warning if no file/URL is configured. If you do some advanced setup such as a Javascript-driven player with a playlist you may use the object without a URL and need to set the value to 1.

Default

0

mimeHandler

Property

mimeHandler

Data type

array

Description

The mappings between file extensions and render types can be configured here and will be used when renderType=auto. Possible values are MEDIA, SWF, QT

Default

mimeHandler {
        default = MEDIA
        mp3 = SWF
        mp4 = SWF
        m4v = SWF
        mov = QT
        avi = MEDIA
        asf = MEDIA
        class = MEDIA
        swa = SWF
}

mimeConf.swfobject

Property

mimeConf.swfobject

mimeConf.qtobject

Data type

array

Description

Copy of configuration for SWFOBJECT and QTOBJECT

Default

mimeConf.swfobject < tt_content.swfobject.20

mimeConf.qtobject < tt_content.qtobject.20

Video Player Reference

player

Property

player

Data type

string

Description

Location of video player

Default

{$styles.content.media.videoPlayer}

typo3/contrib/flashmedia/flvplayer.swf

defaultWidth

Property

defaultWidth

Data type

int

Description

Default video media width

Default

{$styles.content.media.defaultVideoWidth}

600

defaultHeight

Property

defaultHeight

Data type

int

Description

Default video media height

Default

{$styles.content.media.defaultVideoHeight}

400

default

Property

default

Data type

array

Description

Default parameters for flashvars / params / attributes

Usage:

default {
   flashvars.allowFullScreen = true
   params.wmode = transparent
   attributes.align = center
}

flashvars are used for swf file configuration. There is no standard across players, but for flvplayer see description below.

For detailed description of possible params/attributes visit this URL:

http://helpx.adobe.com/flash/kb/flash-object-embed-tag-attributes.html

Default

default {
        params.quality = high
        params.wmode = transparent
        params.menu = false
        params.allowScriptAccess =
        sameDomain
        params.allowFullScreen = true
}

mapping

Property

mapping

Data type

array

Description

If you want to rename predefined vars you can use mapping. See tt_content.media.20.audio where it's needed

Audio Player Reference

player

Property

player

Data type

string

Description

Location of audio player

Default

{$styles.content.media.audioPlayer}

typo3/contrib/flashmedia/player.swf

defaultWidth

Property

defaultWidth

Data type

int

Description

Default audio media width

Default

{$styles.content.media.defaultAudioWidth}

600

defaultHeight

Property

defaultHeight

Data type

int

Description

Default audio media height

Default

{$styles.content.media.defaultAudioHeight}

400

default

Property

default

Data type

array

Description

Default parameter for flashvars / params / attributes

Usage:

default {
        flashvars.allowFullScreen = true
        params.wmode = transparent
        attributes.align = center
}

Flashvars are used for swf file configuration. There is no standard across players, but for flvplayer see description below.

For detailed description of possible params/attributes visit this URL:

http://helpx.adobe.com/flash/kb/flash-object-embed-tag-attributes.html

Default

default {
        params.quality = high
        params.wmode = transparent
        params.allowScriptAccess =
        sameDomain
        params.menu = false
}

mapping

Property

mapping

Data type

array

Description

The audio player doesn't work with file, but instead expects the file with the flashvar soundFile. mapping does the rename of parameter for you by default.

Default

mapping {
        flashvars.file = soundFile
}

SWFOBJECT Reference

file

Property

file

Data type

stdWrap

Description

Media file or URL

width

Property

width

Data type

int

Description

Width of swfObject

height

Property

height

Data type

int

Description

Height of swfObject

flexParams

Property

flexParams

Data type

Flexform configuration

Description

Used for Flexform configuration of the CE

Default

flexParams.field = pi_flexform

alternativeContent

Property

alternativeContent

Data type

stdWrap

Description

Alternative content

Default

alternativeContent.field = bodytext

layout

Property

layout

Data type

stdWrap

Description

HTML Template for the Object. ###SWFOBJECT### is replaced with the sfwobject, ###ID### is replaced with the unique Id of the div/object

Default

###SWFOBJECT###

video.player

Data type

Array of properties

Description

Properties of each player.

QTOBJECT Reference

file

Property

file

Data type

stdWrap

Description

Media file or URL

width

Property

width

Data type

int

Description

Width of qtObject

height

Property

height

Data type

int

Description

Height of qtObject

flexParams

Property

flexParams

Data type

Flexform configuration

Description

Used for Flexform configuration of the CE

Default

flexParams.field = pi_flexform

alternativeContent

Property

alternativeContent

Data type

stdWrap

Description

Alternative content

Default

alternativeContent.field = bodytext

layout

Property

layout

Data type

stdWrap

Description

HTML Template for the Object. ###QTOBJECT### is replaced with the qtobject, ###ID### is replaced with the unique Id of the div/object

Default

###QTOBJECT###

video.player

Data type

Array of properties

Description

Properties of each player.