私はストリーミングビデオプレーヤーアプリケーションを使用しています。
mp4形式のビデオのビデオ期間を取得できます
しかし、m3u8 ビデオ形式の URL のビデオの長さを取得できませんでした。
Here is the code i have used
vdoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
public void onPrepared(MediaPlayer mp) {
mp.setOnBufferingUpdateListener(new OnBufferingUpdateListener() {
public void onBufferingUpdate(MediaPlayer arg0, int percent) {
tv_BufferingPercent.setText(" " + percent + "%");
}
});
System.out.println("GET DURATION :"+vdoView.get);
txtTotalTime.setText(formatDuration(vdoView.getDuration()));
sbVideoProgress.setMax((int) vdoView.getDuration());
}
});
getduration() メソッドの値が 0 になっています。
私を助けてください