Commit f5615e379d533c6f9caadcb280d30296fc242b74

Authored by 吴奎庆
1 parent 2b7b9e16

1:视频预览兼容

config.gradle
... ... @@ -21,7 +21,7 @@ ext {
21 21 //编译方式
22 22 debug : false,
23 23 //版本号
24   - version: "1.0.3.0",
  24 + version: "1.0.3.5",
25 25 //Lib库前缀
26 26 packeg : "com.cnlive.media",
27 27 //Lib库名称
... ...
lib_media/src/main/java/com/cnlive/media/frame/view/MediaFView.java
... ... @@ -66,6 +66,7 @@ public class MediaFView implements MvpView {
66 66 Uri uri = Uri.parse(mFragment.mMedia.fileUri);
67 67 Intent intent = new Intent(Intent.ACTION_VIEW);
68 68 intent.setDataAndType(uri, "video/*");
  69 + intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
69 70 if (mFragment.getActivity().getPackageManager().queryIntentActivities(intent, 0).isEmpty()) {
70 71 AlertUtil.showDeftToast(mFragment.getActivity(), "未检测到播放器");
71 72 } else {
... ...
lib_media/src/main/res/layout/fragment_record_preview.xml
... ... @@ -33,8 +33,8 @@
33 33 android:visibility="gone">
34 34  
35 35 <ImageView
  36 + android:layout_centerInParent="true"
36 37 android:id="@+id/iv_video"
37   - android:scaleType="fitCenter"
38 38 android:layout_width="wrap_content"
39 39 android:layout_height="wrap_content" />
40 40  
... ...