Exemple #1
0
        // Just to record the state transitions in the console.
        /// <summary>
        /// // Monitor main changes to participant properties
        /// (including local participant) such as active media types and conferencing role changes
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void Conversation_ParticipantPropertiesChanged(object sender, ParticipantPropertiesChangedEventArgs e)
        {
            Conversation conv = sender as Conversation;

            NonBlockingConsole.WriteLine(
                "{0} is notified of Conversation participant property change for user: {1}. Role:{2}",
                conv.LocalParticipant.UserAtHost,
                e.Participant.UserAtHost,
                e.Properties.Role.ToString());

            NonBlockingConsole.WriteLine("");

            Message m = new Message("Conversation Participant Properties changed. Properties changed: " + e.ChangedPropertyNames.ToArray <String>().ToString()
                                    + ". Participant Property Values: " + e.Properties.ToString() + ".",
                                    e.Participant.DisplayName, e.Participant.UserAtHost, e.Participant.Uri,
                                    MessageType.ConversationInfo, conv.Id, MessageDirection.Incoming);

            _transcriptRecorder.OnMessageReceived(m);
        }
        // Just to record the state transitions in the console.
        /// <summary>
        /// // Monitor main changes to participant properties
        /// (including local participant) such as active media types and conferencing role changes
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void Conversation_ParticipantPropertiesChanged(object sender, ParticipantPropertiesChangedEventArgs e)
        {
            Conversation conv = sender as Conversation;
            
            NonBlockingConsole.WriteLine(
                "{0} is notified of Conversation participant property change for user: {1}. Role:{2}",
                conv.LocalParticipant.UserAtHost,
                e.Participant.UserAtHost,
                e.Properties.Role.ToString());

            NonBlockingConsole.WriteLine("");

            Message m = new Message("Conversation Participant Properties changed. Properties changed: " + e.ChangedPropertyNames.ToArray<String>().ToString()
                + ". Participant Property Values: " + e.Properties.ToString() + ".",
                e.Participant.DisplayName, e.Participant.UserAtHost, e.Participant.Uri,
                MessageType.ConversationInfo, conv.Id, MessageDirection.Incoming);
            _transcriptRecorder.OnMessageReceived(m);
        }