agent screen recording on ccaip

This feature of agent screen recording on CCAIP allows supervisors and trainers to review recorded interactions to ensure agents follow protocols, provide high-quality service, and handle queries effectively. These recordings can be used to identify areas for improvement and provide targeted training to agents.
The idea I came up with is to build an application for CCAIP where, when the consumer requests an agent, a notification will pop up on the agent adapter within CCAIP. This event will trigger the start of screen recording. When the user ends the chat, that event will stop the screen recording.
The challenges that i am facing are Automate Screen Recording Based on Events and Embedding code on the CCAI platform.
how can i overcome this challenges