Parameters
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
jwt |
string |
<required> |
||
channelId |
string |
<required> |
Id of channel to open |
|
matchId |
number | Sportradar match id, if provided and match is covered by Sportradar it will enable match events. |
||
onAction |
function | Function/action handler. Is executed when a specific action occurs. Example:
Click on Copy Bet executes onItemClick function with |
||
isRelativeTimeFormat |
bool | true | Switch between regular timestamp of posted message (13:56) and relative time format (4m ago) for chat bubbles. Messages under 1min have the "now" timestamp. |
|
shareNewBetButtonPosition |
'top' | 'bottom' | 'top' | Change 'Share a new bet' button position with 'top' and 'bottom' values. |
Example
#1
```html
<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'
});
// Virtual Stadium Chat Widget
SIR('addWidget', '.sr-vs-widget', 'virtualStadium.chat', {matchId: {MATCH_ID}, channelId: "{CHANNEL_ID}", jwt: "{JWT}"});
</script>
<div class="vs-wrapper">
<div class="sr-vs-widget"></div>
</div>