public BufferingTimeMonitor(VideoPlayer player)
 {
     EventHandler<CustomEventArgs<PlaylistItem>> handler = null;
     EventHandler<CustomEventArgs<MediaPluginState>> handler2 = null;
     this._bufferEvents = new List<BufferEvent>();
     if (handler == null)
     {
         handler = (s, e) => this.Reset();
     }
     player.PlaylistItemChanged += handler;
     if (handler2 == null)
     {
         handler2 = delegate (object s, CustomEventArgs<MediaPluginState> e) {
             if (((MediaPluginState) e.Value) == MediaPluginState.Buffering)
             {
                 this.BufferingStarting();
             }
             else
             {
                 this.BufferingEnding();
             }
         };
     }
     player.PlayStateChanged += handler2;
 }
 public PlayerDiagnostics(PlayerViewModel playerViewModel, AssetViewerViewModel assetViewerViewModel, BaseShellViewModel shellViewModel, ISettingsService settingsService, ScriptBridge scriptBridge)
 {
     EventHandler<ViewAttachedEventArgs> handler = null;
     this._playerViewModel = playerViewModel;
     this._assetViewerViewModel = assetViewerViewModel;
     this._baseShellViewModel = shellViewModel;
     this._settingsService = settingsService;
     if (handler == null)
     {
         handler = delegate (object s, ViewAttachedEventArgs e) {
             this._bufferingTimeMonitor = new BufferingTimeMonitor(this._playerViewModel.Instance);
             this._videoPlayer = this._playerViewModel.Instance;
         };
     }
     this._playerViewModel.ViewAttached += handler;
     this._playerViewModel.PropertyChanged += new PropertyChangedEventHandler(this._playerViewModel_PropertyChanged);
 }
 public static void Initialize(VideoPlayer player)
 {
     _instance = new TextTimeline(player);
 }
 private TextTimeline(VideoPlayer player)
 {
     player.PlaybackPositionChanged += new EventHandler<CustomEventArgs<TimeSpan>>(this.player_PlaybackPositionChanged);
 }