问题描述
我需要一个可嵌入的音频播放器,可以播放IE,FF和Chrome中的wav文件。转换为mp3(或任何其他格式)目前不是一个选项。这个播放器应该是非常简单的,只有一个播放/暂停按钮,也许一个时间轴栏用户可以点击进入音频的特定部分。
在一个页面上也应该有一个简单的方法来让这个音频播放器有多个实例。
我已经找到了从功能丰富(复杂)到简单的解决方案的信息,但似乎没有提供我需要的信息。
$ b
如果这个玩家带有任何类型的教程,这将是一个奖金。我知道我可能需要用< embed> 来创建一个< obj> 这项工作在所有三个浏览器。
理想的解决方案是一个.swf文件,我可以把我的web应用程序源代码,并可以参考HTML。
是否存在这样的解决方案?是否Flash甚至支持.wav(raw)?
我发现了一些接近我想要的东西: b
$ b
它会播放本地的wav文件存储在index.html和.swf中。然而,如果我改变对象参数(和嵌入src)到类似于
< param name =movievalue = wavplayer.swf GUI =全&安培; H = 20&安培; W = 300安培;声音= HTTP://someserver/some/path/to/a/wavFile.wav/>
不起作用。我找不到(俄文翻译成英文)网站上的任何内容,或者在自述文件中找到加载http上的wav或链接应该工作的任何内容。也许有人熟悉Flash开发可以读取代码,看看是否有可能?
编辑:
有人建议crossdomain.xml可能是问题。我在以上路径的some目录中添加了以下内容:
<?xml version =1.0?> ;
<跨网域政策>
< allow-access-from domain =*/>
< / cross-domain-policy>
不过,我仍然无法播放wav文件。
I need an embeddable audio player that will play wav files in IE, FF, and Chrome. Converting to mp3 (or any other format) is not an option at this time.
This player should be very simple with only a play/pause button and perhaps a timeline bar that a user could click to go to a specific part of the audio.
There also should be an easy way to have multiple instances of this audio player on a single page.
I've found information on solutions that range from very feature-rich (complex) to simple, but none seemed to provide what I need.
If this player comes with any sort of tutorial, that would be a bonus. I know I will probably have to create an <obj> with an <embed> inside of it to make this work in all three browsers.
The ideal solution is just a .swf file that I can put into my webapp source and can reference from the html.
Does a solution like this exist? Does flash even support .wav (raw)?
I found something close to what I want here:
It will play a wav file that is locally stored with the index.html and .swf. However, if I change the object parameters (and embed src) to something like
<param name="movie" value="wavplayer.swf?gui=full&h=20&w=300&sound=http://someserver/some/path/to/a/wavFile.wav"/>
It does not work. I couldn't find anything on the (Russian translated to English) site or in the README addressing loading a wav over http or if a link should work. Maybe someone familiar with flash development could read the code and see if this is possible?
EDIT:
It was suggested that a crossdomain.xml might be the issue. I added the following in the 'some' directory from the path above:
<?xml version="1.0"?> <cross-domain-policy> <allow-access-from domain="*"/> </cross-domain-policy>
However, I still was unable to play the wav file.
这篇关于HTML嵌入式Flash WAV播放器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!