Mobo Video View is the core component of MoboPlayer. It can be run on Android and ios platform, It contains common player-related functions as well as original floating windows playback function(only supports Android platform). It also provides a rich and flexible interface for developers to call related functions. Applicable to all types need to implement playback software and products.
开发者使用介绍
- public static int decode_mode_hard = 1; //硬解码
- public static int decode_mode_mediacodec = 2; //mediacodec硬件解码,支持Android 4.1及以上
- public static int decode_mode_soft = 3;//软解码
- public void loadNativeLibs(); //加载相应的解码包,至少要调用一次
- public void setOnVideoStateChangedListener(OnVideoStateChangedListener listener); //播放状态改变,回调的接口(初使化视频较耗时,故需在异步执行后回调此接口)
- public void setVideoPath(String path, String params); //设置需要播放的视频路径及其他参数
- params 内置字幕和音轨的index,格式为:audioTrackIndex+”n”+subtitleIndex,可不指定
- public void setVideoPath(String path); //设置需要播放的视频路径
- public void resetDecodeMode(int decodeMode); //重置解码方式
- public boolean isPlaying(); //当前是否播放状态
- public int getDecodeMode(); //获取当前解码方式
- public String getCurrentVideoPath(); //获取当前播放视频路径
- public void start(); //开始播放
- public void pause(); //暂停
- public void stop(); //停止:包括当前播放视频、字幕、音频的均停止
- public void seekTo(int position); //跳转到,单位秒
- public int getCurrentPosition(); //获取当前播放到的位置,单位:毫秒
If you want to use or customize MoboVideoView, please contact us.
Tel:15634011340 Email: mobo@moboplayer.com
Copyright © 2016—2018 Clov4r.Tek