Media
Summary
Stores a media file (Flash/QT/Real/etc.).Properties
Name | Internal name | Searchable | Information collector |
---|---|---|---|
Media | ezmedia | No. | No. |
Description
This datatype allows the storage and playback of a video file. It is capable of handling Apple QuickTime, Macromedia Flash, Microsoft Windows Media, Real Media, Silverlight*, HTML5 Video** and HTML Audio** files. The maximum allowed file size is determined by the "Max file size" class attribute edit parameter and the "upload_max_filesize" directive in the main PHP configuration file ("php.ini").
*available from 4.1 onwards
**available from 4.4 onwards
The following screenshot shows the class attribute edit interface for this datatype.
Class attribute edit interface for the "Media" datatype.
Media player type
The "Media player type" parameter controls the way the video file will be played back on the client side. The following options are available:
- Flash
- QuickTime
- RealPlayer
- Windows media player
- Silverlight - available from 4.1 onwards
- HTML5 Video - available from 4.4 onwards
- HTML5 Audio - available from 4.4 onwards
Regarding Html5_video and Html5_audio: As the name implies they use the native video and audio tag as added in html5, this means that as of the time of writing it's up to the browser to support the video/audio format you upload. For instance for video Apple Safari (incl IPhone & IPad) supports mpeg4(h.264) and Mozilla Firefox supports ogv (Theora). For an up-to-date list of supported formats in different browsers, see more info on html5 video and audio.
Media players and supported formats
In the table below you will find the media players supported by eZ Publish along with the supported formats out-of-the-box:
Media player | Formats |
---|---|
Flash |
.swf, .flv, .avi |
QuickTime |
.mov, .avi, .mp4 |
RealPlayer |
.rm |
Windows Media Player |
.wmv, .avi, .mpeg, .mp4 |
Silverlight |
.xap |
HTML5 Audio/Video |
.mp4, .m4v, .mov, .flv, .ogv, .avi, .webm |
Find more information on the pre-defined media content classes under "Media".
Max file size
The "Max file size" parameter makes it possible to set the highest size (in megabytes) that the system will allow. By default, this parameters is zero, which means that eZ Publish will not do any size checking when files are uploaded. In the example above, the "Max file size" parameter is set to 32 MB, which means that the object edit interface will not allow the upload of files that are larger than 32 megabytes. However, if the value of the "upload_max_filesize" PHP setting is lower than 32 megabytes, the underlying system will cancel the upload.
Object attribute edit interface
The object attribute edit interface for the "Media" datatype depends on the selected "Media player type" (in class edit mode). The following screenshots show the different object attribute edit interfaces for the supported media types.
Object attribute edit interface for the "Media" datatype (Flash).
Object attribute edit interface for the "Media" datatype (QuickTime).
Object attribute edit interface for the "Media" datatype (Real Media).
Object attribute edit interface for the "Media" datatype (Windows media).
Storage
Files that have been uploaded through the "Media" datatype are stored in the same way as files that are uploaded using the "File" datatype. However, the system keeps track of the media files using the "ezmedia" table instead of the "ezbinaryfile" table.
Raw output
The ".content" of an ezcontentobjectattribute object using this datatype returns an ezmedia object.
Balazs Halasy (21/02/2005 2:40 pm)
Geir Arne Waaler (29/09/2011 9:43 am)
Comments