简体   繁体   English

如何停止浏览器下载无法使用的音频和颜色

[英]How to stop browsers downloading audio and colours they cant use

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. 注意:请注意,我的许多用户具有500KB / s或0.5 Mb / s或附近的Internet连接。 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! 有些具有完整的90MBPS,但大多数都低于2MBPS,因为大多数是通过“ pensioner”或“受限”互联网计划连接的,这些计划非常便宜,但也非常慢! - think dial-up @ 56K (x 10). -考虑使用@ 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. 我还想为相同的用户找出用户是否具有受限的配色方案或调色板(例如16种颜色),以便通过禁用诸如渐变和图像等功能并增强其功能,为他们提供设计为使用其有限的颜色的不同页面。对象类的对比,因此它们可以显示预期的内容,而不是显示空白的白色或黑色空间来代替各种颜色的阴影。

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. 注意:我的某些用户仍在使用CRT 640x480像素屏幕的Pentium-4系统。

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. 这些用户中的大多数已经让他们的照料者或IT人员使用这些受限或易于访问的设置来设置设备,我只希望能够检测到他们,以使他们在我的网站上的体验既简单又轻松可能。

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. 可以在Web浏览器中运行的JQuery和客户端脚本代码的安全性限制不足以对其主机OS进行足够的访问以获取所需的信息。

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. 我建议,如果您的客户是系统的常规用户,请他们或他们的护理人员或IT人员在他们的设备上安装软件应用程序(您需要设计),该应用程序可能会使其系统处于状态,然后发送数据通过API调用或使用AJAX到服务器上的PHP脚本或通过远程SQL Server连接来访问您。 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. 您甚至可以在用户加载页面的链接上拥有该软件(如果他们尚未将系统信息发送给您),则一旦安装并拥有数据,就可以使用存储的数据,也可以使用存储的数据。客户端设备上的cookie,以确认它们已向您“注册”,然后根据需要将其定向到最适合其功能的网站或页面。

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. 使用浏览器插件可能是可行的,但是如今,浏览器在提供对主机系统,系统驱动器或OS的访问时非常谨慎,因此可能不足以提供您所需要的东西。

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" ?? 我已经多年没有编码任何Windows“ .exe”软件了-上一次是在90年代使用C ++和Turbo Pascal编写的,但是我认为您可以使用C Sharp或另一种编译基于Windows的.exe和对于那些在“ Apple”平台上的用户,一个“ .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) ! 不知道您将如何使用Andriod和iPad平板电脑,除非您也设计了一个应用程序,但这工作量很大(所以有人告诉我)!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM