This SDK is intended for customers of MyCujoo Live Services. It offers a video player, overlays, analytics and more. It currently supports iOS and tvOS.
Swift package manager
If you want to install our SDK via the Xcode UI, go to your Project Settings -> Swift Packages and add MLSSDK from there.
To integrate using Apple's Swift package manager, without Xcode integration, add the following as a dependency to your
CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate our SDK into your Xcode project using CocoaPods, specify it in your
pod 'MLSSDK', '~> 1.1'
For any interaction with our SDK, you will first need to instantiate an
MLS object. This requires a public key (which can be obtained through the MLS console at https://mls.mycujoo.tv), and a configuration. You will need to retain a strong reference to this
MLS object while using any of its components.
To render a basic video player, you must:
- instantiate a
VideoPlayerobject. This can be done via the
videoPlayer(with: Event?)method on your
MLSobject. Keep in mind that each new call to this method instantiates a new object.
- Place the
playerViewproperty within your app's view hierarchy.
- Load an
Eventobject into the video player (which represents an event that you have previously created through the MLS Console or the MLS API). To obtain an
Eventobject, you can use the
dataProviderconnects to the MLS API to obtain a single event (by id) or a list of events.
For example code, see the
Examples folder. The most straightforward example can be found in