本文整理汇总了Java中tv.danmaku.ijk.media.exo.IjkExoMediaPlayer类的典型用法代码示例。如果您正苦于以下问题:Java IjkExoMediaPlayer类的具体用法?Java IjkExoMediaPlayer怎么用?Java IjkExoMediaPlayer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IjkExoMediaPlayer类属于tv.danmaku.ijk.media.exo包,在下文中一共展示了IjkExoMediaPlayer类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMedia
import tv.danmaku.ijk.media.exo.IjkExoMediaPlayer; //导入依赖的package包/类
@Override
IMediaPlayer getMedia(Context context, String url, Map<String, String> headers) throws Exception {
IjkExoMediaPlayer mediaPlayer = new IjkExoMediaPlayer(context);
mediaPlayer.setDataSource(context, Uri.parse(url), headers);
mainThreadHandler.postDelayed(runnable, 500);
return mediaPlayer;
}
示例2: initVideoPlayer
import tv.danmaku.ijk.media.exo.IjkExoMediaPlayer; //导入依赖的package包/类
@Override
public void initVideoPlayer(Context context, Message msg, List<VideoOptionModel> optionModelList) {
mediaPlayer = new IjkExoMediaPlayer(context);
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
try {
mediaPlayer.setDataSource(context, Uri.parse(((GSYModel) msg.obj).getUrl()), ((GSYModel) msg.obj).getMapHeadData());
} catch (Exception e) {
e.printStackTrace();
}
}
示例3: run
import tv.danmaku.ijk.media.exo.IjkExoMediaPlayer; //导入依赖的package包/类
@Override
public void run() {
if (isPrepar)
onBufferingUpdate(mediaPlayer, ((IjkExoMediaPlayer) mediaPlayer).getBufferedPercentage());
mainThreadHandler.postDelayed(runnable, 1000);
}