use of org.videolan.libvlc.interfaces.IMedia in project vlc-android by videolan.
the class MediaPlayer method play.
/**
* Play a media via its Uri
* @param uri {@link Uri} of the media to play
*/
public void play(@NonNull Uri uri) {
final IMedia media = new Media(mILibVLC, uri);
play(media);
}
use of org.videolan.libvlc.interfaces.IMedia in project vlc-android by videolan.
the class MediaPlayer method play.
/**
* Load an asset and starts playback
* @param afd The {@link AssetFileDescriptor} to play
*/
public void play(@NonNull AssetFileDescriptor afd) {
final IMedia media = new Media(mILibVLC, afd);
play(media);
}
use of org.videolan.libvlc.interfaces.IMedia in project vlc-android by videolan.
the class MediaPlayer method play.
/**
* Play a media via its mrl
* @param path Path of the media file to play
*/
public void play(@NonNull String path) {
final IMedia media = new Media(mILibVLC, path);
play(media);
}
use of org.videolan.libvlc.interfaces.IMedia in project vlc-android by videolan.
the class MediaBrowser method browse.
/**
* Browse to the specified uri.
*
* @param uri
* @param flags see {@link MediaBrowser.Flag}
*/
@MainThread
public void browse(Uri uri, int flags) {
final IMedia media = mFactory.getFromUri(mILibVlc, uri);
browse(media, flags);
media.release();
}
use of org.videolan.libvlc.interfaces.IMedia in project vlc-android by videolan.
the class MediaList method getMediaAt.
/**
* Get a Media at specified index.
*
* @param index index of the media
* @return Media hold by MediaList. This Media should be released with {@link #release()}.
*/
public synchronized IMedia getMediaAt(int index) {
if (index < 0 || index >= getCount())
throw new IndexOutOfBoundsException();
final IMedia media = mMediaArray.get(index);
media.retain();
return media;
}
Aggregations