Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/waliid/pillarbox-smooth-seeking

A small project showing how Pillarbox smooth seeking works.
https://github.com/waliid/pillarbox-smooth-seeking

apple avfoundation avplayer ios media smooth-seeking stream swift video

Last synced: 4 days ago
JSON representation

A small project showing how Pillarbox smooth seeking works.

Awesome Lists containing this project

README

        

# AVPlayer seek improvement

## How AVPlayer's seek seems to work

During a seek using AVPlayer, moving from the position **A** to the position **B** will result in the passage of several intermediate positions, from **I0** to **In**.
All intermediate **I** positions are cancelled. In other words, the move from **I0** to **I1** will take place and **I1** will cancel **I0**, the move from **I1** to **I2** will take place and **I2** will cancel the intermediate seek **I1**, and so on. In the end, all intermediate positions will be cancelled and the effective seek will be from position A to position B.

![AVPlayer Seek](Resources/smooth-seeking-0.jpg)

## Smooth Seeking

> Smooth Seeking, a concept introduced and term borrowed from the [Pillarbox project](https://github.com/SRGSSR/pillarbox-apple), offers a more advanced implementation than the one presented in this project.

The Smooth Seeking consists to ignore unnecessary intermediate seeks. When seeking from position **A** to position **B**, all intermediate positions will not be performed, some of them will be ignored. In other words, if we are on intermediate position **I0**, until position **I0** is completed, intermediate positions between **I0** and **Ix** will be ignored.

![Smooth Seek](Resources/smooth-seeking-1.jpg)

## Demo

![Demo Logs](Resources/demo.mov)

### Logs

```
Raw Player: 🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🟢

Smooth Player: 🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
```