音频在ie11中不起作用,控件在firefox中消失

时间:2014-05-01 14:24:34

标签: html audio permissions translation text-to-speech

我正在尝试使用google tts创建一个带有音频翻译的表格。虽然它有点草率,但代码在第一天工作但今天不能正常工作:

<style>
span.english {color:azure; padding-bottom:5px;}
span.italian {color:azure; padding-bottom:5px;}
li.translation {padding-top:5px;}
</style>

<ul class="menu-phrases" id="method" style="padding-left: 10px;">

<li class="translation">
    <span class="english">oven baked:</span>
    <span class="italian">&nbsp;&nbsp;&nbsp;&nbsp;<i>forno</i>&nbsp;&nbsp;&nbsp;&nbsp;</span>
    <span class="translation">
        <audio controls class="interface"><source src="http://translate.google.com/translate_tts?tl=it&q=%22forno%22" type="audio/ogg"><source src="http://translate.google.com/translate_tts?tl=it&q=%22forno%22" type="audio/mpeg" /></audio>
    </span>
</li>
<li class="translation">
    <span class="english">fried:</span>
    <span class="italian">&nbsp;&nbsp;&nbsp;&nbsp;<i>fritto</i>&nbsp;&nbsp;&nbsp;&nbsp;</span>
    <span class="translation">
        <audio controls class="interface"><source src="http://translate.google.com/translate_tts?tl=it&q=%22fritto%22" type="audio/ogg"><source src="http://translate.google.com/translate_tts?tl=it&q=%22fritto%22" type="audio/mpeg" /></audio>
    </span>
</li>
<li class="translation">
    <span class="english">deep fried:</span>
    <span class="italian">&nbsp;&nbsp;&nbsp;&nbsp;<i>fritta</i>&nbsp;&nbsp;&nbsp;&nbsp;</span>
    <span class="translation">
        <audio controls class="interface"><source src="http://translate.google.com/translate_tts?tl=it&q=%22fritta%22" type="audio/ogg"><source src="http://translate.google.com/translate_tts?tl=it&q=%22fritta%22" type="audio/mpeg" /></audio>
    </span>
</li>
<li class="translation">
    <span class="english">saute&#232;d:</span>
    <span class="italian">&nbsp;&nbsp;&nbsp;&nbsp;<i>saltati</i>&nbsp;&nbsp;&nbsp;&nbsp;</span>
    <span class="translation">
        <audio controls class="interface"><source src="http://translate.google.com/translate_tts?tl=it&q=%22saltita%22" type="audio/ogg"><source src="http://translate.google.com/translate_tts?tl=it&q=%22saltita%22" type="audio/mpeg" /></audio>
    </span>
</li>

经过广泛研究后,问题似乎是权限。我不确定如何使用rel = noreferrer编码或者如果我可以在不使用API​​密钥的情况下获得访问权限(因为有一个用于翻译而不是专门用于tts-而我宁愿不付费...)。另外,似乎Get REST请求可能正常?

0 个答案:

没有答案