как отключить публикацию видео в Андройд sdk

Max

Administrator
Staff member
Добрый день.
Необходимо передать null для videoConstraints (см пример Media Devices на GitHub):
Java:
    StreamOptions streamOptions = new StreamOptions(streamName);
    Constraints constraints = getConstraints();
    streamOptions.setConstraints(constraints);
    ...
    publishStream = session.createStream(streamOptions);
    ...
                                    
    @NonNull
    private Constraints getConstraints() {
        AudioConstraints audioConstraints = null;
        if (mSendAudio.isChecked()) {
            audioConstraints = new AudioConstraints();
            ...
        }
        VideoConstraints videoConstraints = null;
        if (mSendVideo.isChecked()) {
            videoConstraints = new VideoConstraints();
            ...
        }
        return new Constraints(audioConstraints, videoConstraints);
    }
 
Top