0
接收通知我已經加入插件科爾多瓦 - 插件 - 媒體播放定製的歌曲,而在科爾多瓦
db.push.onNotificationGCM = function(e) {
var myMedia = new Media("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3")
myMedia.play({ numberOfLoops: 2 })
switch (e.event) {
case 'registered':
if (e.regid.length > 0) {
db.push.devicetoken = e.regid;
var data_to_send = {
devicetoken: db.push.devicetoken,
platform: 'android'
};
db.push.register_push(data_to_send);
}
break;
case 'message':
if (e.foreground) {
app.t(e.payload.message);
db.notifications.data = TAFFY();
} else {
db.push.deeplink = e.payload.deeplink;
if (e.coldstart) {} else {
db.notifications.data = TAFFY();
db.push.gotoDeeplink();
}
}
break;
case 'error':
break;
default:
break;
}
}
問題:
Media is not defined