Ejemplo n.º 1
0
        /// <inheritdoc />
        public void Load()
        {
            // by default, we always add the collector as a logging source
            collector            = new AnalyticsCollector(AnalyticsConfig);
            collector.Dispatcher = Dispatcher;
            // add session specific data
            AddAdditionalData(SessionData);
            LoggingService.Current.LoggingSources.Add(collector);

            // initialize the collector. The AnalyticsCollector relies on other objects to pass it info.
            playerMonitor = new MediaPlayerAdapter(MediaPlayer);
            AddAdditionalData(MediaData);
            collector.Attach(playerMonitor, AdaptiveMonitor, EnvironmentMonitor, EdgeServerMonitor);
        }
Ejemplo n.º 2
0
        /// <inheritdoc />
        public void Update(IMediaSource mediaSource)
        {
            if (collector.IsAttached)
            {
                collector.Detach();
                // remove media specific data
                RemoveAdditionalData(MediaData);
                MediaData = null;
            }

            if (mediaSource != null)
            {
                // add media specific data
                MediaData = Analytics.GetAdditionalData(mediaSource as DependencyObject);
                AddAdditionalData(MediaData);
                collector.Attach(playerMonitor, AdaptiveMonitor, EnvironmentMonitor, EdgeServerMonitor);
            }
        }
        /// <inheritdoc /> 
        public void Load()
        {
            // by default, we always add the collector as a logging source
            collector = new AnalyticsCollector(AnalyticsConfig);
            collector.Dispatcher = Dispatcher;
            // add session specific data
            AddAdditionalData(SessionData);
            LoggingService.Current.LoggingSources.Add(collector);

            // initialize the collector. The AnalyticsCollector relies on other objects to pass it info.
            playerMonitor = new MediaPlayerAdapter(MediaPlayer);
            AddAdditionalData(MediaData);
            collector.Attach(playerMonitor, AdaptiveMonitor, EnvironmentMonitor, EdgeServerMonitor);
        }