JSVideoScrubber
Simple iOS video scrubber
Install / Use
/learn @sjschubert/JSVideoScrubberREADME
JSVideoScrubber
First of all, thanks to grayscaletx for grpahic design work and UX feedback, and thanks to schlu for helping to sovle some difficult issues involving AVFoundation API's used to by this control.
This is a simple iOS 7 video scrubber control. There is an 'alt' branch which has a more native iOS 7 look and feel, but both have the same behavior.
To use:
- Checkout the branch (master | alt) for the design you want to use.
- Copy the Scubber folder into your project directory, and then import into XCode (no other source from this repo is needed).
- Add a UIView subview on the screen you want to display the scrubber on, and set its class property to JSVideoScrubber in the identity inspector. The size of the control can vary, however it was tested at 44x320. Results might vary.
- The following snippet is an example of how to load an asset into the scrubber:
__weak MyController *ref = self;
NSArray *keys = [NSArray arrayWithObjects:@"tracks", @"duration", nil];
[asset loadValuesAsynchronouslyForKeys:keys completionHandler:^(void) {
[ref.scrubber setupControlWithAVAsset:asset];
double total = CMTimeGetSeconds(ref.jsVideoScrubber.duration);
... update label with duration of the asset
//called everytime the user updates the offset into the video stream, slave our video playback to this
[ref.jsVideoScrubber addTarget:self action:@selector(updateVideoOffset:) forControlEvents:UIControlEventValueChanged];
}];
The following iOS frameworks are required by the control:
- QuartzCore.framework
- AVFoundation.framework
- CoreGraphics.framework
- UIKit.framework
- Foundation.framework
- CoreMedia.framework
You can run the demo on either a simulator or your phone. If running on the simulator, you will need to add video assets to your app's Documents directory in the simulator (I highly recommend the SimPholders mentioned in the instructions). If running on the phone, the demo app will ask for access to your photo roll, and will display any video assets in your library.
Related Skills
qqbot-channel
343.1kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
docs-writer
99.7k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
343.1kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
ddd
Guía de Principios DDD para el Proyecto > 📚 Documento Complementario : Este documento define los principios y reglas de DDD. Para ver templates de código, ejemplos detallados y guías paso
