1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
public partial class Window1 : Window
{
public DispatcherTimer update_infos= new DispatcherTimer();
public Window1()
{
InitializeComponent();
update_infos.Interval = TimeSpan.FromSeconds(1);
update_infos.Tick += new EventHandler(timer1);
update_infos.Start();
}
// Méthode du bouton play pour lire ( on réinitialise le contrôle au cas ou le flux ne se lit pas)
private void button2_Click(object sender, RoutedEventArgs e)
{
mediaElement1.Close();
mediaElement1.Source = new Uri("axrtsp://192.168.13.4/mpeg4/media.amp", UriKind.RelativeOrAbsolute);
mediaElement1.Play();
} |
Partager