desc:进度问题

main
xiaowusky 2 years ago
parent 6caf9eb0e1
commit d8d4b1c125

@ -227,15 +227,6 @@ public class ProVideoActivity extends AppCompatActivity {
super.onDestroy();
}
// @Override
// public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
// super.onRequestPermissionsResult(requestCode, permissions, grantResults);
// if (REQUEST_WRITE_STORAGE == requestCode){
// if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
// doTakePicture();
// }
// }
// }
@Override
public void onConfigurationChanged(Configuration newConfig) {
@ -282,51 +273,4 @@ public class ProVideoActivity extends AppCompatActivity {
mMode = mVideoView.toggleAspectRatio();
Log.i(TAG, "画面模式:" + mMode);
}
// /*
// * 截图
// * */
// public void onTakePicture(View view) {
// if (mVideoView.isInPlaybackState()) {
// if (ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED){
// ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, REQUEST_WRITE_STORAGE);
// } else {
// doTakePicture();
// }
// }
// }
//
// private void doTakePicture() {
// File file = new File(FileUtil.getPicturePath());
// file.mkdirs();
//
// file = new File(file, "pic_" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".jpg");
// final String picture = mVideoView.takePicture(file.getPath());
//
// if (!TextUtils.isEmpty(picture)) {
// Toast.makeText(ProVideoActivity.this,"图片已保存", Toast.LENGTH_SHORT).show();
//
// if (mScanner == null) {
// MediaScannerConnection connection = new MediaScannerConnection(ProVideoActivity.this, new MediaScannerConnection.MediaScannerConnectionClient() {
// public void onMediaScannerConnected() {
// mScanner.scanFile(picture, "image/jpeg");
// }
//
// public void onScanCompleted(String path1, Uri uri) {
//
// }
// });
//
// try {
// connection.connect();
// } catch (Exception e) {
// e.printStackTrace();
// }
//
// mScanner = connection;
// } else {
// mScanner.scanFile(picture, "image/jpeg");
// }
// }
// }
}

@ -548,8 +548,8 @@ public class VideoControllerView extends FrameLayout implements IMediaController
mProgress.setProgress(0);
}
int percent = mPlayer.getBufferPercentage();
mProgress.setSecondaryProgress(percent * 10);
// int percent = mPlayer.getBufferPercentage();
// mProgress.setSecondaryProgress(percent * 10);
}
if (mEndTime != null)

@ -31,8 +31,7 @@
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:progress="0"
android:secondaryProgress="60" />
android:progress="0"/>
<TextView
android:id="@+id/total_time"

Loading…
Cancel
Save