Invitations API Documentation Reference

Last Updated 5th Apr 2023

The Player Embed Element

The player embed element allows you to view invitation responses in an iframe embedded element. The embed takes a receivable id as its input, and the rest is worked out inside the frame.

To get started paste the html below in your code. replace [id] int he src url to a receivable id

            
                
            
        

With iframes, it can be hard to make them responsive. You can use the code below to automatically have the frame resize using just a few lines of javascript

            
                let iframe_element = document.querySelector('iframe')

                windowResize(){
                    if(window.innerWidth [less than] 544){
                        iframe_element.width = event.target.innerWidth - 8
                        iframe_element.height = event.target.innerWidth / (16/9) + 240
                    }else{
                      iframe_element.width = 544
                      iframe_element.height = 556
                    }
                  },

                  windowResize()
            
        

Lastly, add an event listener on the window for the 'resize' event. Set the callback function as the windowResize() function above.

            
                window.addEventListener('resize', windowResize)