Parameters
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
props |
object |
<required> |
||
matchId |
number |
<required> |
Match ID |
|
smallLayout |
string | vertical | Accepts 'horizontal' or 'vertical'. Determines the type of scoreboard shown in the small layout ( < 620px). |
|
disableWidgetHeader |
boolean | false | When set to |
|
disableMatchHeader |
boolean | false | When set to |
|
disableGoalscorers |
boolean | false | When set to |
|
expandedGoalScorers |
boolean | false | When set to |
|
disableMatchInfo |
boolean | false | When set to |
|
disableTeamColors |
boolean | false | Used for NFL, MLB, NHL and NBA in 'horizontal' layout. |
|
onItemClick |
function | Function/event handler. Emits |
||
onTrack |
function | Function/event handler, see Tracking options. |
Examples
HTML/Declarative
<div id="sr-widget" data-sr-widget="match.scoreboard" data-sr-match-id="26109428"></div>
<script type="application/javascript" src="https://widgets.sir.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.sir.sportradar.com/sportradar/widgetloader","SIR", {
language: 'en'
});
SIR('addWidget', '#sr-widget', 'match.scoreboard', {matchId: 26109428});
</script>
<div id="sr-widget"></div>
JS/Example of using Event Handler
<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.sir.sportradar.com/sportradar/widgetloader","SIR", {
language: 'en'
});
SIR('addWidget', '#sr-widget', 'match.scoreboard', {matchId: 26109428, onItemClick: function(type, obj){alert('teamId:' + obj.teamId + '\nplayerId: ' + obj.playerId);}});
</script>
<div id="sr-widget"></div>