Ejemplo n.º 1
0
        private void PlayStream(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(playSreamId.Text))
            {
                throw new Exception("playSreamID should not be empty!");
            }
            ZegoCanvas playCanvas = new ZegoCanvas();

            playCanvas.view     = pictureBox2.Handle;
            playCanvas.viewMode = ZegoViewMode.AspectFill;//设置有效
            engine.StartPlayingStream(playSreamId.Text, playCanvas);
        }
Ejemplo n.º 2
0
        private void PublishStream(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(publishSreamID.Text))
            {
                throw new Exception("publishSreamID should not be empty!");
            }
            ZegoCanvas preViewCanvas = new ZegoCanvas();

            preViewCanvas.view     = pictureBox1.Handle;
            preViewCanvas.viewMode = ZegoViewMode.Fit;//设置有效
            engine.StartPreview(preViewCanvas);
            engine.StartPublishingStream(publishSreamID.Text);
        }