If you’ve used YouTube, Spotify,
Netflix, or any similar apps before, you’re probably familiar with the concept
of media streaming. Embedding media content that can be loaded directly from a
remote source is a common feature for apps that support audio or video data.
There are a number of libraries that can handle this -
ffmpeg
,
gstreamer
, and mpv
,
to name a few. However, these are heavy dependencies, and you may want to use
something more lightweight and easy to embed in your app.
It can be fairly easy to create something that works under optimal conditions, but an efficient solution that handles edge cases correctly can be deceptively complicated due to the number of concurrency-related challenges you’ll encounter.