0

I using cordova local notification for alarm play sound.

var sound = '../Library/NoCloud/CryOnMyShoulder.wav';

          cordova.plugins.notification.local.schedule({
                id: 1,
                title: 'Scheduled with delay',
                text: 'Test Message 1',
                at: _5_sec_from_now,
                sound: sound,
                badge: 12
            });

I try "sound" variable with

  1. '../Library/NoCloud/CryOnMyShoulder.wav'
  2. 'file://../Library/NoCloud/CryOnMyShoulder.wav'
  3. cordova.file.dataDirectory + 'CryOnMyShoulder.wav'

=> Sound don't working, notify is showing in notify center but haven't sound. Could you please help me solve this problem?

  • Could you inspect the app in safari web inspector and post the error trace if any? – Gandhi Apr 23 '16 at 08:02
  • I think there is a problem with iOS and sound in Cordova at the moment. Certainly the normal media plugin needs a work around. (https://github.com/spudmashmedia/cordova-plugin-media/commit/946ffcf569cbaa22241e8ec00f11b4a52a0c6809) and (https://issues.apache.org/jira/browse/CB-10723). – Subjective Effect Apr 23 '16 at 08:15

0 Answers0