Skip to content

MediaCore(Kotlin)

Ray edited this page Aug 24, 2021 · 5 revisions

Overview

Straas MediaCore SDK provides functions to interact with Straas media like get video information or play a live event.

Getting Started

This will show you how to use MediaCore SDK in kotlin.

To use straas-media-core-kt, you will need to many execute suspend functions, so you need a CoroutineScope.
In our example, we use lifecyclescope as the CoroutineScope.

Add Straas Android SDK

Add dependency of SDK straas-media-core-kt in gradle file and configure your app.
See Add Straas Android SDK for more information.

Using MediaCore

These are main components of straas-media-core-kt, please see each pages for more information:

  • MediaApiManager: Get media information
  • StraasPlayer: Player for Straas media
  • LiveEventListener: Observer of live event broadcast state and other properties