We have been trying to integrate the mux-stats-sdk-avplayer library with our Swift iOS App and are seeing many instances where data in the Mux Data/Metrics dashboards is reported as either [Null Value]
or [No Value]
As best we can tell we are following the guidance from: https://docs.mux.com/docs/avplayer-integration-guide
We are using Mux-Stats-AVPlayer version 1.7.0
Here are some snippets of our implementation:
MUXSDKCustomerPlayerData
initialisation
self.avPlayerLayer = avPlayerLayer
muxPlayerData = MUXSDKCustomerPlayerData(environmentKey: envKey)
muxPlayerData?.playerVersion = playerVersion
muxPlayerData?.playerInitTime = NSNumber(value: Date().timeIntervalSince1970)
muxPlayerData?.playerName = MuxMonitoring.playerName
muxPlayerData?.viewerUserId = userId
Reporting MUXSDKCustomerVideoData
on first item load or changing to a new playback item.
let muxVideoData = videoData(currentItem: playerItem)
if muxPlayerBinding == nil {
muxPlayerBinding = MUXSDKStats.monitorAVPlayerLayer(
self.avPlayerLayer,
withPlayerName: MuxMonitoring.playerName,
playerData: playerData,
videoData: muxVideoData
)
} else {
MUXSDKStats.videoChange(forPlayer: MuxMonitoring.playerName, with: muxVideoData)
}
Note our application is playing audio only content using AVPlayer
in case that is of any relevance.
The behaviour we are seeing is inconsistent, sometimes the metadata associated with the audio played is reported correctly, but more often then not, every piece of meta data shows as [Null Value]
or [No Value]
.
Are you able to offer any advice or suggestions please?