mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-19 18:55:05 +01:00
Fix WebRTC
This commit is contained in:
parent
088a21e4b9
commit
27eaf02485
@ -166,7 +166,7 @@ dependencies {
|
||||
implementation 'com.github.bumptech.glide:glide:4.8.0'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
|
||||
implementation 'com.github.bumptech.glide:okhttp3-integration:4.8.0@aar'
|
||||
implementation 'org.webrtc:google-webrtc:1.0.24896'
|
||||
implementation 'org.webrtc:google-webrtc:1.0.23295'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
|
||||
|
||||
implementation 'com.yarolegovich:lovely-dialog:1.1.0'
|
||||
|
@ -95,6 +95,7 @@ public class NextcloudTalkApplication extends MultiDexApplication implements Lif
|
||||
|
||||
|
||||
PeerConnectionFactory.initialize(PeerConnectionFactory.InitializationOptions.builder(this)
|
||||
.setEnableVideoHwAcceleration(MagicWebRTCUtils.shouldEnableVideoHardwareAcceleration())
|
||||
.createInitializationOptions());
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
Log.w(TAG, e);
|
||||
|
@ -330,6 +330,9 @@ public class CallController extends BaseController {
|
||||
PeerConnectionFactory.Options options = new PeerConnectionFactory.Options();
|
||||
peerConnectionFactory = PeerConnectionFactory.builder().createPeerConnectionFactory();
|
||||
|
||||
peerConnectionFactory.setVideoHwAccelerationOptions(rootEglBase.getEglBaseContext(),
|
||||
rootEglBase.getEglBaseContext());
|
||||
|
||||
//Create MediaConstraints - Will be useful for specifying video and audio constraints.
|
||||
audioConstraints = new MediaConstraints();
|
||||
videoConstraints = new MediaConstraints();
|
||||
@ -530,7 +533,7 @@ public class CallController extends BaseController {
|
||||
|
||||
//Create a VideoSource instance
|
||||
if (videoCapturer != null) {
|
||||
videoSource = peerConnectionFactory.createVideoSource(false);
|
||||
videoSource = peerConnectionFactory.createVideoSource(videoCapturer);
|
||||
localVideoTrack = peerConnectionFactory.createVideoTrack("NCv0", videoSource);
|
||||
localMediaStream.addTrack(localVideoTrack);
|
||||
localVideoTrack.setEnabled(false);
|
||||
|
Loading…
Reference in New Issue
Block a user