MCPcopy Index your code
hub / github.com/microsoft/playwright-python / _dispatch_frame

Method _dispatch_frame

playwright/_impl/_screencast.py:56–71  ·  view source on GitHub ↗
(self, params: dict)

Source from the content-addressed store, hash-verified

54 page._channel.on("screencastFrame", lambda params: self._dispatch_frame(params))
55
56 def _dispatch_frame(self, params: dict) -> None:
57 if not self._on_frame:
58 return
59 data = params["data"]
60 if isinstance(data, str):
61 data = base64.b64decode(data)
62 result = self._on_frame(
63 {
64 "data": data,
65 "timestamp": params.get("timestamp", 0),
66 "viewportWidth": params["viewportWidth"],
67 "viewportHeight": params["viewportHeight"],
68 }
69 )
70 if hasattr(result, "__await__"):
71 self._page._loop.create_task(result)
72
73 async def start(
74 self,

Callers 1

__init__Method · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected