FullScreen problem (Urgent)

18 posts, 0 answers
  1. fred
    fred avatar
    28 posts
    Member since:
    Jun 2010

    Posted 29 Jun 2010 Link to this post

    Hi,

    When I click on the fullscreen button of the player, the silverlight window fill up my page, but the video player keeps its normal size.
    Tough I get the message to "click on the escape keyboard touch to close the fullscreen view".

    here is my code, what am I missing please ?

    Regards and thanks in advance

    in my xaml

     <Border Grid.Row="2" Theme:StyleManager.Style="Grid_Background_Style" HorizontalAlignment="Left">
                    <Grid>

                        <!-- SELECTED ELEMENT DETAILS -->
                        <StackPanel Orientation="Horizontal">

                            
                        <StackPanel Orientation="Vertical" VerticalAlignment="Bottom">                             
                                  
                                <player:RadMediaPlayer  x:Name="player"               
                                                        Header="{Binding RelativeSource={RelativeSource Self}, Path=MediaElement}" 
                                                        SelectedIndex="0" FullScreenChanged="player_FullScreenChanged">  
                                      
                                    <player:RadMediaItem IsStreamingSource="True" Header="Big Buck Bunny"    
                                        Source="http://video3.smoothhd.com.edgesuite.net/ondemand/Big Buck Bunny Adaptive.ism/Manifest" 
                                        StreamAttached="RadMediaItem_StreamAttached">  
                                    </player:RadMediaItem> 
                                          
                                </player:RadMediaPlayer> 

    in my .cs
            private void player_FullScreenChanged(object sender, EventArgs e)  
            {  
                Application.Current.Host.Content.IsFullScreen = !Application.Current.Host.Content.IsFullScreen;  
            } 
  2. fred
    fred avatar
    28 posts
    Member since:
    Jun 2010

    Posted 30 Jun 2010 Link to this post

    By testing more, I found out that When I click on the full screen button of my player, the popup windows opens but shows up all the xaml page (I have a Grid with three rows, and several stackpanels in each rows).

    Is there a way to have just the mediaplayer opening in the popup window ?

    Regards, and thanks for your great work
  3. DevCraft banner
  4. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 02 Jul 2010 Link to this post

    Hello fred,

    Currently we don't support full screen functionality out-of-the box, but we leave this as application logic. Which means we raise the FullScreenChanged event and you should handle it in your code and for example you can make the whole app in full screen, but the player will be still at the same position.
    We will implement the full functionality for the next Q, but till then you can try this code if it will works good for you.

    public partial class MainPage : UserControl
    {
        private TimeSpan currentMediaElementPosition;
        private Popup popUp = new Popup();
     
        public MainPage()
        {
            InitializeComponent();
     
            Application.Current.Host.Content.FullScreenChanged += Content_FullScreenChanged;
        }
     
        private void Content_FullScreenChanged(object sender, EventArgs e)
        {
            Debug.WriteLine("Content FSCh");
            this.currentMediaElementPosition = player.MediaElement.Position;
     
            if (Application.Current.Host.Content.IsFullScreen)
            {
                player.Width = Application.Current.Host.Content.ActualWidth;
                player.Height = Application.Current.Host.Content.ActualHeight;
                popUp.IsOpen = true;
     
                LayoutRoot.Children.Remove(player);
                popUp.Child = player;
            }
            else
            {
                player.Width = Double.NaN;
                player.Height = Double.NaN;
                popUp.Child = null;
     
                if (!LayoutRoot.Children.Contains(player))
                {
                    LayoutRoot.Children.Add(player);
                }
            }
     
            player.IsFullScreen = Application.Current.Host.Content.IsFullScreen;
        }
     
        private void player_FullScreenChanged(object sender, EventArgs e)
        {          
            player.MediaOpened += player_MediaOpened;
     
            Application.Current.Host.Content.IsFullScreen = player.IsFullScreen;
        }
     
        private void player_MediaOpened(object sender, Telerik.Windows.RadRoutedEventArgs e)
        {          
            player.MediaElement.Position = this.currentMediaElementPosition;           
        }
    }

    This code inserts the player in a stretched Popup. Although it is not working perfectly, you may give it a try.
    Thank you.


    Regards,
    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
  5. fred
    fred avatar
    28 posts
    Member since:
    Jun 2010

    Posted 02 Jul 2010 Link to this post

    Hi Miro and thank you.

    I just integrated your code sample in my project, and it should work fine, but I get an ArgumentException , and Visual Studio 2008 even freezes totally oO
    Here is the error :

    [i]ArgumentException was unhandled by user code
    La valeur n'est pas comprise dans la plage attendue[/i]

    and it points to the following line code :

    if (Application.Current.Host.Content.IsFullScreen)
                {
                    player.Width = Application.Current.Host.Content.ActualWidth;
                    player.Height = Application.Current.Host.Content.ActualHeight;
                    popUp.IsOpen = true;

                    LayoutRoot.Children.Remove(player);
                    popUp.Child = player;                              <------------------ HERE is the bug message
                }

  6. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 07 Jul 2010 Link to this post

    Hello fred,

    When you have Application.Current.Host.Content.FullScreenChanged handler, you can not debug the application. When you debug it - the VS and everything freeze.

    Can you please find the attached project and check if you can reproduce it there.

    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
  7. fred
    fred avatar
    28 posts
    Member since:
    Jun 2010

    Posted 07 Jul 2010 Link to this post

    Hi Miro and thanks.

    Alas for your project as for mine, it won't work either in Debug or In Release.
    The same error message occurs, and the entire environment freezes.

    It's odd, by the way, that even in Release it freezes. I hope you will have more response for me.

    thanks in advance and regards
  8. fred
    fred avatar
    28 posts
    Member since:
    Jun 2010

    Posted 07 Jul 2010 Link to this post

    Hi Miro !

    I just found out something that may explain the problem.
    My Player is included in a dashboard window, that includes two gridview and more infos.
    If I  just copy/paste my code in a bran new project , the full screen handler works perfectly.
    If I try to open the full screen in my dashboard, the application freezes.

    It seems curious to think you can't open a popup full screen player in a window that contains other elements.
    Here is a picture of my screen so you can understand what I'm trying to do.
    Is that a thing I'm misunderstanding or a bug ?

    Regards
  9. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 12 Jul 2010 Link to this post

    Hello fred,

    This is really strange. It is not supposed to have problems if having other elements or not.
    Is it possible to send us example project that demonstrates the problem? So we will be able to reproduce it and give you advice or workaround.
    Thank you.

    Greetings,
    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
  10. fred
    fred avatar
    28 posts
    Member since:
    Jun 2010

    Posted 12 Jul 2010 Link to this post

    Hi Miro,

    the example you ask for have been sent to your service via the 327102 Telerik Ticket, as I wasn't able to put it into another storage or link.

    Best Regards
    Hoping you'll find out what's wrong
  11. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 13 Jul 2010 Link to this post

    Hello fred,

    Answered in ticket: 327102.

    Best wishes,
    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
  12. fred
    fred avatar
    28 posts
    Member since:
    Jun 2010

    Posted 15 Jul 2010 Link to this post

    Hi Miro,

    Thanks for the solution, it works fine with me.

    Just by curiosity, do you know why it won't work with smooth streaming video ? and it seems clicking on the full screen button stops the video running. Is that normal ? DO I need to create a method to start the video streaming again ?

    Regards
  13. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 19 Jul 2010 Link to this post

    Hi fred,

    When you click the full screen button, what happens is that removing the MediaPlayer from the visual tree (removing it from the panel) causes the video to stop and drop the connection to the server. When we add it in the Popup it starts again but from the beginning and should be positioned at the same place where it was stopped. This actual restarting of the video is causing side effects when it is smooth streaming video. (It is a internal problem of the smooth streaming media element).
    However we will fix our media player to support full screen more naturally - there is public issue for that where you can vote for it, so will raise its priority.

    Kind regards,
    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
  14. Sébastien
    Sébastien avatar
    2 posts
    Member since:
    Nov 2008

    Posted 17 Aug 2010 Link to this post

    Hi,

    I have the same issue as Fred.
    When the full screen fix would be released ?

    Regards.

    Sébastien.
  15. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 19 Aug 2010 Link to this post

    Hello Sébastien,

    You can track this feature progeress here.
    It will be also ready for the Beta release of Q3 or even sooner. (after a month from now)
    Hope this time frame is good for you.

    Kind regards,
    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
  16. Sébastien
    Sébastien avatar
    2 posts
    Member since:
    Nov 2008

    Posted 20 Aug 2010 Link to this post

    Hi Miro,

    thanks for the answer.
    I succeeded to show video in full screen mode using the sample code you posted.
    We will use it until you released the fix,

    Regards,
    Sébastien
  17. danparker276
    danparker276 avatar
    389 posts
    Member since:
    Aug 2010

    Posted 11 Nov 2010 Link to this post

    I can't seem to get it working right in my child window.  When I click on full screen, the full screen part works, but it restarts the video (even though I'm setting my position like the code above).  Also the slider bar for the video doesn't do anything when I move it after that.  Any suggestions, I basically just copied the code above.  Any plans on fixing this issue?
  18. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 12 Nov 2010 Link to this post

    Hello Dan,

     Yesterday we've release Q3 2010 version of RadControls For Silverlight, which includes MediaPlayer native full screen support and a lot more fixes of the player itself. 
    Can you give it a try and let us know if you still have problems with it.
    Thank you for your cooperation.

    Best wishes,
    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
  19. danparker276
    danparker276 avatar
    389 posts
    Member since:
    Aug 2010

    Posted 12 Nov 2010 Link to this post

    Thank you.  It works great now.
Back to Top
DevCraft banner