Skip to main content

VideoMetaDataMap

What's the videoMetaDataMap?​

The videoMetaDataMap(videoDataNode) is a DivaBOAdapter field you can observe the update of the field and change value before sending data to the Diva Player

  • Receives the VideoMetadata within the videoMetadata object
  • Can modify the videoMetadata properties value
  • Returns the videoMetadata object

Value the videoMetaDataMap parameter when

  • You need to get some videoMetadata properties' value to implement front-end business logic.
  • You need to alter runtime some videoMetadata properties' value.

Sample code​

sub launchBOAdapter(divaLaunchParams as object)
...
' Observe BO Adapter VideoMetaDataNode
m.boAdapterNode.observeField("videoDataNode", "onBOAdapterVideoDataNodeHandler")
...
end sub

sub onBOAdapterVideoDataNodeHandler(evt as dynamic)
videoMetadata = evt.getData()

' get the videoMetadata when calls this observer
' write videoMetadata properties and implement your front-end business logic <---
' send the videoMetadata to the Diva Player'

' Setup Diva Player Metadata
m.dpUtilsNode.callFunc("setMetaData", videoMetadata)
end sub