doumao6048 2018-11-03 12:06
浏览 57
已采纳

如何阻止浏览器下载可以使用的音频和颜色

I have an appointment booking form which has a number of audio files included in the full version for such things as success, error, clicking on objects etc, mostly small sound files to enhance the users experience but as these delay loading of the page/system, in some cases for a couple of seconds or more on slow internet connections, I need to find a way to prevent the users system downloading these audio files if their system is unable to play the sound or has their volume set to mute or just have no audio drivers or hardware in their device and conversely, to show a message to those with audio systems that the system is downloading audio for their benefit or some message to that effect or even a button to skip loading them.

NOTE: Please be aware that many of my users have internet connections that run at or near 500KB/s or 0.5 Mb/s. Some have full 90MBPS but the majority are under 2MBPS as most are connected through "pensioner" or "restricted" internet plans that are very cheap but also VERY slow! - think dial-up @ 56K (x 10).

I have looked for ways to get the volume level from the device the page is displayed on but nothing seems to be a solution on how to stop their browsers downloading the files and then being unable to actually play them.

I also wanted to find out for the same users if the user has a restricted colour scheme or pallet eg, 16 colours in order to present them with a different page designed to work with their limited colours by disabling such things as gradients and images and enhancing the contrast of object classes so they show what was intended instead of showing empty white or black spaces in place of what were shades of various colours.

These requests are all for the same system to make my system as inclusive as possible for all my users regardless of their visual, auditory or physical dexterity or abilities so they can use my system with the least amount of effort as possible. I am quite happy to build multiple pages but I need a way to detect the users environment in order to automatically direct them to the right place for their abilities instead of asking them to click a button to go to high contrast colour scheme or another button to play louder sounds or another to have no sounds etc etc.

My users are a mix of mostly elderly people with vision and/or hearing limitations as well as those with substantial limitations in their ability to understand questions such as "do you use high contrast colours" or "does your device have audio devices installed" or other questions I would otherwise have to ask them in order for them to get to use the page that bests suits their abilities. NOTE: Some of my users are still using Pentium-4 systems with CRT 640x480 pixel screens.

In short, I want to create an "all abilities, inclusive, accessible website and booking system" that doesn't have to ask users too much about their abilities but can auto detect as much as possible about their devices environment and make it invisible to these end users. The majority of these users have had their carers or IT people set up their devices with these restricted or ease of access settings, I just want to be able to detect them to make their experience on my web site as simple and as non-stressful as possible.

  • 写回答

1条回答 默认 最新

  • dpdbu24262 2018-11-03 12:46
    关注

    The security restrictions on JQuery and client side scripted code that can be run inside a web browser do not offer enough access to their host OS to get the information your looking for.

    I would suggest that if your clients are regular users of your system, ask them or their carers or their IT people to install a software app (you would need to design) on their devices that could possibly take their systems state and then send the data to you through an API call or using AJAX to a PHP script on your server or by a remote SQL server connection. You could even have that software with a link on the page your users load (if they are have not already sent their system info to you) then once that was installed and you had the data, you could use the stored data and perhaps a stored cookie on the clients device to confirm they are "registered" with you and then direct them as you want to the web site or page that best suits their abilities.

    It might be possible with a browser plugin but these days, browsers are very cautious about providing access to their host systems system drive or OS so it might not be enough access to provide what your after.

    I haven't coded any Windows ".exe" software for many years - last time was in the 90s in C++ and Turbo Pascal but I would think you could do this in C sharp or another similar language that compiles a Windows based .exe and for those on "Apple" platforms, a ".dmg" ?? executable as well. Not sure what you would do with those using Andriod and iPad tablets unless you designed an app as well but that is a lot of work (so I have been told) !

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 输入的char字符转为int类型,不是对应的ascall码,如何才能使之转换为对应ascall码?或者使输入的char字符可以正常与其他字符比较?
  • ¥15 解决websocket跟c#客户端通信
  • ¥30 Python调用dll文件输出Nan重置dll状态
  • ¥15 浮动div的高度控制问题。
  • ¥66 换电脑后应用程序报错
  • ¥50 array数据同步问题
  • ¥15 pic16F877a单片机的外部触发中断程序仿真失效
  • ¥15 Matlab插值拟合差分微分规划图论
  • ¥15 keil5 target not created
  • ¥15 C/C++数据与算法请教