Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Customize YouTube Embed Player ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 113
    Comment on it

    Hello Readers

    The below post show the customization of youtube embed player by using some youtube defined parameters.

    Now a days most of the developer use the embed iframe tag for displaying the videos because this improves the projects playback experience.

    So, below are some predefined parameters that can be used as a query string into the embed url with iframe tag in php.

    1. autoplay: Using this you can automatically play video.

    By setting autoplay = 1 (automatically plays the video).

    By default the value of autoplay is zero (autoplay=0).

    Example:

    <iframe src="https://www.youtube.com/embed/HIsKF943vTk?autoplay=1" frameborder="0" allowfullscreen width="570" height="315" ></iframe>
    

    1. rel:
    rel means (related video) using this parameter you can stop showing the related videos, when the initial video ends.

    By default use 0 and 1(default).

    Example:

    <iframe src="https://www.youtube.com/embed/HIsKF943vTk?rel=0" frameborder="0" allowfullscreen width="570" height="315" ></iframe>
    

    1. showinfo:
    showinfo parameter show the video information like the title and uploader information. Here, by setting 0 or 1 will display information or not.

    1-> it displays information like the video title and uploader(Before the video starts displaying). 0-> will not display any info until the video is started.

    Example:

    <iframe src="https://www.youtube.com/embed/HIsKF943vTk?showinfo=0" frameborder="0" allowfullscreen width="570" height="315" ></iframe>
    

    1. controls:
    By setting this parameter 0, 1, and 2.

    By default use the controls = 1.

    0->By setting (controls=0) flash player loads immediately and controls are not displayed.
    1->By setting (controls=1) flash player and the controls display immediately(default).
    2->By setting (controls=2) controls are displayed and flash player loads once the user initiates the video.

    Example:

    <iframe src="https://www.youtube.com/embed/HIsKF943vTk?controls=0" frameborder="0" allowfullscreen width="570" height="315" ></iframe>
    

    1. end:
    end parameter specify the time in seconds, when to stop playing the video from the start of the video (use the time always from the start of the video).

    Example:

    <iframe src="https://www.youtube.com/embed/HIsKF943vTk?end=10" frameborder="0" allowfullscreen width="570" height="315" ></iframe>
    

    1. fs - full screen:
    use this parameter by setting 0 and 1.

    By default use the fs = 1.

    0->By setting (fs = 0) will not show the fullscreen button on the player.
    1->By seting (fs = 1) will show the fullscreen button(default).

    Example:

    <iframe src="https://www.youtube.com/embed/HIsKF943vTk?fs=0" frameborder="0" allowfullscreen width="570" height="315" ></iframe>
    

    1. start:
    Start specify the time in seconds, when to start playing the video from the start of the video (always from the start of the video).

    Example:

    <iframe src="https://www.youtube.com/embed/HIsKF943vTk?start=10" frameborder="0" allowfullscreen width="570" height="315" ></iframe>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: