Deprecated: Return type of GeoIp2\Model\AbstractModel::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/u126274411/domains/rmweblab.com/public_html/wp-content/plugins/iq-block-country/vendor/geoip2/geoip2/src/Model/AbstractModel.php on line 63

Deprecated: Return type of GeoIp2\Record\AbstractRecord::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/u126274411/domains/rmweblab.com/public_html/wp-content/plugins/iq-block-country/vendor/geoip2/geoip2/src/Record/AbstractRecord.php on line 57
Play only 1 audio at a time | RM Web Lab

Play only 1 audio at a time

When one page have multiple audio. we need play one audio and stop all others. This code work and tested on sermon manager for wordpress plugin. Play one audio at a time. just use this script in jQuery ready block.

$('audio').bind('play', function() {
    var activated = this;
    $('audio').each(function() {
        if(this != activated) this.pause();
    });
});

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *