video怎么播放byte[]数据
Closed this issue · 1 comments
poxiaohai commented
video怎么播放byte[]数据
ywl5320 commented
像这样:
wlMedia = new WlMedia();
wlSurfaceView.setWlMedia(wlMedia);
wlMedia.setSource("buffer");
wlMedia.setSourceType(WlSourceType.BUFFER);
wlMedia.setOnMediaInfoListener(new WlOnMediaInfoListener() {
@Override
public void onPrepared() {
wlMedia.start();
}
@Override
public void onError(int i, String s) {
WlLog.d("onError " + s);
}
@Override
public void onComplete(WlComplete wlComplete, String s) {
WlLog.d("complete:" + wlComplete.getType() + ",msg:" + s);
}
@Override
public void onTimeInfo(double v, double v1) {
}
@Override
public void onSeekFinish() {
}
@Override
public void onLoopPlay(int i) {
}
@Override
public void onLoad(boolean b) {
}
@Override
public byte[] decryptBuffer(byte[] bytes) {
return new byte[0];
}
@Override
public byte[] readBuffer(int i) {
WlLog.d("readBuffer " + i);
byte[] buffer = new byte[i];
try {
fis.read(buffer);
} catch (IOException e) {
return null;
}
return buffer;
}
@Override
public void onPause(boolean b) {
}
});