Interface Broadcaster.LocalMediaObserver

Enclosing class:
Broadcaster

public static interface Broadcaster.LocalMediaObserver
An Observer interface that should be passed to storeLocalMedia(path, observer) or storeLocalMedia(fileDescriptor, observer) to receive callbacks while recording a local copy of a broadcast. All callbacks are done on the main UI thread.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onLocalMediaClosed(boolean success)
    Called when local media writing has stopped.
  • Method Details

    • onLocalMediaClosed

      void onLocalMediaClosed(boolean success)
      Called when local media writing has stopped. After this call, it is safe to access any created file and trigger media scanning.

      If a broadcast is stopped before any data is produced, the library will not write anything and this callback may return false.

      If finalization fails (for example if the storage is abruptly filled or external media is ejected), the library may leave a temporary file with video data you may be able to salvage.

      Parameters:
      success - True if the the file was successfully written, false otherwise.