Chrome 扩展通知拒绝图片
Chrome Extension notifications rejects image
我正在开发一个需要在通知中显示图像的扩展程序。
我收到消息:
Image resource provided for notification type != image
当前代码如下:
chrome.notifications.create('', {
type: 'basic',
title: 'New Video: ' + video.title,
message: 'You got a new video!!!',
iconUrl: 'imgs/notification.jpg',
imageUrl: video.thumbnails.notification.url
});
通知必须具有 'image' 类型才能显示图像。
工作代码是
chrome.notifications.create('', {
type: 'image',
title: 'New Video: ' + video.title,
message: 'You got a new video!!!',
iconUrl: 'imgs/notification.jpg',
imageUrl: video.thumbnails.notification.url
});
我正在开发一个需要在通知中显示图像的扩展程序。
我收到消息:
Image resource provided for notification type != image
当前代码如下:
chrome.notifications.create('', {
type: 'basic',
title: 'New Video: ' + video.title,
message: 'You got a new video!!!',
iconUrl: 'imgs/notification.jpg',
imageUrl: video.thumbnails.notification.url
});
通知必须具有 'image' 类型才能显示图像。
工作代码是
chrome.notifications.create('', {
type: 'image',
title: 'New Video: ' + video.title,
message: 'You got a new video!!!',
iconUrl: 'imgs/notification.jpg',
imageUrl: video.thumbnails.notification.url
});