How to broadcast video from Android with a score card section embedded into it

I would like to know how I can I embed a score card into the streaming video. The score card is a bit complex with values coming from server. I need to update the values on the go. Currently, I managed to generate a WZBitmap from an xml file and registered to the WZCameraView with registerFrameRenderer. The code snippet is as given below(Kotlin):

This code displays the image in the broadcast and works fine during initial load. But now I need to update the image based on values obtained from the server on the go, is there any way to get this done with the current implementation?

val inflatedFrame = layoutInflater.inflate(R.layout.layout_box_score_table, null)
val score = inflatedFrame.findViewById(R.id.score) as TextView
score.text = scoreValue
val frameLayout = inflatedFrame.findViewById(R.id.screen) as FrameLayout
frameLayout.isDrawingCacheEnabled = true
frameLayout.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),
        View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED))
frameLayout.layout(0, 0, convertDpToPx(200F), convertDpToPx(100F))
frameLayout.buildDrawingCache(true)
val bm = frameLayout.drawingCache
mWZBitmap = WZBitmap(bm)
mWZBitmap!!.setPosition(WZBitmap.LEFT, WZBitmap.TOP)
mWZBitmap!!.setScale(0.37f, WZBitmap.FRAME_WIDTH)
mWZCameraView!!.registerFrameRenderer(mWZBitmap)

I need to update the values on the go.

geometrydashfree.com

Currently, updating the image will result in a black square. Wowza know about this issue but are not fixed it. It would be nice if they could fix this issue since we also need to do the exact same thing as you.

Someone writing about the issue in 2016 https://github.com/WowzaMediaSystems/gocoder-sdk-samples-android/issues/2 “If this still occurs, please open a new issue and provide the logging. Thanks!”

Hi @Martin Wiklund,

I managed to get this done. Please check on the following link: https://stackoverflow.com/a/51609700/1826526

Thank you so much for this, got it to work! Did you manage to do this is iOS too?

Thank you Rino and Martin for sharing this info for others on our forum. If anyone is still having a problem, please go here for more help. https://www.wowza.com/support.

@Martin WiklundOut team managed to get this done in ios also. Not sure about the implementation though.

Could you ask them how they managed to do that? You don’t need to share any code if you don’t want to. But if you could point me in the right direction would be super helpful. Been stuck with this problem for some time now… Thanks you so much for your help, I really appreciate it!

@Martin Wiklund Check the SO thread which has been updated with the ios implementation

https://stackoverflow.com/a/51609700/1826526