Parameters
Name |
Type |
Description |
props |
object
|
Properties
Name |
Type |
Argument |
Default |
Description |
seasonId |
number
|
|
|
When provided, sets the selected year.
This prop will be ignored if matchId is set.
|
matchId |
string
|
|
|
When provided, overrides any seasonal props (seasonId , seasonType and week )
and sets them to the time of the given match.
Additionally, it changes input elements depending on the value of timeFrame :
-
if
timeFrame is set to game : sets the selected game,
-
if
timeFrame is set to week : sets the default opened (expanded) game
,
-
if
timeFrame is set to position : sets the selected team to the home team of the game.
|
seasonType |
string
|
<optional>
|
null
|
Sets the selected season type, possible values are pre , reg , post .
If this prop is null the season type of the currently active week of the specified seasonId will be used.
This prop will be ignored if matchId is set.
|
week |
number
|
<optional>
|
null
|
Sets the selected week number. 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
If this prop is null the season type of the currently active week of the specified seasonId will be used.
This prop will be ignored if matchId is set.
|
timeFrame |
string
|
<optional>
|
null
|
Sets time frame, possible values: game , position and week . If it is set to null then game will be selected
|
teamId |
string
|
<optional>
|
null
|
Sets the team id, the changed input depends on the value used for timeFrame :
timeFrame is set to position : sets the selected team in the team dropdown.
timeFrame is set to game : sets the selected game to the first game that team played during the given time period.
If the team didn't play during the selected seasonType the game dropdown will default to the first game played during that time.
timeFrame is set to week : the prop has no effect on the input elements.
This prop might be ignored if matchId is set, except if this specifies one of the two teams playing in that game.
|
position |
string
|
<optional>
|
null
|
Sets the selected position in the appropriate dropdown, which is only visible if timeFrame is set to position
possible values are:
quarterbacks
running_backs
receivers
defensive_backs
linebackers
defensive_linemen
offensive_linemen
kickers
punters
If this props is null the default selected value will be quarterbacks
|
enablePlayerSelect |
boolean
|
<optional>
|
false
|
Enables player selection. Interactive areas are:
- player image if
By Position is selected in the appropriate dropdown
- injury information rows if
By Week or By Game is selected in the appropriate dropdown
PlayerId is emitted on click or touch.
|
enableTeamSelect |
boolean
|
<optional>
|
false
|
Enables team selection. Interactive areas are:
- team dropdown if
By Game is selected in the appropriate dropdown
- team crest and name if
By Game is selected in the appropriate dropdown
- team crest and name on the accordion header if
By Week is selected in the appropriate dropdown
- player image (setting the team of the player) if
By Position is selected in the appropriate dropdown
- injury information rows (setting the team of the player) if
By Week or By Game is selected in the appropriate dropdown
TeamId is emitted on click or touch, except for dropdowns where changing the selection in the dropdown triggers emitting the id.
|
enableGameSelect |
boolean
|
<optional>
|
false
|
Enables game selection. Interactive areas are:
- game dropdown if
By Game is selected in the appropriate dropdown. MatchId is emitted on changing the selected item in the dropdown.
- accordion header if
By Week is selected in the appropriate dropdown. MatchId is emitted on click or touch. Note: other accordion headers will close on game select
|
onTrack |
function
|
<optional>
|
|
Function/event handler, see Widgets.onTrack
|
|
Examples
HTML/Declarative
<div id="sr-widget" data-sr-widget="nfl.season.injuryReport" data-sr-match-id="sd:match:2724b0ed-71b1-4c35-a977-087f4f9404f4"></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.season.injuryReport', {matchId: 'sd:match:2724b0ed-71b1-4c35-a977-087f4f9404f4'});
</script>
<div id="sr-widget"></div>