This is a migrated thread and some comments may be shown as answers.

Embedding youtube video in ToolTip

1 Answer 90 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Jugoslav
Top achievements
Rank 1
Jugoslav asked on 08 Jun 2012, 04:43 PM
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"
                            TargetControlID="TutorialTrigger"
                            RelativeTo="BrowserWindow"
                            Position="Center"
                            Modal="true"
                            RenderInPageRoot="true"
                            EnableShadow="false"
                            Skin="Windows7"
                            Animation="Resize"
                            AutoCloseDelay="0"
                            HideEvent="ManualClose"
                            ShowDelay="300"
                            ManualClose="true"
                            ManualCloseButtonText="Close" OnClientHide="OnClientHiding">
                <div style="padding: 10px;">              
                <iframe width="853" height="480" src="http://www.youtube.com/embed/xxxxxxxx" frameborder="0" allowfullscreen></iframe>
                </div>
            </telerik:RadToolTip>



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

Thank you so much

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 11 Jun 2012, 01:45 PM
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.
Tags
ToolTip
Asked by
Jugoslav
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or