PlayerEmsgHandler
@UnstableApi
class PlayerEmsgHandler : Handler.Callback
Handles all emsg messages from all media tracks for the player.
This class will only respond to emsg messages which have schemeIdUri "urn:mpeg:dash:event:2012", and value "1"/"2"/"3". When it encounters one of these messages, it will handle the message according to Section 4.5.2.1 DASH -IF IOP Version 4.1:
- If both presentation time delta and event duration are zero, it means the media presentation has ended.
- Else, it will parse the message data from the emsg message to find the publishTime of the expired manifest, and mark manifest with publishTime smaller than that values to be expired.
Summary
Nested types |
|---|
interface PlayerEmsgHandler.PlayerEmsgCallbackCallbacks for player emsg events encountered during DASH live stream. |
inner class PlayerEmsgHandler.PlayerTrackEmsgHandler : TrackOutputHandles emsg messages for a specific track for the player. |
Public constructors |
|---|
PlayerEmsgHandler( |
Public functions |
|
|---|---|
Boolean |
handleMessage(message: Message!) |
PlayerEmsgHandler.PlayerTrackEmsgHandler! |
Returns a |
Unit |
release()Release this emsg handler. |
Unit |
updateManifest(newManifest: DashManifest!)Updates the |
Public constructors
PlayerEmsgHandler
PlayerEmsgHandler(
manifest: DashManifest!,
playerEmsgCallback: PlayerEmsgHandler.PlayerEmsgCallback!,
allocator: Allocator!
)
| Parameters | |
|---|---|
manifest: DashManifest! |
The initial manifest. |
playerEmsgCallback: PlayerEmsgHandler.PlayerEmsgCallback! |
The callback that this event handler can invoke when handling emsg messages that generate DASH media source events. |
allocator: Allocator! |
An |
Public functions
newPlayerTrackEmsgHandler
fun newPlayerTrackEmsgHandler(): PlayerEmsgHandler.PlayerTrackEmsgHandler!
Returns a TrackOutput that emsg messages could be written to.
updateManifest
fun updateManifest(newManifest: DashManifest!): Unit
Updates the DashManifest that this handler works on.
| Parameters | |
|---|---|
newManifest: DashManifest! |
The updated manifest. |