Esempio n. 1
0
 public void Player_Setup(string sciezka)
 {
     factory = new MediaPlayerFactory(true);
     player  = factory.CreatePlayer <IDiskPlayer>();
     player.Events.PlayerPositionChanged += new EventHandler <MediaPlayerPositionChanged>(Events_PlayerPositionChanged);
     player.Events.TimeChanged           += new EventHandler <MediaPlayerTimeChanged>(Events_TimeChanged);
     player.Events.MediaEnded            += new EventHandler(Events_MediaEnded);
     player.Events.PlayerStopped         += new EventHandler(Events_PlayerStopped);
     player.WindowHandle = PresentPanel.Handle;
     UISync.Init(this);
     med = factory.CreateMedia <IMediaFromFile>(sciezka);
     med.Events.DurationChanged += new EventHandler <MediaDurationChange>(Events_DurationChanged);
     med.Events.StateChanged    += new EventHandler <MediaStateChange>(Events_StateChanged);
     med.Events.ParsedChanged   += new EventHandler <MediaParseChange>(Events_ParsedChanged);
     player.Open(med);
     //  med.Parse(true);
 }