MediaElement crashes when trying to play video
<xct:MediaElement x:Name="VideoPlayer" Source="{Binding Url}" ShowsPlaybackControls="True" IsLooping="False" MediaEnded="VideoPlayer_MediaEnded" AutoPlay="True" />
(In my case I have a PopupPage from Rg.Plugins.Popup, but I don't think that is the issue)
await PopupNavigation.Instance.PushAsync(page);
MediaElement opens and plays normally
App crashes with an exception when video is about to play.
Exception thrown and app crashes:
Objective-C exception thrown. Name: NSRangeException Reason: Cannot remove an observer <__XamarinObjectObserver 0x282bd7a00> for the key path "status" from
Version with issue: 1.0.0-preview1022
Platform Target Frameworks:
I am not aware of any workaround.
I just upgraded from using Xamarin.Forms preview MediaElement to CommunityToolkit,
while XF one had issues, I had my own MediaElementRenderer which worked,
but since I upgraded to CommunityToolkit, my own renderer can't be used because some types are now internal
I can't register on SeekRequested / StateRequested, etc, and I cannot use my own renderer,
I may create a blank project to reproduce this issue later if the information above is not sufficient.
1.0.0-preview1022 is this correct? Because I see we're up to 1099 now, so would you mind upgrading and see if that fixes it, because I'm pretty sure we fixed this bug :)
my own renderer can't be used because some types are now internal
I can't register on SeekRequested / StateRequested, etc, and I cannot use my own renderer,
So, this is a different issue I guess. Why did you need that renderer? We'd love to take away the need for any renderers
Hi, this version mentioned is the latest available on the nightly nuget sources
https://pkgs.dev.azure.com/xamarin/public/_packaging/XamarinCommunityToolkitNightly/nuget/v3/index.json
should I download sources from github e try linking it manually?
I just thought the nightly would be updated already,
I will try downloading sources and adding them to my project anyway
PS:
I found that I was referencing
Microsoft.Toolkit.Xamarin.Forms
instead of
Xamarin.Community.Toolkit
(both available under the specified nuget repository)
I've got the exact same error:
Objective-C exception thrown. Name: NSRangeException Reason: Cannot remove an observer <__XamarinObjectObserver 0x281d92140> for the key path "status" from
while using 1.0.0-preview1100
I will try to create a sample project so it can be reproduced
Bug reproduction project
Yeah I'll have to clean up the nightly feed. Sorry about that :)
Could I ask you one more favor? Try the pre5 release on the official nuget from yesterday? Shouldn't be different from that preview1100 that was mentioned, but just to be sure. Thanks!
I tried it
xamarin.forms.5.0.0.1558-pre3
xamarin.communitytoolkit.1.0.0-pre5
An exception error occurs when executing the bind.
Objective-C exception thrown. Name: NSRangeException Reason:
Cannot remove an observer <__XamarinObjectObserver 0x281951060>
for the key path "status" from
because it is not registered as an observer.