How To Change the Player Dimensions on Your Embed Code

By Rizaldy Samonte

4 Min Read

banner image featured
author avatar

Rizaldy Samonte

Zac is a part of the Dacast Support team and started working with the company in 2020. He has vast experience in customer service/engagement and live streaming support.

Table of Contents

     

    Do you need to change the video player’s dimensions to look perfect on your website? We’re going to show you how to change the player dimensions on your embed code in a few easy steps.

    If you already have a live channel and/or a video on your account, and you want to make display correctly, you just need to edit some codes to use. To do so please follow the step below.  

    Step 1: Choose the Content to Embed

    To get started, log in to your Dacast account. Find the video you want to embed and click the “Edit” button:

    Edit button Videos - Embed player tuto

    Step 2: Find and Copy the Embed Code

    Navigate to the “Sharing” section under the “General” tab and copy the “Embed Code” with the copy icon: 

    Sharing section General tab Dacast

    There are two types of embed codes available: JS (Javascript) and iframe.

    We recommend using the JS embed code because it’s more universally compatible with the full-screen feature. The JS embed code is also a requirement in order for the URL referral restriction feature to work (which restricts content based on the websites allowed to host it).

    Step 3: Copy and edit the code to your website

    Originally, the codes looks like this:

    Iframe: <iframe src=”https://iframe.dacast.com/live/1232b01xxxxxxx79b1710fc4e2/76243f91-d991-cf44-2bf0-b82231220f1f” width=100%” height=”100% frameborder=”0″ scrolling=”no” allow=”autoplay” allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe>

    JS: <script id=”4baf2cb0172aeaa31e8a79b1710fc4e2-live-xxxxxxx-d991-cf44-2bf0-b8ca42b20f1f” width=”100%” height=”100%src=”https://player.dacast.com/js/player.js?contentId=4baf2cb0172aeaa31e8a79b1710fc4e2-live-76243f91-d991-cf44-2bf0-b8ca42b20f1f”  class=”dacast-video”></script>

    Note: You can modify these values to set the video player size to a size more appropriate for your website by removing the “%” sign and replacing the values on your preferred size as shown below. 

    Iframe: <iframe src=”https://iframe.dacast.com/live/1232b01xxxxxxx79b1710fc4e2/76243f91-d991-cf44-2bf0-b82231220f1f” width=“1920 height=”1080 frameborder=”0″ scrolling=”no” allow=”autoplay” allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe>

    JS: <script id=”4baf2cb0172aeaa31e8a79b1710fc4e2-live-xxxxxxx-d991-cf44-2bf0-b8ca42b20f1f” width=“1920” height=”1080 src=”https://player.dacast.com/js/player.js?contentId=4baf2cb0172aeaa31e8a79b1710fc4e2-live-76243f91-d991-cf44-2bf0-b8ca42b20f1f”  class=”dacast-video”></script>

    Once everything is done, the code is now ready to be embedded on your webpage.

    If you have any questions about video embed or need help with this Dacast feature, feel free to contact us directly. Not yet a Dacast user, and interested in trying Dacast risk-free for 14 days? Sign up today to get started.

    get started for free

    Additional Resources:

     

    author avatar

    Rizaldy Samonte

    Zac is a part of the Dacast Support team and started working with the company in 2020. He has vast experience in customer service/engagement and live streaming support.

    Sign up for a 14-Day trial.

    Read Next

    article featured

    How To Use Dacast Browser-based Streaming (WebRTC)

    author avatar

    Samantha Lo

    11 Min Read

    article featured

    How to protect my VODs with DRM in Dacast?

    author avatar

    Dacast Team

    5 Min Read

    article featured

    How to Secure My Content With Signed Keys?

    author avatar

    Harmonie Duhamel

    6 Min Read