开发者

How can I set a video call to start in full screen programmatically? (Lync SDK)

I am trying to find a way to start my video conferencing in full screen view, I'm writing a WPF application using Lync SDK.

I've been looking over Lync SDK and practicing the examples on MSDN for a week now, but I did not see a property or a method to set the view to full screen in video call. Intellisense didn't helped me either.

So how can I set the video view in full screen? Also should I do it after I dock it?

Here is the code I use for calling someone;

        Dictionary<AutomationModalitySettings, object> _ModalitySettings = 
            new Dictionary<AutomationModalitySettings, object>();

        List<string> inviteeList = new List<string>();
        inviteeList.Add("elise@contoso.com");

        IAsyncResult Iar = _automation.BeginStartConversation(
            AutomationModalities.Video
            , inviteeList
            , _ModalitySettings
            , callbackVideo
            , null);

        _automation.EndStartConversation(Iar);

And here is the docking method I call from my delegate on new conversation event (Both codes are just slightly edited codes from MSDN);

    private void DockTheConversation(string ConversationId)
    {
        _LyncModel.WindowPanelHandle(ConversationId, 
             myFormsHost.Child.Handle.ToInt32());
    }

I can access the ConversationManager, ConversationWindow, Conversation(the one that is being docked), LyncClient and Automation. But I couldn't found any related methods or properties in any.

ConversationWindow.IsFullScreen property is readonly so that doesn't work either. And I don't know how can I edit;

Microsoft.Lync.Model.Conversation.AudioVideo.VideoWindow.FullScreenMode
Microsoft.Lync.Model.Conversation.AudioVideo.VideoWindow.WindowState

properties, or whether if they would work or not.

I'm already running my WPF application on full screen (WindowState, WindowStyle) but I also want the hosted Lync ConversationWindow to fill the screen, like when开发者_如何学编程 you push the button on the top right.

Any help is appreciated! Thanks!


I'm pretty sure you won't be able to do this using the Lync SDK. If you were running your app with Lync in UI suppressed mode, you could get access to the underlying VideoWindow so you would be free to place it anywhere on the screen, but that only works in UI supressed mode.

I'm thinking that it would probably be possible using Win32 calls. You should be able to determine the inividual windows that make up the conversation window, find the Video window and then use SetParent to remove this from the parent conversation window. You could then use e.g the Win32 ShowWindow to maximise the window.

I've not tried this, but i'm fairly sure it would work given the right Win32 calls. If you're not familiar with Win32, then PInvoke.net is a great Win32 reference, and might be a good place to start.


If you want to create full screen, You should write property changed of conversation window as the following code:

InputSimulator.SimulateKeyPress(VirtualKeyCode.F5);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜