Skip to content

Add poster (big picture / hero image) #79

@johnmellor

Description

@johnmellor

Android, Windows and Chrome OS all support showing a poster image on a notification.

Let's add this feature to Web Notifications:

partial dictionary NotificationOptions {
  USVString poster;
}

As usual, they will be displayed on a best-effort basis. For example, both Android and Windows only display the poster image when the notification is expanded (on Android, the most recent notification is usually expanded, depending on priority; in the Windows 10 Action Center, the most recent notification shown by each app is expanded [source]). Other platforms won't show them at all.

Ideally it would be possible to feature-detect platform support by checking if Notification.prototype contains poster, but that's a subject for another issue. I will note that on Android at least, BigPictureStyle is mutually exclusive with InboxStyle for displaying a list of items (#21), so if we later add lists to Web Notifications we may need some way to indicate that they are mutually exclusive and/or allow web developers to indicate which property is more important, but we can cross that bridge later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions