Commit a8183c7d by Lee Munkyeong

コードレビュー対応及び動画エンコード失敗の処理追加。

parent dc6b6967
...@@ -825,7 +825,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -825,7 +825,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
String encodedPath = new VideoEncoder().changeResolution(file, callBack); String encodedPath = new VideoEncoder().changeResolution(file, callBack);
encodedFilePath = encodedPath; encodedFilePath = encodedPath;
} catch (Throwable throwable) { } catch (Throwable throwable) {
throwable.printStackTrace(); mChatWebView.loadUrl("javascript:CHAT_UI.videoEncodeFail();)");
} }
} }
}; };
...@@ -854,14 +854,12 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -854,14 +854,12 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
Uri baseUri = Uri.parse("content://media/external/video/media"); Uri baseUri = Uri.parse("content://media/external/video/media");
return Uri.withAppendedPath(baseUri, "" + id); return Uri.withAppendedPath(baseUri, "" + id);
} else { } else {
if (file.exists()) { if (!file.exists()) { return null; }
ContentValues values = new ContentValues(); ContentValues values = new ContentValues();
values.put(MediaStore.MediaColumns.DATA, filePath); values.put(MediaStore.MediaColumns.DATA, filePath);
return context.getContentResolver().insert( return context.getContentResolver().insert(
MediaStore.Video.Media.EXTERNAL_CONTENT_URI, values); MediaStore.Video.Media.EXTERNAL_CONTENT_URI,
} else { values);
return null;
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment