Embedding youtube video in ToolTip

2 posts, 0 answers
  1. Jugoslav
    Jugoslav avatar
    74 posts
    Member since:
    Mar 2011

    Posted 08 Jun 2012 Link to this post

    I have a youtube video insdie the RadToolTip.  When I close the tooltip, you can still hear the audio in the background.  When I mouse back over the tooltip, the video is still playing.  How do I essentially destroy the tooltip?

    Please show an example of how to pause or stop youtube video embedded into tooltip using Youtube API and JS.

    <telerik:RadToolTip ID="VideoToolTip" runat="server"
                                ManualCloseButtonText="Close" OnClientHide="OnClientHiding">
                    <div style="padding: 10px;">              
                    <iframe width="853" height="480" src="http://www.youtube.com/embed/xxxxxxxx" frameborder="0" allowfullscreen></iframe>

    I need the On Client Hiding function to gets the reference of the player and eventually stops the video.

    Thank you so much
  2. Marin Bratanov
    Marin Bratanov avatar
    5913 posts

    Posted 11 Jun 2012 Link to this post

    Hi Jugoslav,

    The RadToolTIp is only hidden via CSS so that it can be shown again if need be. The YouTube JS API is not part of our controls and is not related to them in any way. You can access the object via JavaScript like you would any other element. The first argument the OnClientHide handler receives is the RadToolTip instance and the get_popupElement() method from its Client-side API can be useful in a jQuery selector wtih a context to get your object that is a child of the popup of the tooltip. You may also find useful their online embedding demo.

    Kind regards,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top