Dev.to WebDev 🛠 Dev 👁 0 📖 2 min read

What happens after the last video? Designing a finite playback queue

On November 10, I shared a small project that lists videos from the YouTube channels I follow. Two people asked some version of “Isn’t that already on YouTube?” I’d used the subscriptions tab for years, so I could see ho

On November 10, I shared a small project that lists videos from the YouTube channels I follow. Two people asked some version of “Isn’t that already on YouTube?” I’d used the subscriptions tab for years, so I could see how I’d invited the question. Both screens could put the same video at the top. A screenshot of the list did very little to explain the behavior I’d spent time on.

Start with the last item

The moment I cared about came at the end of a session. On my desktop, I’d finish the last subscription video I meant to watch, autoplay would pick a recommendation, and I’d often stay for it. Sorting the list newest first wouldn’t change that.

For the player I built, pressing Play starts a queue of unwatched subscription videos, newest first. When the last one finishes, playback stops. If I were reviewing that behavior with another developer, I’d start with a queue containing exactly one unwatched video. Play it to the end. Does another video start? That small case captures the part of the design that a full screen of thumbnails hides.

Give a relative timestamp a day to age

On the morning of November 12, I counted 15 videos labeled “1 day ago” in my desktop subscriptions tab. They were still in order. What I couldn’t tell at a glance was which had gone up yesterday morning and which had appeared while I was asleep.

In my timeline I grouped the entries by day and kept the upload time beside each video. The day heading gives me a place to resume scanning. The time tells two neighboring entries apart. If I were putting together sample data for that screen again, I’d include those 15 entries from yesterday. A handful labeled “3 minutes ago” and “2 hours ago” would make either design look clear.

Write down what a filter actually excludes

I also wanted a session without Shorts. My rule excludes videos identified as Shorts and videos three minutes long or shorter. Those conditions overlap, but they cover different things. An ordinary two-minute upload from a channel I follow is excluded too. Describing the rule as “hide Shorts” would conceal that trade-off from someone trying to understand why a video was missing.

The comments gave me a better way to review this project. I can take one ordinary short upload, several uploads from yesterday, and one unwatched video left in the queue, then ask exactly what someone will see. That’s a much more useful conversation than putting two feeds side by side and asking which one looks better.

I used AI assistance to edit this English version of my development notes.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.