Paging Video UI, and some control components is available.

Related tags

Video 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...
Support customization of any player SDK and control layer
Support customization of any player SDK and control layer

Support customization of any player SDK and control layer

A video composition framework build on top of AVFoundation. It's simple to use and easy to extend.
A video composition framework build on top of AVFoundation. It's simple to use and easy to extend.

A high-level video composition framework build on top of AVFoundation. It's simple to use and easy to extend. Use it and make life easier if you are implementing video composition feature.

▶️ video player in Swift, simple way to play and stream media on iOS/tvOS

Player Player is a simple iOS video player library written in Swift. Looking for an obj-c video player? Check out PBJVideoPlayer (obj-c). Looking for

A set of tools to trim, crop and select frames inside a video

PryntTrimmerView A set of tools written in swift to crop and trim videos. Example To run the example project, clone the repo, and run pod install from

Repository with base samples for playing HLS/DASH with CMAF video, across as many platforms as possible. Includes steps for encoding and packaging your own test content.

Video Everything Repository with minimal samples for playing HLS/DASH with CMAF video, across as many platforms as possible. Content and License All t

Swift Package used for video where I demonstrate how to extract a package to a local framework and modify it.
Swift Package used for video where I demonstrate how to extract a package to a local framework and modify it.

SegmentedPicker NOTE: This sample code is taken from the article by Frank Jia in his article titled Build a Custom iOS Segmented Control With SwiftUI

YouTube video player for iOS, tvOS and macOS
YouTube video player for iOS, tvOS and macOS

About XCDYouTubeKit is a YouTube video player for iOS, tvOS and macOS. Are you enjoying XCDYouTubeKit? You can say thank you with a tweet. I am also a

A Photo and Video Gallery
A Photo and Video Gallery

================== bitcoin:1Lj45X69tPYAPqnZP2c9Ccs349fC2CEMQo Podfile platform :ios, '7.0' pod 'MHVideoPhotoGallery' Supported Videos Youtube Vimeo We

YoutubeKit is a video player that fully supports Youtube IFrame API and YoutubeDataAPI for easily create a Youtube app
YoutubeKit is a video player that fully supports Youtube IFrame API and YoutubeDataAPI for easily create a Youtube app

YoutubeKit YoutubeKit is a video player that fully supports Youtube IFrame API and YoutubeDataAPI to easily create Youtube applications. Important Ref

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
iOS video player for trailer. You can customize layout for the control panel. Support PiP and DRM.

iOS video player for trailer. You can customize layout for the control panel. Support PiP and DRM.

Abe Wang 11 Nov 7, 2022
Video mp4 record save display - How to Take , Save and Display a .mp4 Video

Technicalisto How to Take , Save and Display a .mp4 Video Add your design with v

Aya Baghdadi 2 Aug 7, 2022
Video view controller with Periscope fast rewind control

Periscope-VideoViewController Video view controller with Periscope fast rewind control. Tutorial on how to create this component can be found here. Re

Danil Gontovnik 504 Dec 20, 2022
A fully functional short video app project.Record a six secends video while playing prank sounds.

prankPro A fully functional short video app project How to Install 1. use coconapod to init your xcode environment. 2. change the app-keys in `applica

huijimuhe 258 Jun 19, 2022
JDVideoKit - You can easily transfer your video into Three common video type.

JDVideoKit Introduction You can easily transfer your video into Three common video type. You can use set up camera easily. Installation pod 'JDVideoK

郭介騵 24 Sep 9, 2021
A Swift library to upload video files to api.video platform.

api.video IOS video uploader api.video is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and manag

api.video 7 Dec 9, 2022
api.video is the video infrastructure for product builders

api.video is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.

api.video 4 Jun 27, 2022
High-performance and flexible video editing and effects framework, based on AVFoundation and Metal.

High-performance and flexible video editing and effects framework, based on AVFoundation and Metal.

BearRuan 650 Dec 30, 2022
Yattee: video player for Invidious and Piped built for iOS 15, tvOS 15 and macOS Monterey

Video player with support for Invidious and Piped instances built for iOS 15, tvOS 15 and macOS Monterey.

Yattee 1k Dec 27, 2022
Yattee: video player for Invidious and Piped built for iOS, tvOS and macOS

Video player for Invidious and Piped instances built for iOS, tvOS and macOS. Features Native user interface built with SwiftUI Multiple instances and

Yattee 1.1k Jan 8, 2023