Robert Dahlberg

Mostly Android


I have been a developer since I started my first company at high school. I’ve built large campaign frameworks, several video players and chats, streaming services, mobile apps and micro services to support them. At the moment my main languages are Kotlin, Java and Scala and my main platforms are Android and AWS. I’ve always been an asynchronous programmer since day one and was used to work both reactive and functional before it became hipp. My current project is about helping people with their personal finances at Tink.


The missing link in Streaming

When building applications that stream media of any kind there is more than often a missing link that causes unexpected behavior for the end-user.
Let me share my experience from over 10 years of working with different media players on why that is and how we can prevent it with the, often, missing link.

Building media players are hard, there’s a lot of scenarios to cover and tons of events that can affect playback. Now a days you can even pause and seek in live content.

We also depend a lot on libraries since it doesn’t make sense in reinvent the wheel and handle all networking manually when it’s already made for us.
So we rely on these black box libraries that more than often comes with a built in state machine to help us understand what’s going on.
And here is the most common mistake, we use that state machine as our own even to we don’t have any control over it. We also tend to misinterpret that this is a state machine for our application rather than seeing that this is merely a state machine for the library.
So we use this states to update our UI…

When we realize that this isn’t gonna cut it we often start adding flags in our (hopefully) presenting layer to cope with the fact that it isn’t a perfect match.
But this is just preparing for a bug waiting to strike.

In this talk I will walk you through a few samples of these bugs and in which scenarios they usually appears. I will also share my way of building media players today that have worked farily well in providing the user with a consistent UI. One that the user feels in control and always can count on the players UI to be correct.

I will also share some bugs in this area from at least on of the big media players out there. The big is there in the time of writing, let’s see if it remains.

Bakhtar Sobat
Chet Haase