Virtual Dogs Kiron
UI - Visualization component
The Virtual Dogs Kiron visualization component is delivered as an iframe with a responsive interface.
Below URL provides an example as shown on Sportradar’s Virtual Sports Demonstrator:
https://{domain}/vdk/vdk/index?clientid={clientid}&lang={lang}&style={style}&oddType={oddType}clientid
required
Identifies you as a bookmaker in our system. The id will be provided to you by your technical account manager.
lang
optional
Specifies the display language in the visualization component(ISO 639-1 specification).
Most European language are already available and other can be added on demand
style
optional
If needed, your technical account manager will provide you with a style parameter. If not provided, the default style will be applied and there is no further action needed from your side.
oddType
optional
Specifies the odds display format. The parameter does not have impact on how odds are calculated and only triggers a simple conversion from decimal odds to the specified odds format. If this is not specified, the default odds format will be decimal.
Multi language support is available by optional language parameter in URL. Most common languages are already supported, others on demand.
Cross-origin communication between UI and parent iframe
We need to enable communication between the UI and market offer (e.g. switch the odds section to selected match day by mouse click at a match day button within the match day selector component).
Listening to postMessages
For Virtual Dogs Kiron, you have to setup an event listener for postMessages:
window.addEventListener("message", receiveMessage);messageTypecan be of the following:setHeightsvg:responseswitchEvents
messageData.typecould becompetitor(for jersey),form,ratingorlengthbehindwinnermessageDatashould contain alwaysrace(e.g:vdr:stage:3717087),competitor(e.g.:sr:competitor:456545) and sportvhk
switchEvents
This postMessage is called once after loading the page, each time a user clicks a race in the ‘Race Calendar’, as well as, when a race starts.
This function can be used to bring the race related odds to the users focus by scrolling the odds list to this position:
Sending postMessages
You can send postMessages to the iframe in order to retrieve a competitor's jockey jerseys, rating or form.
Messages to the iframe must be of messageType svg:request. Examples of such messages can be seen below.
Getting bib images
You can download bib images as Scalable Vector Graphic in order to embed it into your market offer:

You can do so by sending the following request via postMessage to the iframe.
Getting form
You can download the competitor's form as Scalable Vector Graphic in order to embed it into your market offer:

You can do so by sending the following request via postMessage to the iframe.
Getting rating
You can download the competitor's rating as Scalable Vector Graphic in order to embed it into your market offer:

You can do so by sending the following request via postMessage to the iframe.
Getting length behind winner
You can download a competitor's length behind winner as Scalable Vector Graphic in order to embed it into your market offer:

You can do so by sending the following request via postMessage to the iframe.
Last updated
Was this helpful?