Widgets.us.match.nfl.PlayByPlay

Widget us.match.nfl.playByPlay brings drive summary information (e.g. play counts, start/end reason, 1st downs and more) as well as interactive display.

For the widget to render you need to provide matchId, other properties are optional.


new PlayByPlay(props)

Parameters
Name Type Description
props object
Properties
Name Type Argument Default Description
matchId string

Match Id.

disableWidgetHeader boolean <optional>
false

When set to true, hides widget header.

disableMatchHeader boolean <optional>
false

When set to true, hides match header.

collapseGameInformation boolean <optional>
true

When set to false, opens the game information section.

disableInnerScrolling boolean <optional>

When set to true, the inner fixed-height drives scroll area is disabled, the widget takes on the full height.

listOrder string <optional>

The order of quarters, drives, and plays in the list; valid values are:

  • 'default' is the default sort order: during a live match quarters, drives, and plays are listed in a descending order, otherwise in an ascending order,
  • 'desc' lists quarters, drives, and plays in a descending order,
  • 'descq' lists quarters in a descending order, and drives and plays in an ascending order,
  • 'asc' lists quarters, drives, and plays in an ascending order.

selectedQuarter number <optional>
null

The number of the quarter, when selecting a play with the triplet selectedQuarter, selectedDrive, selectedPlay. Can be one of [1, 2, 3, 4, 5], the 5th quarter is overtime. Defaults to the last quarter played.

selectedDrive number <optional>
null

The number of the drive, when selecting a play with the triplet selectedQuarter, selectedDrive, selectedPlay. Numbering starts at 1. Defaults to the last drive played.

selectedPlay number <optional>
null

The number of the play, when selecting a play with the triplet selectedQuarter, selectedDrive, selectedPlay. Numbering starts at 1. Defaults to the last play played.

filterQuarter number <optional>
null

When set, displays only drives of the specified quarter. Can be one of [null, 1, 2, 3, 4, 5]. The 5th quarter is overtime, null means no restriction. Defaults to null.

filterDrive number <optional>
null

Can be one of [null, scoring, team]. When scoring, displays only scoring drives; when team, displays only drives where the team set with filterDriveTeamId is in possession; null means no restriction. Defaults to null.

filterDriveTeamId number <optional>
null

Sets the team ID to use, when filterDrive is team.

useTeamColors boolean <optional>
null

Valid values are:

  • null (the default) = settings from the client configuration are used. If the client is configured to use team colors, then the theme can be overriden with the teamColorsTheme parameter.
  • true = team colors will be used, as specified with the teamColorsTheme parameter. If the teamColorsTheme is not specified and the client configuration does not specify a team colors theme, or if the teamColorsTheme contains an invalid theme name, then team colors will not be used.
  • false = team colors will not be used.
teamColorsTheme string <optional>
null

When set (and not disabled by useTeamColors), specifies the name of the formula to calculate team colors (e.g. mono-team-colors-light).

enableTeamSelect boolean <optional>
false

When set to true, enables team selection. Interactive areas are:

  • team name and crest in a match header,
  • team crests in the statistics sub-headers,
  • rows in the scoring table of the match header,
  • team crests in the driveList and on the pitch.
TeamId is emitted on click or touch.

onTrack function <optional>

Function/event handler, see Widgets.onTrack.

Examples

HTML/Declarative

<div class="sr-widget" data-sr-widget="us.match.nfl.playByPlay" data-sr-match-id="sd:match:2724b0ed-71b1-4c35-a977-087f4f9404f4"></div>
<script type="application/javascript" src="https://widgets.media.sportradar.com/uscommon/widgetloader" data-sr-language="en_us" async></script>

JS/Programmatic

<script>
    (function(a,b,c,d,e,f,g,h,i){a[e]||(i=a[e]=function(){(a[e].q=a[e].q||[]).push(arguments)},i.l=1*new Date,i.o=f,
    g=b.createElement(c),h=b.getElementsByTagName(c)[0],g.async=1,g.src=d,g.setAttribute("n",e),h.parentNode.insertBefore(g,h)
    )})(window,document,"script","https://widgets.media.sportradar.com/uscommon/widgetloader","USW", {
        language: 'en_us'
    });
    USW('addWidget', '#sr-widget', 'us.match.nfl.playByPlay', {matchId: 'sd:match:2724b0ed-71b1-4c35-a977-087f4f9404f4'});
</script>
<div id="sr-widget"></div>