swiftui-pipify icon indicating copy to clipboard operation
swiftui-pipify copied to clipboard

Explore Accessibility Options

Open Sherlouk opened this issue 2 years ago • 1 comments

This component does not currently have any accessibility considerations.

As we are converting an accessible view into an image and then a video stream, the original accessibility metadata is lost. Users using a screen reader (or similar technology) may not be able to use this feature.

This tickets is open as a reminder that I would like to look into this further. I am currently unfamiliar with accessibility in general for "typical" PiP use cases - as in, actual video content. However, I would expect video captions to usually be available through PiP - we may be able to utilise this and provide accessibility data through captions.

If anybody has information that may be helpful then please drop a comment below!

Sherlouk avatar Jul 01 '22 12:07 Sherlouk

After diving into the view hierarchy, it does appear that there is an internal 'FigSubtitleCALayer' present which likely means captions are possible.

I've explored quite a lot of different posts (the most promising linked below) but have been unable to find the perfect combination of APIs to allow us to inject subtitles into our buffer layer.

https://developer.apple.com/forums/thread/700128 https://github.com/norio-nomura/DisplayLinkPlayer/blob/master/DisplayLinkPlayer/SampleBufferDisplayLayerView.swift

It might be that we need to essentially implement an AVPlayer, and route through the view buffer to that which will allow us to add both audio (#11) and subtitles/captions.

Sherlouk avatar Jul 03 '22 14:07 Sherlouk