过去15个小时一直在努力寻找解决方法,但遗憾的是没有找到任何解决方法,将不胜感激。
Extra info: local video n audio works, even remote audio. But not remote video.
Stracktrace:
剧透!! stacktrace非常大!!!
05/27 22:56:36: Launching 'REmote_ctrl.app.Slave' on Wingtech 2014818.
$ adb shell am start -n "com.satyamedh.slave/com.satyamedh.slave.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 6721 on device 'wingtech-2014818-192.168.1.21:5555'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
休息https://pastebin.com/GvB64q5t
问我任何代码,我将编辑正文。
edit:两项活动之一:
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import android.Manifest;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.UUID;
import io.agora.rtc.Constants;
import io.agora.rtc.IRtcEngineEventHandler;
import io.agora.rtc.RtcEngine;
import io.agora.rtc.video.VideoCanvas;
import io.agora.rtc.video.VideoEncoderConfiguration;
....在https://pastebin.com/UDf2inMJ中休息
答案 0 :(得分:1)
更改UI时,需要确保在UI线程上进行更改。就您而言,您正在调用setupRemoteVideo()
方法。您需要确保在UI线程中执行此操作。这是您的操作方式:
@Override
public void onFirstRemoteVideoDecoded(final int uid, int width, int height, int elapsed) {
runOnUiThread(new Runnable() {
@Override
public void run() {
setupRemoteVideo(uid);
}
});
}
答案 1 :(得分:0)
我自己刚刚遇到了这个问题(在 iOS 中)。对我们来说,是我们用 our uid
设置了画布 uid,但它应该是远程用户的 uid
。如果您在第一次设置引擎时拥有它,您可以使用它,或者您可以等到获得 didJoinedOfUid
或 remoteVideoStateChangedOfUid
回调来设置它。