David Cordero

Blog

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...

How to free up space in your CI or iOS Development machine

Published on 01 Oct 2019

As a result of working in iOS Development, it is quite common to see how your machine eventually run out of space.

The reason is that, as things go, some files like archives, simulators, or caches from building are created, but never deleted.

Continue reading...

Cooling the Raspberry Pi 4

Published on 27 Jul 2019

Some weeks ago the Raspberry Pi Foundation released the Raspberry Pi 4, a new version of their amazing board that will allow us to go even further in our projects.

This new model means a huge bump in terms of performance, being nowadays closer to be a mini-computer than the educational board that it was originally aiming to be.

Continue reading...

SwiftUI, personal thoughts and Model-View-Presenter

Published on 12 Jun 2019

It was just a few days ago that Apple presented SwiftUI, a brand new framework to create the user interface of our Apps that might eventually replace UIKit in our Apps.

Despite the hype, SwiftUI is still just a baby framework, and it will need patience, love and tender to become a strong and useful adult framework. As we already saw on the first version of Swift, new tools need some iterations and some patterns created by the community until they get really useful in our daily basis.

Continue reading...