opencv is for computer vision. you are not supposed to make a video player with it merely because it can decode video files. wrong library. it’s like using a wrench to steer a car that lost its steering wheel.
you could control VLC:
- How can i Control VLC media player through a Python scripte - Stack Overflow
- Python bindings - VideoLAN Wiki
or you might want to look into doing this in a web browser instead.
if your “button” can act like a regular key on a keyboard (or you can send key press events), then some javascript in a page in the browser can just handle that key event.