Commit dc6b6967 by Lee Munkyeong

サーバにエンコードした動画を送信したら削除する処理実装

parent eb84ed53
......@@ -124,7 +124,6 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
private final String TAG = "ChatWebViewActivity";
private final String NETWORK_ERROR_PLACE_HOLDER = "file:///android_asset/chat/public_new/chat.html";
//private final String NETWORK_ERROR_PLACE_HOLDER = "file:///android_asset/chat/public/networkError.html";
private final String CHAT_PAGE_URL = "file:///android_asset/chat/public_new/chat.html";
private final String CHAT_ROOM_PAGE_URL = "file:///android_asset/chat/public_new/chat_room.html";
private final String COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration.html";
......@@ -545,7 +544,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
File file = new File(filePath);
NetworkTask networkTask = new NetworkTask(url, filePath);
networkTask.execute();
} else if (url.contains("/file/getImage")) {
} else if (url.contains("/file/getImage") && !url.contains(".mp4")) {
Uri uri = Uri.parse(url);
String fileName = uri.getQueryParameter("fileName");
String filePath = getFilesDir().getAbsolutePath() + "/" + fileName;
......@@ -791,7 +790,6 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
if (mUploadMessage == null) {
return;
}
mChatWebView.post(new Runnable() {
@Override
public void run() {
......@@ -806,8 +804,6 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
final String filePath = cursor.getString(cursor.getColumnIndex("_data"));
cursor.close();
Runnable r = new Runnable() {
@Override
public void run() {
......@@ -1581,6 +1577,14 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
public int getAndroidVersion() {
return Build.VERSION.SDK_INT;
}
@JavascriptInterface
public void removeEncodedVideo(String filePath) {
File encodedVideo = new File(filePath);
if (encodedVideo.exists()) {
encodedVideo.delete();
}
}
}
/**
......
package jp.agentec.abook.abv.ui.home.helper;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.media.MediaCodec;
import android.media.MediaCodecInfo;
......@@ -11,7 +9,6 @@ import android.media.MediaExtractor;
import android.media.MediaFormat;
import android.media.MediaMetadataRetriever;
import android.media.MediaMuxer;
import android.util.Log;
import android.view.Surface;
import java.io.File;
......
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