A video player for apps is a ready-made piece of software that developers build into a streaming app to play video. Its main job is to choose the right quality of video, moment by moment, as the viewer's network speeds up or slows down. It also plays the ads, shows subtitles, switches audio languages and asks for the key that unlocks protected video. Developers usually buy a player, or build on an open-source one, rather than write their own.
How does the player choose? Before a video starts, the player downloads a small file called a manifest. The manifest lists every copy of the video that the encoder made, from high quality to low, and where each short piece of each copy is stored. The player then downloads the pieces one at a time and keeps a few of them ready in memory. This store of ready pieces is called a buffer. The player measures how fast each piece arrives. If pieces arrive slowly and the buffer begins to empty, it switches to a lower-quality copy. If they arrive quickly, it switches up. This is adaptive bitrate streaming.
Imagine a passenger on a bus from Mysuru to Bengaluru, watching a series on 4G. In the city, her connection gives 8 megabits per second, and the player plays 1080p. Near a stretch with weak signal, the speed drops to 1 megabit per second. The buffer holds 30 seconds of video, so the picture keeps playing. Within a few seconds, the player switches to 480p. The picture looks softer, but it does not stop. When the signal returns, the player climbs back to 1080p. She notices a blurry minute, not a frozen screen.
The player has other jobs too. When a video is protected, the player asks a licence server for the key that decrypts it. It passes the key to the device's protected hardware, as described in video DRM. It reads the markers that show where ads go. And it reports what happened during each session. Every start, every switch and every freeze goes to video quality of experience (QoE) analytics.
Why buy a player? Each phone and TV platform has a basic player of its own. But a streaming service needs the same behaviour, the same ads and the same reports on every device. A commercial player gives one version of these features across Android, iPhone, web browsers and many smart TVs. This saves the engineers who build the streaming apps from solving the same problems a dozen times.