pyatv icon indicating copy to clipboard operation
pyatv copied to clipboard

Added touch gesture to companion protocol

Open albaintor opened this issue 8 months ago • 30 comments

Hi, I have added the implementation of touch gestures and updated the documentation.

I have tested it successfully. To test it :

atv = await pyatv.connect(config, loop)
companion = cast(FacadeRemoteControl, atv.remote_control).get(Protocol.Companion)
if companion:
    api: CompanionAPI = companion.api
    # Simulate a gesture from x=100, y=100 to x=1000, y=1000 in 1000 milliseconds
    await api.touch_gesture(100, 100, 1000, 1000, 1000)

albaintor avatar Jun 18 '24 10:06 albaintor