Player Bridge
By configuring the player library provided by Saucelive, you can define pre-set actions such as coupon downloads and product clicks using message listeners. You can also define custom actions tailored to each client.
The basic configuration should be applied as shown below after the live player setup described above.
window.addEventListener('message',(e)=>{
if (typeof e.data === 'string') {
const jsonData = JSON.parse(e.data)
switch (jsonData.key) {
// Event Definition for Product Click
case 'sauceflexMoveProduct':
window.location.href = `${jsonData.params.linkUrl}`
break
//End of livestreaming
}
}
})
For details on how to define the payload for each switch case in response to messages from Saucelive, please refer to Payload Definition.
For detailed instructions on integrating the coupon feature, refer to Coupon Click Event (Coupon Integration Control).
For a guide on handling non-logged-in users attempting to access login-required features, refer to Login Event (Access Control for Login-Required Features).
Updated 14 days ago