I have a D7 site running with Organic groups, rules, VBO, panels, badges, private-message modules ... and a bootstrap sub-theme (js, jQuery update, ...) working in all browsers, ios & android, i need to alert users with a beep sound when new OG content is created (or any rules reaction). I google arround and some answers are based on JS (only browsers), other by HTML5, and some by CSS using a wav file, all very confusing. I'll apreciate how to handle it by a custom module, some code included will be very helpfull.

What I have:

•	Rules event: create new content

•	Rules condition: my contentype with some fields.

•	Rules action: Loop: all OG group members, loop action: EMPTY

For rules action I suppose that I have to trigger some JS code in “my-module”, or just “play” a HTML5 audio tag,  with  mp3 or wav file, "my-module" must have UID variable to target a specific OG member.

Big cuestion is, how to implement “my-module” code actions triggered by rules?

EDIT: i have manage to have my beepsound as an action in rules, it targets UID, it display a personalised message corectly, but NO sound, if I run same code on XAMPP it "sounds" only once as spected, but not in drupal, also, message is displayed 5 times, meaning rule is triggered 5 times, here is my module INC file, dot module file exist but is empty, mp3 and .ogg files are uploaded and in correct path and access, what it is wrong?

beepsound.info MODULE

    name = Beep sound by rules module 
    description = Module to add a beep sound action in rules
    package = Custom
    version = 7.01
    core = 7.x
    dependencies[] = rules

beepsound.rules.inc MODULE
    

    /**
    * Implement hook_rules_action_info()
    * Declare any meta data about actions for Rules
    */

    function beepsound_rules_action_info() {
    $actions = array(
    'beepsound_action_beepsound_user' => array(
        'label' => t('Make a beep sound'),
        'group' => t('sound'),
        'parameter' => array(
            'account' => array(
                'type' => 'user',
                'label' => t('User to beep'),
                ),
        ),
      ),

    );

      return $actions;
    }

    /**
     * The action function for produce sound
     */

    function beepsound_action_beepsound_user($account) {
        drupal_set_message(t('Hello @username',
     array('@username' => $account->name)));
        ?><audio autoplay="autoplay">
          <source src="A-tone.ogg" type="audio/ogg">
          <source src="A-Tone.mp3" type="audio/mp3">
        </audio><?php
    }