How set a buffer ?

8 posts, 1 answers
  1. herve
    herve avatar
    29 posts
    Member since:
    Oct 2008

    Posted 23 Nov 2008 Link to this post

    hi,

    how do i do for set a buffer of 5 seconds to the player?

    thx for helping

    best regards

    herve

  2. Answer
    Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 24 Nov 2008 Link to this post

    Hello Herve,

    RadMediaPlayer exposes its MediaElement through the MediaElement property. You can use this MediaElement property to set a buffering time.
    For example:
    private void mediaPlayer1_Loaded(object sender, RoutedEventArgs e)  
    {  
        this.mediaPlayer1.MediaElement.BufferingTime = TimeSpan.FromSeconds(5);  

    I have attached a sample XAML page and its code-behind that demonstrate the above functionality.
    Let me know how this works for you!


    Greetings,
    Kiril Stanoev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft banner
  4. herve
    herve avatar
    29 posts
    Member since:
    Oct 2008

    Posted 24 Nov 2008 Link to this post

    May i call you master? :)
    works like a charm!
    thx a lot
  5. Amit Gupta
    Amit Gupta avatar
    3 posts
    Member since:
    Sep 2009

    Posted 07 Oct 2009 Link to this post

    Hi. setting bufferingtime in xaml (<

     

    telerik:RadMediaItem BufferingTime="5"...) doesnt seem to work (it keeps buffering forever; never plays)... Can BufferingTime have to be set in code behind only?

     

  6. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 08 Oct 2009 Link to this post

    Hello Amit,

    By setting BufferingTime="5" you actually say that the BufferingTime is 5 hours, 0 minutes and 0 seconds.
    If you want to set the BufferingTime to 5 seconds, you need to do the following:

    BufferingTime="0:0:5"

    Let me know how it works for you.

    Regards,
    Kiril Stanoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Amit Gupta
    Amit Gupta avatar
    3 posts
    Member since:
    Sep 2009

    Posted 08 Oct 2009 Link to this post

    Works like a charm; Thank you!
  8. Edo Cof
    Edo Cof avatar
    47 posts
    Member since:
    Feb 2006

    Posted 21 May 2010 Link to this post

    The RadMediItem should check if buffer is set to more then Video time it should automatically set it to maximum.

    So it could never happened that play is never execute.
  9. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 27 May 2010 Link to this post

    Hi Edo Cof,

    You're correct. We will fix this for next releases.
    Thank you.

    All the best,
    Miro Miroslavov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
DevCraft banner