2

SDK for Lync 2013 をダウンロードしましたが、 にあるコード サンプルに問題がありますAudioVideoConversation.csproj。このプロジェクトは、Lync API を介したオーディオ/ビデオ会話の使用を実証することになっています。サンプル アプリケーションでビデオ部分が機能しません。問題はこの方法にあります:

    /// <summary>
    /// Called when the video state changes.
    /// 
    /// Will show Incoming/Outgoing video based on the channel state.
    /// </summary>
    void videoChannel_StateChanged(object sender, ChannelStateChangedEventArgs e)
    {
        //posts the execution into the UI thread
        this.BeginInvoke(new MethodInvoker(delegate()
        {
            //updates the status bar with the video channel state
            toolStripStatusLabelVideoChannel.Text = e.NewState.ToString();


            //*****************************************************************************************
            //                              Video Content
            //
            // The video content is only available when the Lync client is running in UISuppressionMode.
            //
            // The video content is not directly accessible as a stream. It's rather available through
            // a video window that can de drawn in any panel or window.
            //
            // The outgoing video is accessible from videoChannel.CaptureVideoWindow
            // The window will be available when the video channel state is either Send or SendReceive.
            // 
            // The incoming video is accessible from videoChannel.RenderVideoWindow
            // The window will be available when the video channel state is either Receive or SendReceive.
            //
            //*****************************************************************************************

            //if the outgoing video is now active, show the video (which is only available in UI Suppression Mode)
            if ((e.NewState == ChannelState.Send 
                || e.NewState == ChannelState.SendReceive) && videoChannel.CaptureVideoWindow != null)
            {
                //presents the video in the panel
                ShowVideo(panelOutgoingVideo, videoChannel.CaptureVideoWindow);
            }

            //if the incoming video is now active, show the video (which is only available in UI Suppression Mode)
            if ((e.NewState == ChannelState.Receive 
                || e.NewState == ChannelState.SendReceive) && videoChannel.RenderVideoWindow != null)
            {
                //presents the video in the panel
                ShowVideo(panelIncomingVideo, videoChannel.RenderVideoWindow);
            }

        }));
    }

変数videoChannel.CaptureVideoWindowとは常に null です (この質問とは異なり、変数は null ではないvideoChannel.RenderVideoWindowことに注意してください)。 videoChannel

あなたが知っておくべきいくつかのこと:

  1. UI 抑制モードで Lync を実行しています (HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Lync の場所にレジストリ キーUISuppressionMode[DWORD] を 1 として追加することで達成されます)。
  2. サンプルのオーディオ部分は完璧に機能します
  3. サンプルは実際にビデオ ストリームをリモート パーティに正常に送信しています
  4. 会話の設定が完了すると、次のようにe.NewState == ChannelState.SendReceive評価されますtrue
  5. Visual Studio 2012 と Microsoft Lync 2013 で作業しています
4

1 に答える 1