You must Sign In to post a response.
  • Category: ASP.NET

    Dynamic video - Video with counter and skip button


    For the video panel, I want to display the video (hosted in YouTube), counter and skip button (same like YouTube feature), and when a user clicks on skip or the video ends, the video panel will refresh and display the actual/another YouTube video. How I can achieve it?

  • #767951

    If you want to play video's - Iframe play keyrole to play the video, if you want to play the youtube video then you have to pass the appropriate youtube URL in the src tag of javascript, like below

    $get("video").src = "//" + url

    for more details refer below link.

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #767955

    I hope you are expecting YouTube videos inside your application along with next button which will change the video also,
    Before that we need to start with initial step that is adding Iframe in your application.

    <iframe src=""
    width="550" height="315" frameborder="0" allowfullscreen></iframe>

    Now Load the YouTube Api in Javascript like,

    var tag = document.CreateElement('script');
    tag.src = "//";
    var ScriptTag = document.getElementByTagName('script');
    ScriptTag.parentNode.insertBefore(tag, ScriptTag);

    Create a global Function something like youTubeApi()
    Then create a Player object which the video gone run and then call back event.

    We can also make Vimeo with same Iframe event using froogaloop Script Library.


  • #767963
    Hi Manigandan.

    Facing error: Uncaught SyntaxError: missing ) after argument list

    Please let me know whats wrong in below code,

    var tag = document.createElement('script');
    tag.src = "";
    var ScriptTag = document.getElementsByTagName('script')[0];

    ScriptTag.parentNode.insertBefore(tag, ScriptTag);

    var player;
    function onYouTubeIframeAPIReady() {

    player = new YT.Player('player', {
    height: '390',
    width: '640',
    videoId: 'video code',
    events: {
    'onReady': onPlayerReady
    function onPlayerReady(event) { ['video code'],index:1,startSeconds:0,suggestedQuality:"large"):Void
    <div id="player"></div>

    Thanks in Advance....

  • Sign In to post your comments