Capture maps (google, mapbox, etc.) in Session Replay
Description
There's a discord thread about mapbox not working https://www.npmjs.com/package/@rnmapbox/maps. That's probably due to them doing rendering in native directly to opengl. My impression was that it's possible to capture this still, because I have seen google maps in some replays. But we'd have to investigate mapbox.
Investigated this and the results are the following:
| SDK / Strategy | PixelCopy | Canvas |
|---|---|---|
| Google Maps | ✅ | ❌ |
| Mapbox | ❌ | ❌ |
So only PixelCopy + GoogleMaps is supported. Mapbox likely can't be captured because it uses a custom TextureView/GL stuff.
However, there's a way to capture those for both in both strategies I think, but we'll likely have to introduce a separate replay module that compilesOnly google maps and mapbox. Then at runtime we'd check if the hierarchy contains one of those, and then use the snapshot() API which both expose, and which returns a Bitmap snapshot of the current map view that we could use as replay frame.
I'm going to convert this issue into a feature request and backlog it for now.