gpt4 book ai didi

ios - AccessibilityTraits StartsMedia 不起作用

转载 作者:行者123 更新时间:2023-11-29 06:02:50 29 4
gpt4 key购买 nike

我试图在 iOS 移动设备上点击音频组件时强制 VoiceOver 停止。我在文档中看到的只是 accessibilityTraits StartsMedia 执行此操作的声明和理论解释,但找不到任何真正的实现。在 RX.View 上设置 accessibilityTraits={RX.Types.AccessibilityTrait.StartsMedia} 属性是否正确?

最佳答案

https://developer.apple.com/documentation/uikit/uiaccessibility/uiaccessibilitytraits/1620173-startsmediasession听起来很清楚,虽然它谈论的是 startsMediaSession,而不是 StartsMedia,但也许 OP 的意思是startsMediaSession。

Use this trait to silence the audio output of an assistive technology, such as VoiceOver, during a media session that should not be interrupted. For example, you might use this trait to silence VoiceOver speech while the user is recording audio.

另一个解释位于Deque's site .

When a VoiceOver user double taps the screen on a button, the button is clicked, and the label of the button repeated to the user. This would obviously be frustrating if the purpose of the button were to play a sound! Especially a short sound. Interrupting the first few seconds of Yellow Submarine isn’t the end of the world, but what if a user is checking out new alert sounds? The sound may be shorter than the announcement! This would be highly frustrating. Applying this trait to a button stops this behavior, canceling any announcement, allowing sounds played as a result of interaction with the control to be heard.

关于ios - AccessibilityTraits StartsMedia 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51377510/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com