public class NativeMediaManager extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
NativeMediaManager()
Create a
NativeMediaManager. |
| Modifier and Type | Method and Description |
|---|---|
void |
addMediaErrorListener(MediaErrorListener listener) |
boolean |
canPlayContentType(String contentType)
Whether a media source having the indicated content type may be played.
|
boolean |
canPlayProtocol(String protocol)
Whether a media source having the indicated protocol may be played.
|
List<MediaPlayer> |
getAllMediaPlayers()
Retrieve all un-disposed
MediaPlayers. |
static NativeMediaManager |
getDefaultInstance()
Get the default
NativeMediaManager. |
Media |
getMedia(Locator locator)
Get a player for the media locator.
|
static MetadataParser |
getMetadataParser(Locator locator) |
MediaPlayer |
getPlayer(Locator locator) |
String[] |
getSupportedContentTypes() |
static void |
registerMediaPlayerForDispose(Object obj,
MediaPlayer player)
This function will register MediaPlayer for disposing when obj parameter
does not have any strong reference.
|
void |
removeMediaErrorListener(MediaErrorListener listener) |
public static NativeMediaManager getDefaultInstance()
NativeMediaManager.NativeMediaManager instance.public boolean canPlayContentType(String contentType)
IllegalArgumentException - if
contentType is
null.MediaManager.canPlayContentType(java.lang.String)public String[] getSupportedContentTypes()
public boolean canPlayProtocol(String protocol)
IllegalArgumentException - if
protocol is
null.MediaManager.canPlayProtocol(java.lang.String)public static MetadataParser getMetadataParser(Locator locator)
public MediaPlayer getPlayer(Locator locator)
MediaManager#getPlayer(com.sun.media.jfxmedia.locator.Locator, int)public Media getMedia(Locator locator)
locator - permitFullScan - public void addMediaErrorListener(MediaErrorListener listener)
public void removeMediaErrorListener(MediaErrorListener listener)
public static void registerMediaPlayerForDispose(Object obj, MediaPlayer player)
obj - - Object to watch for strong referencesplayer - - MediaPlayer to disposepublic List<MediaPlayer> getAllMediaPlayers()
MediaPlayers.List of all un-disposed players or
null.Copyright © 2025. All rights reserved.