Replies: 2 comments 8 replies
-
You should provide a direct link to file. Assume you are in a private mode and pass the url. Google asks you to sign in. The same happens with media element. You should either specify a direct link to file or download it and play locally |
Beta Was this translation helpful? Give feedback.
8 replies
-
Closed and answered |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@
I have Audio Files (MP3/MP4) files that are stored on my Google Drive not being played when using the MediaElement of the MAUI Community Toolkit.
I am implementing the MediaElement functionality as follows:
In my XAML I have the following:
<toolkit:MediaElement x:Name="mediaElement" Grid.Row="0" Source="{Binding MediaFile}" ShouldAutoPlay="True" /\>
The MediaElement is defined as follows in my xaml.cs code:
`
public partial class Level3Page : ContentPage
{
readonly Level3ViewModel _viewModel;
}`
I am using a Google Service Account for connecting my App to the Google Drive folder. This all works fine and also the File to play is located correctly. But MediaElement does not play the audio and I get the following error:
0:] MediaManager: Error: Error codename: ERROR_CODE_PARSING_CONTAINER_UNSUPPORTED, Error message: Source error
The following is my C# code in my ViewModel to get the file details from Google Drive and using the MediaElement Play method: Level3Page.MediaControlA.Play():
`
I know that the value of result.Files[0].Id is correct, because when I copy and paste the MediaFile URL contents into my web browser (have to login to google drive), the audio file plays without any issue.
The url example is:
https://drive.google.com/file/d/MY FILE ID
Can someone please suggest what the issue could be?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions