linkme | Safe cross-platform linker shenanigans | iOS library
kandi X-RAY | linkme Summary
kandi X-RAY | linkme Summary
† We welcome PRs adding support for any platforms not listed here.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of linkme
linkme Key Features
linkme Examples and Code Snippets
Community Discussions
Trending Discussions on linkme
QUESTION
I have a piece of code for checking if a list of media is playable. The problem is that when I run the method and let it finish or cancel it using a CancellationToken
, the MediaPlayer
keeps downloading content and never finishes even though I have a using
and call Dispose()
. Maybe I'm doing something wrong... A little help is very appreciated. Thanks a lot!
Here is the code:
ANSWER
Answered 2020-Apr-22 at 07:49You would rather need to dispose underlying MediaSource appropriately to stop downloading besides disposing the MediaPlayer.
So right steps to dispose MediaPlayer currently playing MediaSource created from Uri are...
- Pause playback on the MediaPlayer.
- Detach MediaSource from the MediaPlayer.
- Dispose both MediaSource* and MediaPlayer.
*Since MediaSource class also has IDisposable interface, it may be better to wrap the code-block in a using(...){ } clause. Then you don't need to call Dispose explicitly.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install linkme
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page