我想在网页上的Flash播放器中播放Google Text-To-Speech URL。

我正在使用http://www.alsacreations.fr/dewplayer.html,但是不起作用:

<object type="application/x-shockwave-flash" data="dewplayer.swf" width="200"
        height="20" id="dewplayer" name="dewplayer">
<param name="wmode" value="transparent" />
<param name="movie" value="dewplayer.swf" />
<param name="flashvars" value="mp3=http://translate.google.com/translate_tts?q=hello-word&tl=en" />
</object>

最佳答案

您的MP3文件的URL必须是URL编码的(http://www.w3schools.com/tags/ref_urlencode.asp)

<object type="application/x-shockwave-flash" data="dewplayer.swf" width="200" height="20" id="dewplayer" name="dewplayer">
<param name="wmode" value="transparent" />
<param name="movie" value="dewplayer.swf" />
<param name="flashvars" value="mp3=http%3A%2F%2Ftranslate.google.com%2Ftranslate_tts%3Fq%3Dhello-world%26tl%3Den" />
</object>

10-06 00:05