Giter Club home page Giter Club logo

ios-kinescope-player's Introduction

Kinescope iOS SDK

Pub Version

This framework created to help you include Kinescope player into your mobile iOS application.

About

This framework can help you include customizable video player into your mobile application, organize offline playing of your videos.

Currently supported features

  • online and offline playing
  • fullscreen, minimal or picture in picture
  • customizable UI of player

Usage

First of all, init SDK with apiKey somewhere at startup of your app

Kinescope.shared.setConfig(.init(apiKey: "your api key"))

From now you can use most of API through SDK

For example, to get list of videos just call

Kinescope.shared.inspector.list(request: .init(page: 1),
                                onSuccess: { result in

                                  let videos = result.0
                                  // save video models somewhere

                                  let metaData = result.1
                                  // check metadata
                                })

Than init player instance

let player = KinescopePlayer(videoId: "some video id")

Add player view somewhere in your layout

let playerView = KinescopePlayerView()
view.addSubview(playerView)

Connect player and playerView together

player.attach(view: playerView)

Enjoy.

All controls already included into KinescopePlayerView and can be hidden optionally. You can read full documentation or find more examples in our Example-project.

Logger

For logging network request, player events or something else use KinescopeDefaultLogger.

First step is set KinescopeLoggerLevel into configuration at application startup:

Kinescope.shared.set(logger: KinescopeDefaultLogger(), levels: [KinescopeLoggerLevel.network, KinescopeLoggerLevel.player])

Use logger like this:

Kinescope.shared.logger.log(message: "Bad Request", level: KinescopeLoggerLevel.network)

or

Kinescope.shared.logger.log(error: NSError(), level: KinescopeLoggerLevel.network)

Also SDK has opportunity to use custom logger. Just use protocols KinescopeLoggingLevel, KinescopeLogging.

Installation

Just add KinescopeSDK to your Podfile like this

pod 'KinescopeSDK' ~> 0.1

If you have any issues with method above, than you can specify git repo like this

 pod 'KinescopeSDK', :git => 'https://github.com/kinescope/ios-kinescope-player.git'

Also you can specify concrete branch or tag if you want

 pod 'KinescopeSDK', :git => 'https://github.com/kinescope/ios-kinescope-player.git', :branch => 'master'

Changelog

All notable changes to this project will be documented in this file.

Issues

For issues, file directly in the main repo.

Contribute

If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our contribution guide first and send us your pull request.

You PRs are always welcome.

How to reach us

License

MIT License

ios-kinescope-player's People

Contributors

artemiishabanov avatar drxlx avatar kinescoper avatar kshvakov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.