Open tienphong923 opened 6 years ago
Hey @tienphong923
I can't reproduce that crash, but there was an issue with the setVolumeLevel
without animation (fixed now).
The observer is removed only on deinit, so that's weird. Can you post some of your code?
Hi @andreamazz
Sorry, that's my fail. My project used UISlider to adjust volume. When slider's value changed, it attempted to setVolumeLevel continuous.
With animated is false, I found your setVolumeLevel function remove observer and re-add observer after 0.1 second later. When I setVolumeLevel continuous, observer hasn't added (maybe below 0.1 second) so it crashed!
So my problem resolved by prevent setVolumeLevel continuous.
With your Demo (on version 0.5.1), when I was setVolumeLevel with animated=false, maybe progressbar not changed when I touched on increase button (+). And touch many times and quickly, it crashed with the same issue (Cannot remove an observer).
Great project, thanks for all!
Hi, I was tried to manual setVolumeLevel without animated = false but app crashed.