spodlecki / videojs-event-tracking

Track events with VideoJS and keep an eye on performance metrics
MIT License
71 stars 16 forks source link

Added bufferingConfig to include scrub events while computing buffering metrics #10

Closed subhendusethi closed 4 years ago

subhendusethi commented 4 years ago

PR for the issue.

This issue adds a backwards compatible and optional configuration, to consider computation of buffering metrics when the user is scrubbing on the video player.

The configuration can be set manually by the user while initializing the eventTracking plugin:

player.eventTracking({
    bufferingConfig: {
      includeScrub: true
    }

Tested with/without the scrub config in both chrome and firefox. Buffering metrics are getting computed as per expected.

npm run test : SUCCESS