Skip to content
This repository has been archived by the owner on Feb 6, 2021. It is now read-only.

Android MediaMetadataRetriever Performance #11

Closed
hashimks opened this issue Aug 1, 2017 · 8 comments
Closed

Android MediaMetadataRetriever Performance #11

hashimks opened this issue Aug 1, 2017 · 8 comments
Assignees
Labels

Comments

@hashimks
Copy link

hashimks commented Aug 1, 2017

Hello,

I just tried this plugin in Xamarin. I have an issue here. I am showing a list of videos on a page and selecting it needs to show the video page. Here the problem is when I tried to select it, the next page navigation is taking long as it is trying to load the video which is causing issues. Is there anything we can do here to navigate page fast and the video plays on clicking the play button.

@peterfoot
Copy link
Member

How/when are you setting the source for the MediaElement? Is the issue on a single platform or across multiple platforms?

@danieltabarest
Copy link

the same issue, when loading a next page navigation is taking long, some new result with this issue

@closetoyou293
Copy link

I had performance issue in Android. It takes 20-30 seconds to show video. My project uses Xamarin Form.

@peterfoot
Copy link
Member

Where is the source video file, what kind of Uri are you using?

@danieltabarest
Copy link

Hey @peterfoot I am using on the xaml this code, I am using the a video example
<forms:MediaElement HorizontalOptions="Fill" BackgroundColor="Green" VerticalOptions="Center" HeightRequest="180" x:Name="Media" IsLooping="True" AreTransportControlsEnabled="true" Source="http://video.ch9.ms/ch9/334f/891b78a5-642d-40b4-8d02-ff40ffdd334f/LoginToLinkedinUSingXamarinAuth_mid.mp4"/>

But it takes a lot of time to show the video

@closetoyou293
Copy link

It seems loading metadata is a problem.
It takes 1-2 second to set uri into MediaMetadataRetriever and 6-7 second to extract metadata.

@peterfoot peterfoot added the bug label Nov 23, 2017
@peterfoot peterfoot changed the title Loading issue Android MediaMetadataRetriever Performance Nov 23, 2017
@peterfoot peterfoot self-assigned this Nov 23, 2017
@peterfoot
Copy link
Member

Looking into this, the metadata is required in order to get the video frame size so either needs performance resolving or running this in a separate thread which can then update the video stretch when retrieved...

@peterfoot
Copy link
Member

MediaMetadataRetriever now runs in background thread to avoid blocking the UI.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants