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)