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

FullScreen problem (Urgent)

17 Answers 110 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
fred
Top achievements
Rank 1
fred asked on 29 Jun 2010, 12:08 PM
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;  
        } 

17 Answers, 1 is accepted

Sort by
0
fred
Top achievements
Rank 1
answered on 30 Jun 2010, 08:39 AM
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
0
Miro Miroslavov
Telerik team
answered on 02 Jul 2010, 09:04 AM
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
0
fred
Top achievements
Rank 1
answered on 02 Jul 2010, 09:29 AM
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
            }

0
Miro Miroslavov
Telerik team
answered on 07 Jul 2010, 01:11 PM
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
0
fred
Top achievements
Rank 1
answered on 07 Jul 2010, 01:23 PM
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
0
fred
Top achievements
Rank 1
answered on 07 Jul 2010, 02:12 PM
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
0
Miro Miroslavov
Telerik team
answered on 12 Jul 2010, 12:25 PM
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
0
fred
Top achievements
Rank 1
answered on 12 Jul 2010, 03:30 PM
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
0
Miro Miroslavov
Telerik team
answered on 13 Jul 2010, 02:16 PM
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
0
fred
Top achievements
Rank 1
answered on 15 Jul 2010, 12:22 PM
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
0
Miro Miroslavov
Telerik team
answered on 19 Jul 2010, 07:45 AM
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
0
Sébastien
Top achievements
Rank 1
answered on 17 Aug 2010, 03:57 PM
Hi,

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

Regards.

Sébastien.
0
Miro Miroslavov
Telerik team
answered on 19 Aug 2010, 03:00 PM
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
0
Sébastien
Top achievements
Rank 1
answered on 20 Aug 2010, 09:18 AM
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
0
danparker276
Top achievements
Rank 2
answered on 12 Nov 2010, 01:33 AM
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?
0
Miro Miroslavov
Telerik team
answered on 12 Nov 2010, 07:50 AM
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
0
danparker276
Top achievements
Rank 2
answered on 12 Nov 2010, 06:05 PM
Thank you.  It works great now.
Tags
MediaPlayer
Asked by
fred
Top achievements
Rank 1
Answers by
fred
Top achievements
Rank 1
Miro Miroslavov
Telerik team
Sébastien
Top achievements
Rank 1
danparker276
Top achievements
Rank 2
Share this question
or