Skip to content
No description, website, or topics provided.
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
README.md

README.md

BeLive SDK

BeLive SDK is an end-to-end live streaming solution with ready-made UI and content management system which can be integrated in your existing iOS and Android apps with few lines of code. We provide top-notch customizable and flexible API as well as streaming server which is based on Wowza Streaming Engine with deployment option on bare metal or on public cloud provider's infrastructure in a virtual machine or in a docker container.

Throughout this document we will refer to host / broadcaster as source of live stream while viewer or audience as consumer/watcher of live or recorded stream

SDK Architecture

SDK Architecture

API Flow Diagram

API Flow

Shopping API Flow

Features

BeLive SDK provides following core features with flexibility to extend and add-on more features.

  • Start live stream using iOS or Android device
  • Watch live stream on any iOS or Android device. In addition, we also support playback on web browser
  • Record and encode live stream (HLS or mp4 format)
  • Beauty filter for enhancing the live stream experience
  • Live chat for interactivity during live stream
  • Per minute stream statistics (live view count and likes)
  • Watcher list with ability to view profile and photo
  • Live shopping feature with unlimited shop items / products
  • Multiple resolutions supports such as SD, HD and Full HD
  • Stream Password feature for enhanced security and personalization
  • Content Management Sytem to manage stream and live shopping

SDK Package

SDK Package contains following core components

Server/backend/DevOps

  • API Server docker container for easy deployment
  • CMS Server docker container easy deployment
  • Database Tables and config for easy setup on MySQL server
  • Chat Server docker container for easy deployment
  • Wowza scripts for easy deployment

Mobile Apps

  • Android SDK with sample code
  • iOS SDK (framework) with Sample Code

Ready-made UI

Our SDK provides ready-to-use live stream UI for any mobile device screen size. We provide customization option as per client's need and usage. Refer to below screenshots

Live Stream UI

Live Stream UI

SDK Code Example

Android (Kotlin)

  1. Create a new Kotlin file BeLiveSdkNavigator.kt

  2. Copy (Ctrl+C , or ⌘+C on Mac) following code and paste ( Ctrl+V , or ⌘+V on Mac) in file created in step 1

interface BeliveSdkNavigator {
    fun goLive(context: Context)
    fun joinRoom(context: Context)

    companion object{
        fun instance(): BeliveSdkNavigator {
            return BeliveSdkNavigatorIpml()
        }
    }
}

class BeliveSdkNavigatorIpml internal constructor(): BeliveSdkNavigator{
    override fun goLive(context: Context) {
        context.startActivity(Intent(context, BeLiveHostActivity::class.java))
    }

    override fun joinRoom(context: Context) {
        context.startActivity(Intent(BeliveViewerActivity.newIntent(context)))
    }
}
  1. In MainActivity, call goLive(context)for host activity or joinRoom(context) for viewer activity
class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        
        btnGoLive.setOnClickListener {
        // Start a live stream
        // the SDK flow
        // 1. Open prelive screen and input stream info (title)
        // 2. Press 'CREATE' to start streaming
        // 3. When done, a ended stream screen is shown and 
        // user decides to save or discard the record
        BeliveSdkNavigator.instance().goLive(this)
        }
    
        btnJoinRoom.setOnClickListener {
            // Join a live stream
            // the SDK flow
            // 1. Open & play streaming with stream slug
            BeliveSdkNavigator.instance().joinRoom(this)
        
        }
    }
}

iOS (Swift)

SDK provides join live or go live navigation controller out of the box. See the below code for navigating user to host or viewer controller.

class MainViewController: BaseViewController {

    let goLiveAndJoinRoom = GoLiveAndJoinViewController()
        fileprivate var shoul_rotate: Bool = false
        var isStatusBarHidden: Bool = false {
            didSet{
                UIView.animate(withDuration: 0.5) { () -> Void in
                    self.setNeedsStatusBarAppearanceUpdate()
                }
            }
        }
        override func viewDidLoad() {
            super.viewDidLoad()

            self.navigationController?.setNavigationBarHidden(true, animated: true)
            isStatusBarHidden = true
            self.addChild(goLiveAndJoinRoom)
            addChildToContainer(parent: self.view, child: goLiveAndJoinRoom.view)
            goLiveAndJoinRoom.didMove(toParent: self)
            
            }
   }
You can’t perform that action at this time.