Frequently Asked Question
Once your camera is installed and online, you will need to place a line of HTML code on your website; this is how your website will display your live stream. We use an iFrame as opposed to directly embedding the player on your website so that any changes made to your stream's look and feel will be dynamically updated on your website, meaning that you will not need to re-add the code.
- You must have the iFrame embed code. This will be emailed to you by your HDOnTap Account Representative. You can also retrieve it from the HDOnTap Portal at any time by following the instructions below.
Embed codes are available as either Static or Responsive. Static Embeds maintain a fixed size regardless of the size of the browser window, while Responsive Embeds will scale with the page.
Static Embed Code will be similar to:
<iframe width=”640” height=”360” src="https://portal.hdontap.com/s/embed?stream=streamname" frameborder="0" allowfullscreen="true" allow="autoplay; fullscreen"></iframe>
Responsive Embed Code will be similar to:
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
<iframe width="100%" height="100%" src="https://portal.hdontap.com/s/embed?stream=streamname&ratio=16:9&fluid=true" frameborder="0" allowfullscreen="true" allow="autoplay; fullscreen" style="height: 100%; width: 100%; position:absolute"></iframe>
- For static embeds, you will need to know the width and height you would like the player to be. Use our Player Sizing Tool to preview the player size and generate the proper width and height dimensions.
- You can customize for your player (logo overlay, auto-start, etc.) by logging into the HDOnTap Portal (optional). Click here for more detailed instructions.
Retrieving Your Embed Code From the Portal
- You must have your Portal login.
Contact your Customer Administrator or HDOnTap Support if you need assistance with your Portal credentials.
- Log into the HDOnTap Portal and navigate to Streaming > Embed Configs:
- Click the Embed ID for the embed you would like to add to your website:
- Click the radio button for the type of embed you would like (Static or Responsive):
- Copy the iFrame embed code.
Tip: Copy the code by clicking on the code or the copy icon . You can also highlight the text and press Ctrl+C (PC) or ⌘+C (Mac). Paste the code by pressing Ctrl+V (PC) or ⌘+V (Mac).
For Static Embed Codes:
For Responsive Embed Codes:
Adding Your Embed Code to Your Website
- Once you have the iFrame embed code, open your website in your preferred HTML Editor (for example, Adobe Dreamweaver).
Note: If you are using a CMS, you may need to access the source code where you would like to add the camera (contact your website administrator for further assistance).
- Paste the iFrame embed code in the desired location on your site.
Tip: Paste the code by pressing Ctrl+V (PC) or ⌘+V (Mac).
- For static embeds, change the width and height parameters as necessary.
For example, to make the player 1280 pixels wide by 720 pixels high, you would make the following edits:
<iframe width=”640” height=”360” src="https://portal.hdontap.com/s/embed?stream=streamname" frameborder="0" allowfullscreen></iframe>
<iframe width=”1280” height=”720” src="https://portal.hdontap.com/s/embed?stream=streamname" frameborder="0" allowfullscreen></iframe>
- Save the changes to your website. Your player should now be live on your site!