David Cordero


Implementing a TV Guide with SwiftUI

Published on 11 Mar 2024

One of the consequences of having worked in the TV industry for so many years, is that I had the opportunity to develop a TV Guide using multiple programming languages.

A TV Guide is often the most complex view component within such applications. That’s both in terms of navigation, with its multidirectionaly controls, and in terms of performance, with thousand of programs loaded asynchronously.

Continue reading...

Global Git Ignore

Published on 05 Apr 2023

It is a well-known feature that every project in Git allows defining a list of files that should be ignored and not tracked. This is a common practice and is as simple as defining a file called .gitignore in the base path of your repo. The content of this file is simply the list of files or file patterns to be ignored.

Continue reading...

Some thoughts about Mastodon and Social Networks

Published on 14 Nov 2022

This post is just a series of thoughts that I have been into lately after some days back to social networks to give it a try to Mastodon.

Continue reading...

Logarithmic Volume Control

Published on 18 Oct 2021

Have you ever experienced one of the following situations? 

You are watching some video in a quiet environment, you set the volume to the lowest possible value and it is too loud, so you press the volume down button once, and now your device is muted.

On some other day, you are at a party listening to music with the volume set at 100%, you change it to 80% and you can barely notice any difference.

How can it be that a single volume level means too much in the first case, but changing it from 100% to 80% feels like nothing in the second one?

Continue reading...

Capture Circular Gestures from Siri Remote 2nd Generation

Published on 01 Sep 2021

Recently, together with the release of the new Apple TV 4K, Apple released a new generation of their beloved and at the same time hated Siri Remote controller.

One of the features that Apple announced for this remote control was the possibility of scrubbing content in AVPlayerViewController, using a circular gesture similar to the classic click wheel of the first iPods.

Continue reading...

Implementing a Video Player with RealityKit

Published on 17 Aug 2021

I am really looking forward to the eventual release of the rumored Apple Glasses. I think that AR could be the next big revolution that could make redundant some of the technology that we use nowadays.

One of the use cases where I see a potential for AR technology is in the world of video playback Apps.

Continue reading...

Prevent fast-forward in tvOS

Published on 05 Aug 2021

Due to legal restrictions, or content agreements, it is a very common use case in the TV industry having to prevent forward-seeking for certain contents.

At Zattoo, we are not an exception, and we also had to implement this playback limitation in our Apps.

Continue reading...

CMTime for Human Beings

Published on 07 Jul 2021

CMTime is a struct representing a time value such as a timestamp or duration. CMTime is defined by CoreMedia and it is often used by AVFoundation API interfaces.

Because the interface of CMTime is horrible, and its documentation is even worse, here you have a few use cases to make it easier to work with CMTime in a daily basis.

Continue reading...

Binding a Swift Dictionary to SwiftUI

Published on 17 Jun 2021

Creating a Form with a single Toggle in SwiftUI is a simple task. You can get a pretty nice result with just a few lines of code, as you can see here below:

Continue reading...

HLS Timed Metadata with AVPlayer

Published on 01 Feb 2021

As documented by Apple, HTTP Live Streaming (HLS) supports the inclusion of timed metadata in ID3 format.

In order to get this in-stream timed metadata from the client, we can make use of AVPlayerItemMetadataOutputPushDelegate.

Continue reading...

How to use an AppleTv box for development, without a TV

Published on 20 Oct 2020

If you ever tried to use QuickTime Movie Recording to get video output from an AppleTv that does not have a connected TV, you might have discovered that it does not work.

This is a pain in the situations when you can’t have a TV with you, for example when traveling, or when you are in home office and your family wants to watch TV.

Continue reading...

Supporting AirPods in your iOS and tvOS media Apps

Published on 19 Oct 2020

The AirPods are equipped with sensors that allow users to trigger some gestures like double-tap or automatic ear detection, to control media playback.

The behavior of each of these gestures can be configured in the Settings of the operating system among the options: Siri, Play/Pause, Next Track, Previous Track, or Off.

Continue reading...

How to implement a 'Skip Intro' button in tvOS

Published on 20 Aug 2020

Even though I am one of the few persons who actually like watching series intros and never uses this button, the truth is that the ‘Skip Intro’ button introduced by Netflix a few years ago is most probably one of the most beloved features in their Apps.

Continue reading...

Conda cheat sheet

Published on 20 Jun 2020

My personal cheat sheet for working with Conda.

Continue reading...

Showing HTML content in tvOS

Published on 15 Jun 2020

If you ever tried to display HTML content in tvOS, you might have discovered that it is not as easy as initially expected.

That is because there is no web browser, UIWebView, or even WKWebView available in tvOS.

Nevertheless, there is an alternative solution that can be useful to present simple HTML content as Term and Conditions, Privacy Policies, etc…

Continue reading...