Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/waliid/pillarbox-smooth-seeking
- Owner: waliid
- License: mit
- Created: 2024-04-29T17:22:23.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-02T18:10:29.000Z (7 months ago)
- Last Synced: 2024-05-03T15:05:20.314Z (7 months ago)
- Topics: apple, avfoundation, avplayer, ios, media, smooth-seeking, stream, swift, video
- Language: Swift
- Homepage:
- Size: 2.42 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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: 🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢
```