Associated Attachments
Audio
Property | Base Spec | Required | Description | Restrictions |
---|---|---|---|---|
type | Activity Vocabulary 2.0 | YES | Identifies the type of the object | MUST be set to Audio |
url | Activity Vocabulary 2.0 | YES | An array of links for given audio content in different formats | MUST be an Audio Link AND MUST have at least one supported audio MIME type |
name | Activity Vocabulary 2.0 | no | The display name for the audio file | |
duration | Activity Vocabulary 2.0 | no | Approximate duration of the audio |
Audio Link
Property | Base Spec | Required | Description | Restrictions |
---|---|---|---|---|
type | Activity Vocabulary 2.0 | YES | Identifies the type of the object | MUST be set to Link |
href | Activity Vocabulary 2.0 | YES | The URL for the given audio content | MUST be a Supported URL Schema |
mediaType | Activity Vocabulary 2.0 | YES | MIME type of href content | MUST follow |
hash | DSNP 1.0 | YES | Array of hashes for linked content validation | MUST include at least one supported hash |
Supported Audio MIME Types
Format | MIME Type | Specification(s) |
---|---|---|
MP3 | audio/mpeg | RFC3003 |
OGG | audio/ogg | RFC5334 |
WebM | audio/webm | WebM standard |
Example
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Note",
"attachments": [
{
"type": "Audio",
"name": "The Scream",
"url": [
{
"type": "Link",
"href": "https://upload.wikimedia.org/wikipedia/commons/d/d9/Wilhelm_Scream.ogg",
"mediaType": "audio/ogg",
"hash": [
"QmQrGdv6Ky5sJhaVdw27y4aod5pdfihDkBTxiBkRaSGJJ7"
]
}
],
"duration": "1S"
}
],
"published": "1970-01-01T00:00:00+00:00"
}
Image
Property | Base Spec | Required | Description | Restrictions |
---|---|---|---|---|
type | Activity Vocabulary 2.0 | YES | Identifies the type of the object | MUST be set to Image |
url | Activity Vocabulary 2.0 | YES | An array of links for given image content in different formats | MUST be an Image Link AND MUST have at least one supported image MIME type |
name | Activity Vocabulary 2.0 | no | The display name or alt text for the image |
Image Link
Property | Base Spec | Required | Description | Restrictions |
---|---|---|---|---|
type | Activity Vocabulary 2.0 | YES | Identifies the type of the object | MUST be set to Link |
href | Activity Vocabulary 2.0 | YES | The URL for the given image | MUST be a Supported URL Schema |
mediaType | Activity Vocabulary 2.0 | YES | MIME type of href content | |
hash | DSNP 1.0 | YES | Array of hashes for linked content validation | MUST include at least one supported hash |
height | Activity Vocabulary 2.0 | no | A hint as to the rendering height in device-independent pixels | |
width | Activity Vocabulary 2.0 | no | A hint as to the rendering width in device-independent pixels |
Supported Image MIME Types
Format | MIME Type | Specification(s) |
---|---|---|
JPEG | image/jpeg | RFC2045 |
PNG | image/png | W3C PNG Standard |
SVG | image/svg+xml | W3C SVG standard |
WebP | image/webp | WebP standard |
GIF | image/gif | RFC2045 |
Example
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Note",
"attachments": [
{
"type": "Image",
"name": "One of the founders of DSNP",
"url": [
{
"type": "Link",
"href": "https://upload.wikimedia.org/wikipedia/commons/a/ae/Mccourt.jpg",
"width": 350,
"height": 228,
"mediaType": "image/jpg",
"hash": [
"2Drjgb5yoVWTpubcWmDBLJqkxrFkZamekzJoYLSWwM2ezpFkab"
]
}
]
}
],
"published": "1970-01-01T00:00:00+00:00"
}
Video
Property | Base Spec | Required | Description | Restrictions |
---|---|---|---|---|
type | Activity Vocabulary 2.0 | YES | Identifies the type of the object | MUST be set to Video |
url | Activity Vocabulary 2.0 | YES | An array of links for given video content in different formats | MUST be a Video Link AND MUST have at least one supported video MIME type |
name | Activity Vocabulary 2.0 | no | The display name for the video | |
duration | Activity Vocabulary 2.0 | no | Approximate duration of the video |
Video Link
Property | Base Spec | Required | Description | Restrictions |
---|---|---|---|---|
type | Activity Vocabulary 2.0 | YES | Identifies the type of the object | MUST be set to Link |
href | Activity Vocabulary 2.0 | YES | The URL for the given content | MUST be a Supported URL Schema |
mediaType | Activity Vocabulary 2.0 | YES | MIME type of href content | |
hash | DSNP 1.0 | YES | Array of hashes for linked content validation | MUST include at least one supported hash |
height | Activity Vocabulary 2.0 | no | A hint as to the rendering height in device-independent pixels | |
width | Activity Vocabulary 2.0 | no | A hint as to the rendering width in device-independent pixels |
Supported Video MIME Types
Format | MIME Type | Specification(s) |
---|---|---|
MPEG | video/mpeg | RFC2045 |
OGG | video/ogg | RFC5334 |
WebM | video/webm | WebM standard |
H265 | video/H265 | RFC7798 |
MP4 | video/mp4 | RFC4337 |
Example
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Note",
"attachments": [
{
"type": "Video",
"name": "One of the founders of DSNP",
"duration": "PT10M32S",
"url": [
{
"type": "Link",
"href": "https://upload.wikimedia.org/wikipedia/commons/c/c0/Big_Buck_Bunny_4K.webm",
"width": 4000,
"height": 2250,
"mediaType": "video/webm",
"hash": [
"2Drjgb4a8eC4XheBKCBcbAcaVdEWcKjMbCSZ2L2c9CQs4x98jf"
]
}
]
}
],
"published": "1970-01-01T00:00:00+00:00"
}
Link
Property | Base Spec | Required | Description | Restrictions |
---|---|---|---|---|
type | Activity Vocabulary 2.0 | YES | Identifies the type of the object | MUST be set to Link |
href | Activity Vocabulary 2.0 | YES | The URL for the given link | MUST be a Supported URL Schema |
name | Activity Vocabulary 2.0 | no | The display name for the link |
Examples
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Note",
"content": "Check out the DSNP Website!",
"mediaType": "text/plain",
"attachment": [
{
"type": "Link",
"name": "DSNP Website",
"href": "https://dsnp.org"
}
],
"published": "1970-01-01T00:00:00+00:00"
}