Automate YouTube apk using Appium

Hi,
I want to automate YouTube apk using Appium. The scenario is to click the playing video content and need to click the pause button and hold it for n seconds and again I need it to play. So how could I achieve it. Can you please help me?