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

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript