This framework created to help you include Kinescope player into your mobile iOS application.
This framework can help you include customizable video player into your mobile application, organize offline playing of your videos.
- online and offline playing
- fullscreen, minimal or picture in picture
- customizable UI of player
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.
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
.
Just add KinescopeSDK to your Podfile
like this
pod 'KinescopeSDK' ~> 0.1
All notable changes to this project will be documented in this file.
For issues, file directly in the main repo.
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.