jacobbo / WebEye

WebEye is a collection of .NET controls.
190 stars 132 forks source link

If i create the control dinamically it stays blank #88

Open Szanesz opened 3 years ago

Szanesz commented 3 years ago

Hello!

In WPF (vb.net) if i create the control in design mode it loads the stream but in few hours i run into the TMP error (i wrote this issue too in the other issue chat) So i fugured out that i create the control dynamically, from code.. but in this way it stays white at load. What do i miss? thanks for the help:

SPlayer1 = New StreamPlayerControl
    SPlayer1.InitializeComponent()
    SPlayer1.Height = 166
    SPlayer1.Width = 263
    canvas_STREAMPLAYERPLACEHOLDER1.Children.Clear()
    canvas_STREAMPLAYERPLACEHOLDER1.Children.Add(SPlayer1)
    SPlayer1.StartPlay(New Uri("rtsp://admin:admin@192.168.1.228:554/11")) 
    AddHandler SPlayer1.StreamStopped, AddressOf SPLAYER1Failed

Thanks Peter

Szanesz commented 3 years ago

I found a solution.. if i do the startplay with a little delay in a separate sub, it starts :)