snowplow/snowplow-javascript-tracker

View on GitHub
plugins/browser-plugin-media-tracking/src/buildMediaEvent.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function getHTMLMediaElementEntities has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function getHTMLMediaElementEntities(el: HTMLAudioElement | HTMLVideoElement, conf: TrackingOptions): MediaEntities {
  // In cases where the media does not have explicit id, we use the container id passed from the configuration.
  const htmlId = el.id || conf.id;
  const data: MediaElement = {
    htmlId,
Severity: Minor
Found in plugins/browser-plugin-media-tracking/src/buildMediaEvent.ts - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status