Player View
VKPlayerView
as opposite to VKPlayerViewController
, is a simple basic player without any controls which can play only single video VKVideo
. It's good option for the cases when you want to have full control over player appearance and behavior. You could also integrate it in your app using two common ways.
#
Interface BuilderIntegrating the player into your app is easy through interface builder. Just follow the following steps:
Go to your Storyboard and head to the view you're interested in embedding the player
Add a view where you want to add player. And in Custom Class area change the type of class to
VKPlayerView
, and enterVideoKitPlayer
to Module field.Insert outlet to the newly created
VKPlayerView
into your view controller.And add some code to make it works.
#
Code IntegrationAnd you can also integrate the player to your app just using code:
For more information about VKPlayerView
see API reference.