Ah-ha. After testing id3 tags with 3 different mp3 files that all
should have had id3 tags, and trying everything, I tried one more mp3 file: bingo. Added MediaPlayer.getMetadata() and a METADATA event. Contents of metadata vary by media being played and are open for interpretation by users of the player. FLV video returns their metadata object. MP3 audio returns id3 tags. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@708 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -32,6 +32,14 @@ import com.threerings.util.ValueEvent;
|
||||
*/
|
||||
[Event(name="position", type="com.threerings.util.ValueEvent")]
|
||||
|
||||
/**
|
||||
* Dispatched when media metadata is available, if ever.
|
||||
* <b>value</b>: metadata object. @see getMetadata() for more info.
|
||||
*
|
||||
* @eventType com.threerings.flash.media.MediaPlayerCodes.METADATA
|
||||
*/
|
||||
[Event(name="metadata", type="com.threerings.util.ValueEvent")]
|
||||
|
||||
/**
|
||||
* Dispatched when there's a problem.
|
||||
* <b>value</b>: a String error code/message.
|
||||
@@ -85,6 +93,12 @@ public interface MediaPlayer extends IEventDispatcher
|
||||
*/
|
||||
function getVolume () :Number;
|
||||
|
||||
/**
|
||||
* Get metadata, or null if none or not yet available. The exact format of this data
|
||||
* object varies by MediaPlayer implementation, see the documentation for each.
|
||||
*/
|
||||
function getMetadata () :Object;
|
||||
|
||||
/**
|
||||
* Unload the media.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user