简体   繁体   English

使用 <audio> 用adobe空气标记

[英]Using the <audio>Tag with adobe air

Is there a way to use the html5 audio tag within an adobe air application- without using javascript that is? 有没有办法在adobe air应用程序中使用html5音频标签 - 不使用javascript? It is not ridiculously hard to play audio files with javascript but I was just wondering if its possible to simply use the audio tag in some way within the app. 使用javascript播放音频文件并不是一件非常难的事,但我只是想知道是否可以在应用程序中以某种方式简单地使用音频标签。 Of course the audio tag works in all my browsers but it's simply a no show within air. 当然,音频标签适用于我的所有浏览器,但它只是一个空中无节目。 Any help is appreciated. 任何帮助表示赞赏。

It's probably that the version of webkit AIR includes doesn't support that feature or there is a security sandbox violation perhaps. 可能是webkit AIR包含的版本不支持该功能,或者可能存在安全沙箱违规。 Not sure why you need to use the audio tag when you can simply load and play a sound. 当您只需加载和播放声音时,不确定为什么需要使用音频标签。 If it needs to be per-page you can even use the HTML location change event handler attached to the HTMLLoader object, check the location of the browser in this event (which is called when the user has navigated elsewhere) and then play sounds or do whatever this way. 如果它需要是每页,您甚至可以使用附加到HTMLLoader对象的HTML位置更改事件处理程序,检查此事件中浏览器的位置(当用户在别处导航时调用),然后播放声音或执行无论如何。 But anyway I'm sure its just the version of webkit they are using. 但无论如何,我确信它只是他们正在使用的webkit版本。 They also strip it down and remove various features to make people happy, IE apple so they can submit apps using webkit with only features that apple would approve of. 他们还将其删除并移除各种功能以使人们开心,IE苹果因此他们可以使用webkit提交应用程序,只有苹果会赞同的功能。

Reference: 参考:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/Event.html#LOCATION_CHANGE http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/Event.html#LOCATION_CHANGE

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

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