what is the simple way to pause the played audio when user plays one of other audios? [duplicate]Javascript to stop playing sound when another startsHTML5 check if audio is playing?What is the most efficient way to deep clone an object in JavaScript?What is the best way to add options to a select from as a JS object with jQuery?Convert HTML + CSS to PDF with PHP?Use jQuery to hide a DIV when the user clicks outside of itWhat is the purpose of the var keyword and when should I use it (or omit it)?What is the best way to detect a mobile device in jQuery?XmlHttpRequest error: Origin null is not allowed by Access-Control-Allow-OriginReference — What does this symbol mean in PHP?Playing audio with Javascript?CakePHP default flash doesn't always render

How long does it take to type this?

How can I fix this gap between bookcases I made?

What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?

Possibly bubble sort algorithm

Draw simple lines in Inkscape

How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?

How can bays and straits be determined in a procedurally generated map?

Why don't electromagnetic waves interact with each other?

Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?

Is Social Media Science Fiction?

Why are 150k or 200k jobs considered good when there are 300k+ births a month?

declaring a variable twice in IIFE

How to add power-LED to my small amplifier?

What Brexit solution does the DUP want?

What exactly is the parasitic white layer that forms after iron parts are treated with ammonia?

Is there a familial term for apples and pears?

Patience, young "Padovan"

Why CLRS example on residual networks does not follows its formula?

Should I join office cleaning event for free?

How to type dʒ symbol (IPA) on Mac?

TGV timetables / schedules?

Japan - Plan around max visa duration

What is the offset in a seaplane's hull?

What defenses are there against being summoned by the Gate spell?



what is the simple way to pause the played audio when user plays one of other audios? [duplicate]


Javascript to stop playing sound when another startsHTML5 check if audio is playing?What is the most efficient way to deep clone an object in JavaScript?What is the best way to add options to a select from as a JS object with jQuery?Convert HTML + CSS to PDF with PHP?Use jQuery to hide a DIV when the user clicks outside of itWhat is the purpose of the var keyword and when should I use it (or omit it)?What is the best way to detect a mobile device in jQuery?XmlHttpRequest error: Origin null is not allowed by Access-Control-Allow-OriginReference — What does this symbol mean in PHP?Playing audio with Javascript?CakePHP default flash doesn't always render






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1
















This question already has an answer here:



  • Javascript to stop playing sound when another starts

    4 answers






<?php
mysqli_select_db($con,'media');
$query = mysqli_query($con,"select * from songs");
while($row = mysqli_fetch_assoc($query))

$url = $row['url'];
echo"<audio src="$url" controls></audio>";

?>





image



Thank you in advance for helping me.










share|improve this question













marked as duplicate by SherylHohman, Sinto, Shiladitya, Tiw, wscourge Mar 22 at 6:12


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • stackoverflow.com/questions/9437228/…

    – user1334621
    Mar 22 at 0:58











  • Check this solutions : stackoverflow.com/questions/43430897/…

    – Shim-Sao
    Mar 22 at 1:14











  • thank you......

    – kamal roben
    Mar 22 at 12:02

















1
















This question already has an answer here:



  • Javascript to stop playing sound when another starts

    4 answers






<?php
mysqli_select_db($con,'media');
$query = mysqli_query($con,"select * from songs");
while($row = mysqli_fetch_assoc($query))

$url = $row['url'];
echo"<audio src="$url" controls></audio>";

?>





image



Thank you in advance for helping me.










share|improve this question













marked as duplicate by SherylHohman, Sinto, Shiladitya, Tiw, wscourge Mar 22 at 6:12


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • stackoverflow.com/questions/9437228/…

    – user1334621
    Mar 22 at 0:58











  • Check this solutions : stackoverflow.com/questions/43430897/…

    – Shim-Sao
    Mar 22 at 1:14











  • thank you......

    – kamal roben
    Mar 22 at 12:02













1












1








1









This question already has an answer here:



  • Javascript to stop playing sound when another starts

    4 answers






<?php
mysqli_select_db($con,'media');
$query = mysqli_query($con,"select * from songs");
while($row = mysqli_fetch_assoc($query))

$url = $row['url'];
echo"<audio src="$url" controls></audio>";

?>





image



Thank you in advance for helping me.










share|improve this question















This question already has an answer here:



  • Javascript to stop playing sound when another starts

    4 answers






<?php
mysqli_select_db($con,'media');
$query = mysqli_query($con,"select * from songs");
while($row = mysqli_fetch_assoc($query))

$url = $row['url'];
echo"<audio src="$url" controls></audio>";

?>





image



Thank you in advance for helping me.





This question already has an answer here:



  • Javascript to stop playing sound when another starts

    4 answers






<?php
mysqli_select_db($con,'media');
$query = mysqli_query($con,"select * from songs");
while($row = mysqli_fetch_assoc($query))

$url = $row['url'];
echo"<audio src="$url" controls></audio>";

?>





<?php
mysqli_select_db($con,'media');
$query = mysqli_query($con,"select * from songs");
while($row = mysqli_fetch_assoc($query))

$url = $row['url'];
echo"<audio src="$url" controls></audio>";

?>






javascript php jquery html mysqli






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 22 at 0:53









kamal robenkamal roben

62




62




marked as duplicate by SherylHohman, Sinto, Shiladitya, Tiw, wscourge Mar 22 at 6:12


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by SherylHohman, Sinto, Shiladitya, Tiw, wscourge Mar 22 at 6:12


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • stackoverflow.com/questions/9437228/…

    – user1334621
    Mar 22 at 0:58











  • Check this solutions : stackoverflow.com/questions/43430897/…

    – Shim-Sao
    Mar 22 at 1:14











  • thank you......

    – kamal roben
    Mar 22 at 12:02

















  • stackoverflow.com/questions/9437228/…

    – user1334621
    Mar 22 at 0:58











  • Check this solutions : stackoverflow.com/questions/43430897/…

    – Shim-Sao
    Mar 22 at 1:14











  • thank you......

    – kamal roben
    Mar 22 at 12:02
















stackoverflow.com/questions/9437228/…

– user1334621
Mar 22 at 0:58





stackoverflow.com/questions/9437228/…

– user1334621
Mar 22 at 0:58













Check this solutions : stackoverflow.com/questions/43430897/…

– Shim-Sao
Mar 22 at 1:14





Check this solutions : stackoverflow.com/questions/43430897/…

– Shim-Sao
Mar 22 at 1:14













thank you......

– kamal roben
Mar 22 at 12:02





thank you......

– kamal roben
Mar 22 at 12:02












1 Answer
1






active

oldest

votes


















0














I found this solution but the class "play-pause" still on pause
how to remove class from all elements except the one of played audio






 document.addEventListener('play', function(e)
var audios = document.getElementsByTagName('audio');
for(var i = 0, len = audios.length; i < len;i++)
if(audios[i] != e.target)
audios[i].pause();


, true);








share|improve this answer





























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I found this solution but the class "play-pause" still on pause
    how to remove class from all elements except the one of played audio






     document.addEventListener('play', function(e)
    var audios = document.getElementsByTagName('audio');
    for(var i = 0, len = audios.length; i < len;i++)
    if(audios[i] != e.target)
    audios[i].pause();


    , true);








    share|improve this answer



























      0














      I found this solution but the class "play-pause" still on pause
      how to remove class from all elements except the one of played audio






       document.addEventListener('play', function(e)
      var audios = document.getElementsByTagName('audio');
      for(var i = 0, len = audios.length; i < len;i++)
      if(audios[i] != e.target)
      audios[i].pause();


      , true);








      share|improve this answer

























        0












        0








        0







        I found this solution but the class "play-pause" still on pause
        how to remove class from all elements except the one of played audio






         document.addEventListener('play', function(e)
        var audios = document.getElementsByTagName('audio');
        for(var i = 0, len = audios.length; i < len;i++)
        if(audios[i] != e.target)
        audios[i].pause();


        , true);








        share|improve this answer













        I found this solution but the class "play-pause" still on pause
        how to remove class from all elements except the one of played audio






         document.addEventListener('play', function(e)
        var audios = document.getElementsByTagName('audio');
        for(var i = 0, len = audios.length; i < len;i++)
        if(audios[i] != e.target)
        audios[i].pause();


        , true);








         document.addEventListener('play', function(e)
        var audios = document.getElementsByTagName('audio');
        for(var i = 0, len = audios.length; i < len;i++)
        if(audios[i] != e.target)
        audios[i].pause();


        , true);





         document.addEventListener('play', function(e)
        var audios = document.getElementsByTagName('audio');
        for(var i = 0, len = audios.length; i < len;i++)
        if(audios[i] != e.target)
        audios[i].pause();


        , true);






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 22 at 2:20









        kamal robenkamal roben

        62




        62















            Popular posts from this blog

            How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

            해남서초등학교 학교 연혁 학교 동문 외부 링크 둘러보기 메뉴북위 34° 34′ 21″ 동경 126° 35′ 50″ / 북위 34.5726385° 동경 126.5972670°  / 34.5726385; 126.5972670해남서초등학교eh