If you need to use the floating button only to pause and restart the crunchyroll video, this code can help you.
But if you have to do more I must have more information about the crunchyroll API (if any)
The operation is as follows:
When you click the pause button, a transparent activity opens. Crunch loses the foreground and pauses the video.
If you click the play button, the transparent task closes and returns the foreground to the one that continues with the video.