如何连续播放音频文件 [英] how to play audio file continously

查看:134
本文介绍了如何连续播放音频文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

在特定时间,我的项目中添加了许多音频文件.
在固定的时间段内,我分配了一个音频文件来播放.
我的问题是如何连续播放这些文件.我将在特定时间内从db.db中获取文件.如何自动依次播放..
哪个播放器是使用Windows Media Player的最佳播放器,但我无法自动播放下一个文件..它是否有任何属性...对此有任何解决方案..

在此先感谢

Amrutha

hi all

I have number of audio files added in my project for particular time.
for a fixed time period i have one audio file assigned to play.
my problem is how to play these files continuously.i will get files for a particular time from db.how to play automatically one after another..
which player is best iam using windows media player but i cant play next file automatically..is there any property for it ...Is Any solution for this..

Thanks in advance

Amrutha

推荐答案



如果您知道音频文件的确切时间,则可以根据需要使用我的代码.

进行一些更改.

Hi,

If you know the exact time of that audio files you can use my code for your requirement.

with some changes.

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
    <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script language ="javascript" >
        var timp;
        function strt() {
            timp = setTimeout("f2()", 300);
        }
        function f2() {

            document.getElementById("imgid").src = "Images/Sunset.jpg";
            timp = setTimeout("f3()", 300);
       }
       function f3() {
           document.getElementById("imgid").src = "Images/Winter.jpg";
           timp = setTimeout("f4()", 300);
       }
       function f4() {
           document.getElementById("imgid").src = "Images/Waterlilies.jpg";
           timp = setTimeout("f2()", 300);
       }
    </script>
</head>
<body onload ="strt()" >
    <form id="form1" runat="server">
    <div id="divimg">
 

        <img id="imgid" src="Images/Blue%20hills.jpg" width="400" height="400" />
    </div>
    </form>
</body>
</html>



在这里,我将Image标签用于图像,您可以使用嵌入标签中的音频文件来重复播放.

希望您知道我们可以使用嵌入式标签播放音频文件.

您必须根据需要更改我的代码.

我只是给个主意而已.


最好的



Here I used Image tag for images you can use audio files in embedded tag to play repeatedly.

I hope you know we can play audio files using embedded tag.

You''ve to change my code based on your requirement.

I just gave idea only.


All the Best


这篇关于如何连续播放音频文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆