Welcome to the SportBuff iframe solution! This guide introduces the setup of the SportBuff SDK using an iframe.
Note: The CLIENT_NAME will be provided by SportBuff during onboarding.
URL Parameter | Required | Type | Description |
---|---|---|---|
clientName |
true | string | The client name to be used. |
streamId or sourceId |
false | string | Either the streamId or sourceId to match the current stream with backend-provided streams for event separation. |
pregameMode |
false | boolean | Sets the stream in pre-game mode. |
buffFrequency |
false | number | Sets the frequency (in seconds) for pre-game buffs display (default: 10 seconds). |
anonymousLogin |
false | boolean | Enables auto-login for users when set to true . |
userToken |
false | string | Automatically authenticates the user if provided. |
isVod |
false | boolean | Flag to indicate if the stream is LIVE (false ) or VOD (true ). Default is false . |
Note: The streamId is a unique UUID generated for each event in the SportBuff CMS. You can either use streamId or provide a custom identifier with sourceId. If no streamId or sourceId is specified, the newest LIVE stream in the CMS will be used by default. It is recommended to use sourceId for consistent connection.
Here’s an example iframe setup for embedding SportBuff:
<iframe
width="1000"
height="500"
src="<https://play.sportbuff.com/predict6?clientName={sportbuff}&sourceId={uniqueId}>"
></iframe>
Replace {sportbuff}
with your actual clientName
and {uniqueId}
with the desired sourceId
or streamId
.