JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

expand all

Profile: desktop, common

Overview

The Media class represents a media resource. It contains information about the media, such as its source, resolution, and metadata.

See Also:
MediaError

Profile: common

Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
public-readdurationDuration

The duration of the source media

public-readheightNumber

The height resolution of the source media may be zero if the media has no height, such as the case with audio, or if the height is currently unknown, which may occur with streaming media.

public-readmetadataMetadata[]

a sequence of Metadata objects which can contain information about the media.

publiconErrorfunction(:MediaError):Void

The function to be invoked when an error occurs on this Media object.

The function to be invoked when an error occurs on this Media object. Note that onError should be initialized before setting the source of the media to ensure that the errors can be handled appropriately.

See Also:
MediaError

Profile: common

 
public-initsourceString

Defines the String which specifies the URI of the media; It must be an absolute URI, such as "file:///media.fxm".

Defines the String which specifies the URI of the media; It must be an absolute URI, such as "file:///media.fxm". If it is relative to the codebase the __DIR__ may be used, as in "{__DIR__}/media.fxm". Supported protocols include "file:", "http:", and "jar:". Currently, only audio in MP3, AU, and WAV containers are supported from within jar files.

Profile: common

 
public-readtracksTrack[]

The tracks contained in this media object A media object can contain several, parallel tracks, such as a video track with several audio and subtitle tracks

public-readwidthNumber

The width resolution of the source media may be zero if the media has no width, such as the case with audio, or if the height is currently unknown, which may occur with streaming media.

Inherited Variables

Function Summary

public getMetadata(key: java.lang.String) : java.lang.Object

Returns the metadata stored in the source media for the specified key

Returns the metadata stored in the source media for the specified key

See Also:
metadata

Parameters
key
the name of the key, such as "author"
Returns
Object
the Object for the specided key. The class of this is often a String but could be another class depending on the media type and the key value. Note that metadata may not be available for all media types.

Profile: common

 

Inherited Functions




Spec-Zone.ru - all specs in one place