Parameters
Name |
Type |
Description |
props |
object
|
Properties
Name |
Type |
Argument |
Default |
Description |
seasonId |
number
|
|
|
Season Id.
This prop requires:
|
seasonType |
string
|
|
|
Season Type. Valid values are: pre , reg , post .
This prop requires:
|
week |
number
|
|
|
Week of the season. The legal number depend on the value of seasonType .
-
if
seasonType is set to pre : valid values are 0 - 4
-
if
seasonType is set to reg : valid values are 1 - 17
-
if
seasonType is set to post : valid values are 1 - 5
This prop requires:
|
matchId |
string
|
|
|
Match Id.
|
teamId |
string
|
<optional>
|
|
Team Id. Selects team from team selection menu.
If it's not provided and seasonId, seasonType, week are used to render widget,
team selection menu would default to first team name in AFC conference and alphabetical order.
If it's not provided and matchId is used to render widget,
team selection menu would default to first team name in AFC conference and alphabetical order.
This prop requires either:
or:
|
offensivePlayerId |
string
|
<optional>
|
|
Offensive Player Id. Selects player from offensive player tab.
If it's not provided or playerId does not match any of the top 5 offensive players shown, it defaults to first player.
This prop requires: either seasonId seasonType week teamId
or
|
defensivePlayerId |
string
|
<optional>
|
|
Defensive Player Id. Selects player from defensive player tab.
If it's not provided or playerId does not match any of the top 5 defensive players shown, it defaults to first player.
This prop requires: either seasonId seasonType week teamId
or
|
timeFrame |
string
|
<optional>
|
|
Selects time frame view. Valid values are game and season .
This prop requires: either
or
|
disableTeamMenu |
bool
|
<optional>
|
false
|
When set to true , disables the team selection menu.
This prop requires: either seasonId seasonType week teamId
or
|
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 ).
|
onTrack |
function
|
<optional>
|
|
Function/event handler, see Widgets.onTrack .
|
|
Examples
HTML/Declarative
<div id="sr-widget" data-sr-widget="nfl.team.numberofplaysgame" data-sr-season-id="2016" data-sr-season-type="reg" data-sr-week="5"></div>
<script type="application/javascript" src="https://widgets.media.sportradar.com/sportradar/widgetloader" 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/sportradar/widgetloader","USW", {
language: 'en'
});
USW('addWidget', '#sr-widget', 'nfl.team.numberofplaysgame', {matchId: 'sd:match:3be53f93-f621-4a62-b0ce-9c44a9a55842'});
</script>
<div id="sr-widget"></div>