Add script to play media and set repeat state

As we can only perform a single action on tapping a button or title in a dashboard we create a script to perform multiple actions. It will also simplify the dashboard code.