ADLTest.CloudeoServiceConnectivityTest.testPublishScreen C# (CSharp) Method

testPublishScreen() private method

private testPublishScreen ( ) : void
return void
        public void testPublishScreen()
        {
            setupDevs();
            string scopeId = "c_sharp_test_room";
            ConnectionDescription connDescr = genDefConnDescr(scopeId);
            connDescr.autopublishAudio = false;
            connDescr.autopublishVideo = false;

            _service.connect(createVoidResponder(), connDescr);
            awaitVoidResult("connect", 10000);

            _service.getScreenCaptureSources(createScrSourcesResponder(), 160);
            List<ScreenCaptureSource> sources = awaitScrSourcesResult();

            MediaPublishOptions options = new MediaPublishOptions();
            options.windowId = sources[0].id;
            options.nativeWidth = 640;
            _service.publish(createVoidResponder(), scopeId, MediaType.SCREEN, options);
            awaitVoidResult("publish screen", 10000);

            Thread.Sleep(15000);
            _service.disconnect(createVoidResponder(), scopeId);
            awaitVoidResult("disconnect");
        }