public VideoStreamingSession createLiveVideoSharingSession(ContactId contact,IVideoPlayer player,long timestamp) throws CoreException {
  if (sLogger.isActivated()) {
    sLogger.info("Initiate a live video sharing session");
  }
  if (!isCallConnectedWith(contact)) {
    if (sLogger.isActivated()) {
      sLogger.debug("Rich call not established: cancel the initiation");
    }
    throw new CoreException("Call not established");
  }
  boolean rejectInvitation=false;
  if (isCurrentlyVideoSharingBiDirectional()) {
    if (sLogger.isActivated()) {
      sLogger.debug("Max sessions reached");
    }
    rejectInvitation=true;
  }
 else   if (isCurrentlyVideoSharingUniDirectional()) {
    VideoStreamingSession currentSession=getUnidirectionalVideoSharingSession();
    if (isSessionOriginating(currentSession)) {
      if (sLogger.isActivated()) {
        sLogger.debug("Max originating sessions reached");
      }
      rejectInvitation=true;
    }
 else     if (contact == null || !contact.equals(currentSession.getRemoteContact())) {
      if (sLogger.isActivated()) {
        sLogger.debug("Only bidirectional session with same contact authorized");
      }
      rejectInvitation=true;
    }
  }
  if (rejectInvitation) {
    if (sLogger.isActivated()) {
      sLogger.debug("The max number of sharing sessions is achieved: cancel the initiation");
    }
    throw new CoreException("Max content sharing sessions achieved");
  }
  return new OriginatingVideoStreamingSession(this,player,ContentManager.createGenericLiveVideoContent(),contact,mRcsSettings,timestamp,mContactManager,mCapabilityService);
}

public VideoStreamingSession createLiveVideoSharingSession ( ContactId contact , IVideoPlayer player , long timestamp ) throws CoreException { if ( sLogger . isActivated ( ) ) { sLogger . info ( "Initiate a live video sharing session" ) ; } if ( ! isCallConnectedWith ( contact ) ) { if ( sLogger . isActivated ( ) ) { sLogger . debug ( "Rich call not established: cancel the initiation" ) ; } throw new CoreException ( "Call not established" ) ; } boolean rejectInvitation = false ; if ( isCurrentlyVideoSharingBiDirectional ( ) ) { if ( sLogger . isActivated ( ) ) { sLogger . debug ( "Max sessions reached" ) ; } rejectInvitation = true ; } else if ( isCurrentlyVideoSharingUniDirectional ( ) ) { VideoStreamingSession currentSession = getUnidirectionalVideoSharingSession ( ) ; if ( isSessionOriginating ( currentSession ) ) { if ( sLogger . isActivated ( ) ) { sLogger . debug ( "Max originating sessions reached" ) ; } rejectInvitation = true ; } else if ( contact == null || ! contact . equals ( currentSession . getRemoteContact ( ) ) ) { if ( sLogger . isActivated ( ) ) { sLogger . debug ( "Only bidirectional session with same contact authorized" ) ; } rejectInvitation = true ; } } if ( rejectInvitation ) { if ( sLogger . isActivated ( ) ) { sLogger . debug ( "The max number of sharing sessions is achieved: cancel the initiation" ) ; } throw new CoreException ( "Max content sharing sessions achieved" ) ; } return new OriginatingVideoStreamingSession ( this , player , ContentManager . createGenericLiveVideoContent ( ) , contact , mRcsSettings , timestamp , mContactManager , mCapabilityService ) ; }
initiate a live video sharing session
