A lightweight SDK that allows for easy integration of eko projects into an iOS app
This is the view in which the eko player will reside. It will also forward any events from the player to the rest of the app.
Clears all the all EkoPlayerView's Webview data, including: cache, cookies and javasctript storage. NOTE: Since Webview data in iOS is shared at the app level, calling this method will clear the data for all of the app's Webviews.
See EkoPlayerViewDelegate for more information
optional. If no delegate is set, urls will be opened in the default browser. See EkoUrlDelegate for more information
optional. If no delegate is set, urls will be shared via the native iOS share dialog. See EkoShareDelegate for more information
App name is for analytics purposes. Will default to the bundle id if not set. Warning: setting this property will reset the entire webview.
The EkoPlayerView can be initialized programmatically or included via storyboard.
Will load and display an eko project. The EkoPlayerView will display the loading animation while it prepares the project for playback.
Param | Type | Description |
---|---|---|
projectId | String |
The id of a project to display |
options | EkoOptions |
Options for project delivery. See EkoOptions for more details. |
Will attempt to begin playing an eko project. Any errors will be reported via the EkoPlayerViewDelegate. Errors could occur if you attempt to call play before the player is ready.
Will attempt to pause an eko project. Any errors will be reported via the EkoPlayerViewDelegate. Errors could occur if you attempt to call pause before the player is ready.
Will call any player function defined on the developer site and return the response via callback function.
Param | Type | Description |
---|---|---|
method | String |
The player method to call. |
args | [Any] |
Any arguments that should be passed into the method (must be serializable to json) |
errorHandler | Function |
Error handler. |
This is a protocol that the app should implement. Events and other information will be passed to the app from the SDK via the delegate.
The eko player triggers a number of events. The app can listen to these events by providing the event name in the load call. This function will be called whenever an event passed in to load()
is triggered.
Param | Type | Description |
---|---|---|
event | String |
The name of the event fired. |
args | [Any] |
Any arguments that might have been passed along when the event was fired. |
Called whenever an error occurs. This could happen in the loading process (if an invalid project id was given or we fail to open the link to the project), or if an event is passed in with malformed data (missing an event name, etc).
Param | Type | Description |
---|---|---|
error | Error |
An error with a description of the issue. |
Delegate for link out events..
There can be link outs from within an eko project. This function will be called whenever a link out is supposed to occur. The delegate is responsible for opening the url.
Param | Type | Description |
---|---|---|
url | String |
The url to open. |
Delegate for share intents.
There can be share intents from within an eko project via share buttons or ekoshell. This function will be called whenever a share intent happened.
Param | Type | Description |
---|---|---|
url | String |
The canonical url of the project. |
A list of embed params that will affect the delivery.
A list of events that should be forwarded to the app
A UIView to cover the loading of the eko project. Set to nil
to disable.
Will be initialized by the EkoPlayerView.
Triggered when the player has buffered enough media to begin playback. Only added if showCover=true
and autoplay=false
Only added if showCover=true
and autoplay=true
Please note this is a static framework. If you would like to use the dynamic version, please download the repo, and change MACH_O_TYPE
to dynamiclib
and rebuild. The storyboard compatibility is only available with the dynamic framework.