xamarin-forms-samples
xamarin-forms-samples copied to clipboard
Xamarin CommunityToolkit error with space in MediaSource URL
I using Xamarin.CommunityToolkit
It work correctly but I have some problem with Remote Source uri
<xct:MediaElement Grid.Row="0"
x:Name="mediaElement"
HorizontalOptions="Fill"
MediaEnded="OnMediaEnded"
MediaFailed="OnMediaFailed"
MediaOpened="OnMediaOpened"
SeekCompleted="OnSeekCompleted"
ShowsPlaybackControls="True"
/>
Description
I using both of binding or direct assign MediaSource viewModel.MediaSource = viewModel.CurrentTrack.MediaSource; mediaElement.Source = viewModel.MediaSource;
but I get this Error on some Url [0:] Uri: http://192.168.1.149:82/MediaContent/Musics/Mozart/01 Track 1.mp3 Thread started: <Thread Pool> #16 Java.Lang.RuntimeException: 'setDataSource failed: status = 0x80000000'
but when Url is like this: [0:] Uri: http://192.168.1.149:82/MediaContent/Musics/OTTMAR/1.MP3 It wrking fine I think it's problem with space in Url
Information
- IDE and IDE version: Visual Studio 2019 v16.11.4
- Platform with the issue:
- Android: The version of the Android 6.0 API 23
- emulator: Android TV