playing flv in radwindow

6 posts, 0 answers
  1. Jeff
    Jeff avatar
    38 posts
    Member since:
    Jan 2008

    Posted 05 Jan 2009 Link to this post

    We're launching a radwindow that then plays a flash video (.flv). It works well but when the window is closed the audio from the video continues to play until the page is changed. We're trying to narrow down whether it is a RadWindow, Explorer browser issue (doesn't happen in Firefox) or a flash related issue.

    You can view the issue by going to:
    https://www.gracieuniversity.com/LC/testcenter_view.aspx?c=63QJ4TGT7X&n=28&t=1
    and clicking on any of the links that say "watch demo" and then closing the radwindow while the video is playing. You'll notice that the audio continues to play.

    Is there a way to force the "x" out of a RadWindow to kill any elements that are playing in the window?

    thanks,
    Jeff
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 06 Jan 2009 Link to this post

    Hi Jeff,

    Try attaching OnClientClose event with RadWindow "OnClientClose" and use the following code in OnClientClose function. Hope this will help you to resolve the issue.

    JavaScript:
    <script type="text/javascript"
    function OnClientClose(oWnd) 
        oWnd.oWnd.get_contentFrame().src = "about:blank"
    </script> 

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 06 Jan 2009 Link to this post

    Hello Jeff,

    This could happen if RadWindow's object is not destroyed when the window is closed (e.g. DestroyOnClose is set to false). By default this property is set to false and when a RadWindow is closed, it remains hidden on the page - this is done in order to provide a caching feature so the window can be opened immediately when called again.

    Please set DestroyOnClose to true - this should help in your scenario. Note however that when DestroyOnClose is set to true, you will not be able to open that same RadWindow again until the whole page is reloaded - a new RadWindow with default settings will be opened instead. That is why it is better to set the needed properties of the window either in the RadWindowManager or with the client-side API.



    Kind regards,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Jeff
    Jeff avatar
    38 posts
    Member since:
    Jan 2008

    Posted 06 Jan 2009 Link to this post

    Thanks for the quick replies.

    This is a tough one. The DestroyOnClose worked great in stopping the audio when the window was closed but as you mentioned, the next window that was opened reverted back to the default settings which don't work well for the video that's playing. Unfortunately it will be very common for users to open windows multiple times when on the same page.

    The other suggestion to use the onClientClose function didn't seem to stop the audio when the window was closed but also threw a javascript error so it's possible I didn't implement it correctly. I added OnClientClose="OnClientClose" to the window parameters and then the javascript as copied directly from the suggestion but I get a "oWin is null or not an object" browser error. Do I need to adjust?

    thanks again

  6. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 06 Jan 2009 Link to this post

    Hello Jeff,

    It is not so tough as it looks :) Have you tried setting the needed properties for the window in the RadWindowManager or via the client-side API? As for Shinu's reply, I see that there is an extra oWnd there - that is why you are getting the error.
    Try it like this:
    function OnClientClose(oWnd)  
    {  
        //one way 
        oWnd.get_contentFrame().src = "about:blank";  
        //basically the same but by using the setUrl method 
        //oWnd.setUrl("about:blank");  
    }  


    If you still experience problems, please open a support ticket and send me a small sample application where the problem can be reproduced and that shows your exact setup. I will examine it and get back to you with solution right away.

    Kind regards,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. Jeff
    Jeff avatar
    38 posts
    Member since:
    Jan 2008

    Posted 07 Jan 2009 Link to this post

    Thanks Georgi - the adjusted code you supplied worked perfectly.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017