Paging Video UI, and some control components is available.

Related tags

Layout VideoPager
Overview

VideoPager

[![CI Status](http://img.shields.io/travis/Takuya Okamoto/VideoPager.svg?style=flat)](https://travis-ci.org/Takuya Okamoto/VideoPager) Version License Platform

Demo (GIF)

demo

Available UI

  • seekSlider: UISlider

  • playIcon: UIImage

  • pauseIcon: UIImage

  • playButton: UIButton

  • progressView: UIProgressView

  • currentTimeLabel: UILabel

  • remainTimeLabel: UILabel

  • activityIndicator: UIActivityIndicatorView

  • playSpeedButton: UIButton

  • speedRateList: [Float]

  • frontSkipButton: UIButton

  • backSkipButton: UIButton

  • topShadowHeight: CGFloat

  • bottomShadowHeight: CGFloat

  • shadowOpacity: CGFloat

  • fadeEnabledViews: [UIView]

Simple Usage

let videoPager = VideoPagerViewController()

videoPager.updateUrls(urls)

Custom Cell

class YourCell: VideoPagerCell {
  // your implementation
}

VideoPagerCustomUI

You can easily implement control UI by conforming to VideoPagerCustomUI.

class YourCell: VideoPagerCell, VideoPagerCustomUI {

    // VideoPagerCustomUI
    @IBOutlet weak var playButton: UIButton!
    @IBOutlet weak var seekSlider: UISlider!
}

Custom VideoPagerViewController

class CustomVideoPager: VideoPagerViewController {

    required init?(coder aDecoder: NSCoder) {
        // initialize with your cell
        let cellNib = UINib(nibName: "CustomCell", bundle: nil)
        super.init(coder: aDecoder, videoPagerCellNib: cellNib)
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        // set urls
        updateUrls(urls)
    }

    override func configureCell(cell: VideoPagerCell, index: Int) {
        super.configureCell(cell, index: index)
        // you can configure your cell with this method
        if let cell = cell as? CustomCell {
            cell.urlLabel.text = urls[index]
        }
    }

    override func didSelectItemAtIndex(index: Int) {
        super.didSelectItemAtIndex(index)
        // you can add tap action
        activeCell?.playOrPause()
    }
}

Documentation

API document is here.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS8.0~

Installation

VideoPager is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "VideoPager"

and import to your swift file.

import VideoPager

Author

Takuya Okamoto, [email protected]

License

VideoPager is available under the MIT license. See the LICENSE file for more info.

You might also like...
CompositionalLayoutDSL, library to simplify the creation of UICollectionViewCompositionalLayout. It wraps the UIKit API and makes the code shorter and easier to read.
CompositionalLayoutDSL, library to simplify the creation of UICollectionViewCompositionalLayout. It wraps the UIKit API and makes the code shorter and easier to read.

CompositionalLayoutDSL CompositionalLayoutDSL is a Swift library. It makes easier to create compositional layout for collection view. Requirements Doc

Harness the power of AutoLayout NSLayoutConstraints with a simplified, chainable and expressive syntax. Supports iOS and OSX Auto Layout

Masonry Masonry is still actively maintained, we are committed to fixing bugs and merging good quality PRs from the wider community. However if you're

Breezz: an application with which it is easy and simple to practice breathing exercises and meditation
Breezz: an application with which it is easy and simple to practice breathing exercises and meditation

breezz will help you relax Breezz is an application with which it is easy and si

Allows users to pull in new song releases from their favorite artists and provides users with important metrics like their top tracks, top artists, and recently played tracks, queryable by time range.

Spotify Radar Spotify Radar is an iOS application that allows users to pull in new song releases from their favorite artists and provides users with i

Swift-picker-views - inline single and multi picker views for UIKit. Without tableview! Easy and simple
Swift-picker-views - inline single and multi picker views for UIKit. Without tableview! Easy and simple

swift-picker-views Inline single and multiple picker views for UIKit. No tablevi

Add validations to your text fields, Group them together and navigate through them via keyboard's return button and accessory view.
Add validations to your text fields, Group them together and navigate through them via keyboard's return button and accessory view.

TFManager Let's say you have multiple UITextFields to get data from users. You need to handle each field keyboard's return key and add an accessory vi

An IOS/IPad OS application that demonstrates various capabilities and functions of ARKit and RealityKit.
An IOS/IPad OS application that demonstrates various capabilities and functions of ARKit and RealityKit.

Augmented Reality Development Demos based on ARKit and RealityKit Summary This repository contains an IOS application that shows the capability of App

 BrickKit is a delightful layout library for iOS and tvOS. It is written entirely in Swift!
BrickKit is a delightful layout library for iOS and tvOS. It is written entirely in Swift!

BrickKit is a delightful layout library for iOS and tvOS. It is written entirely in Swift! Deprecated BrickKit is being phased out at Wayfair, and the

Powerful autolayout framework, that can manage UIView(NSView), CALayer and not rendered views. Not Apple Autolayout wrapper. Provides placeholders. Linux support.
Powerful autolayout framework, that can manage UIView(NSView), CALayer and not rendered views. Not Apple Autolayout wrapper. Provides placeholders. Linux support.

CGLayout Powerful autolayout framework, that can manage UIView(NSView), CALayer and not rendered views. Has cross-hierarchy coordinate space. Implemen

Comments
  • Swift 3 version

    Swift 3 version

    Hello, I am very appreciate your project.

    By the way , could you please update to compatible for Swift 3 syntax? I tried to convert it by myself, but I have some trouble with doing it. Please help me.

    Thanks and best regards.

    Mingxing

    opened by StackMobile 3
Owner
Takuya Okamoto
Product Designer
Takuya Okamoto
An easy way to create and layout UI components for iOS (Swift version).

Introduction Cupcake is a framework that allow you to easily create and layout UI components for iOS 8.0+. It use chaining syntax and provides some fr

nerdycat 288 Oct 9, 2022
Decathlon Design System UI components for iOS & iPadOS applications

Vitamin iOS Decathlon Design System libraries for iOS & iPadOS applications Website Introduction Decathlon Design System is the framework that helps o

Decathlon 24 Dec 15, 2022
Make your notification banners smaller and add some color to them

Liddell Liddell notification banners Installation Add this repository to your Package Manager: https://repo.litten.love Install Liddell Compiling Depe

alexandra 34 Dec 22, 2022
A SwiftUI proof-of-concept, and some sleight-of-hand, which adds rain to a view's background

Atmos A SwiftUI proof-of-concept, and some sleight-of-hand, which adds rain to a view's background. "Ima use this in my app..." Introducing Metal to S

Nate de Jager 208 Jan 2, 2023
LemonadeDeclarativeUI framework contains some new functions for UIKit

LemonadeDeclarativeUI framework contains some new functions for UIKit. This library has been developing. If you want to contribute reach me!

Özgür Elmaslı 0 Jan 2, 2022
Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]

Extremely Fast views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainabl

layoutBox 2.1k Dec 22, 2022
Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast

Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]

layoutBox 2.1k Jan 2, 2023
Alignment Control is a component to align top, middle, bottom, left, center, right.

AlignmentControl is a component for alignment Direction AlignmentDirection Horizontal Vertical Mode AlignmentMode Left Center Right Top Middle Bottom

Beslan Tularov 38 Mar 16, 2022
✂ Easy to use and flexible library for manually laying out views and layers for iOS and tvOS. Supports AsyncDisplayKit.

ManualLayout Table of Contents Installation Usage API Cheat Sheet Installation Carthage Add the following line to your Cartfile. github "isair/ManualL

Baris Sencan 280 Sep 29, 2022
MisterFusion is Swift DSL for AutoLayout. It is the extremely clear, but concise syntax, in addition, can be used in both Swift and Objective-C. Support Safe Area and Size Class.

MisterFusion MisterFusion makes more easier to use AutoLayout in Swift & Objective-C code. Features Simple And Concise Syntax Use in Swift and Objecti

Taiki Suzuki 316 Nov 17, 2022