/** * Implements OperationSetVideoTelephony#setLocalVideoAllowed(Call, boolean). Modifies the local * media setup to reflect the requested setting for the streaming of the local video and then * re-invites all CallPeers to re-negotiate the modified media setup. * * @param call the call where we'd like to allow sending local video. * @param allowed <tt>true</tt> if local video transmission is allowed and <tt>false</tt> * otherwise. * @throws OperationFailedException if video initialization fails. */ @Override public void setLocalVideoAllowed(Call call, boolean allowed) throws OperationFailedException { ((CallJabberImpl) call).setLocalVideoAllowed(allowed, MediaUseCase.DESKTOP); size = (((VideoMediaFormat) ((CallJabberImpl) call).getDefaultDevice(MediaType.VIDEO).getFormat()) .getSize()); ((CallJabberImpl) call).modifyVideoContent(allowed); }
/** * Check if the remote part supports Jingle video. * * @param calleeAddress Contact address * @param videoDevice <tt>MediaDevice</tt> used * @return true if contact support Jingle video, false otherwise * @throws OperationFailedException with the corresponding code if we fail to create the video * call. */ protected Call createOutgoingVideoCall(String calleeAddress, MediaDevice videoDevice) throws OperationFailedException { if (parentProvider.getConnection() == null) { throw new OperationFailedException( "Failed to create OutgoingJingleSession.\n" + "we don't have a valid XMPPConnection.", OperationFailedException.INTERNAL_ERROR); } CallJabberImpl call = new CallJabberImpl(basicTelephony); /* enable video */ call.setVideoDevice(videoDevice); call.setLocalVideoAllowed(true, getMediaUseCase()); return basicTelephony.createOutgoingCall(call, calleeAddress); }