Forum Discussion

aman316497's avatar
aman316497
Copper Contributor
Aug 24, 2023

.NET MAUI CommunityToolkit.Maui.Views.MediaElement taking too much time to load the url-video in IOS

       <Grid RowDefinitions="Auto,*" BackgroundColor="Transparent">
                                        <toolkit:MediaElement
                                        Grid.RowSpan="2"
                                           
                                        x:Name="VideoView"
                                        ShouldKeepScreenOn="True"
                                       ShouldShowPlaybackControls="False"
                                                      ShouldLoopPlayback="True"
                                                      ShouldAutoPlay="True"
                                                      StateChanged="VideoView_StateChanged"
                                       
                                                 Source="{Binding Question.GetQuestionReel,Mode=OneWay}"
                                       Aspect="Fill"
                                       HorizontalOptions="FillAndExpand"
                                       VerticalOptions="FillAndExpand" >
                                        </toolkit:MediaElement>
                                     <ActivityIndicator BackgroundColor="Transparent" IsRunning="True" IsVisible="False" x:Name="Buffering" VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand"   Grid.RowSpan="2"/>
                               
                                    <StackLayout Orientation="Horizontal" HorizontalOptions="CenterAndExpand" Margin="0,15,0,0" BackgroundColor="Transparent">
                                        <Frame
                                                        BackgroundColor="Transparent"
                                                        BorderColor="White"
                                           Padding="15,10"
                                            HeightRequest="40"
                                                        CornerRadius="20"
                                                        HorizontalOptions="FillAndExpand">
                                                <Label TextColor="White" FontSize="12" HorizontalOptions="Center" VerticalOptions="Center" Padding="0" Margin="0">
                                                   <Label.Text>
                                                        <MultiBinding StringFormat="{}{0} of {1}">
                                                            <Binding Path="CurrentQuestionNumber"/>
                                                            <Binding Path="TotalQuestions"/>
                                                        </MultiBinding>
                                                    </Label.Text>
                                                </Label>
                                        </Frame>
                                    </StackLayout>
                                </Grid>
No RepliesBe the first to reply

Resources