Button Settings
Use branding namespace avStreamToggle for button related widget props:
| Name | Type | Description |
|---|---|---|
| icons | object |
Apply custom icons to button.
|
| useClientTheming | boolean |
Disables srt classes and applies .srct-classes for custom styling.List of applied classes is available in CSS Selectors section. |
CSS Selectors
When useClientTheming setting is enabled (set to true), base styling is removed and CSS classes for custom styling are applied to button element. These are available css classes:
| CSS Class | Description |
|---|---|
| .srct-av-stream-button | Styles applied to the av stream toggle button wrapper element. |
| .srct-av-stream-button__icon | Styles applied to the av stream toggle button icon element. |
List of Default Icons
| Icon ID | Matching Icon |
|---|---|
| pitchDarts | |
| pitchAmericanFootball | |
| pitchBadminton | |
| pitchBaseball | |
| pitchBasketball | |
| pitchBeachVolleyball | |
| pitchFutsal | |
| pitchHandball | |
| pitchHockey | |
| pitchRugby | |
| pitchSnooker | |
| pitchTableTennis | |
| pitchTennis | |
| pitchVolleyball | |
| pitchSquash | |
| pitchSoccer | |
| avStream |
Example
Following is the example of how a widget Match LMTPlus with LCO stream toggle button looks like:
| Pitch view | Stream view |
|---|---|
|
|
Code
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Match LMTPlus LCO stream toggle button Configuration</title>
<style>
.sr-widgets {
max-width: 620px;
width: 100%;
}
/* button wrapper */
.sr-bb .srct-av-stream-button {
right: 10px;
}
/* button icon */
.sr-bb .srct-av-stream-button__icon {
fill: red;
}
</style>
</head>
<body>
<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', {
theme: false,
language: 'en'
});
SIR('addWidget', '.sr-widget-1', 'match.lmtPlus', {
matchId: match_id_here,
branding: {
namespaces: {
avStreamToggle: {
tabs: {
icons: {
"avStream": "https://widgets.sir.sportradar.com/docs/img/logo.svg"
},
useClientTheming: true
}
}
}
}
});
</script>
<div class="sr-widgets">
<div class="sr-widget sr-widget-1"></div>
</div>
</body>
</html>