forked from bluesky-social/atproto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Video lexicons and appview views (bluesky-social#2751)
* lexicon: initial lexicons for video embeds in bsky app * lexicon: fix video caption file size limit * codegen * appview: stub out video embed view logic * api prerelease * api prerelease * lexicon: video upload/processing lexicons * tidy * lexicon: app.bsky.video lexicons for uploads * codegen * api prerelease * appview: present video embeds on posts * appview: snaps * changeset * appview: fix wiring of video url config
- Loading branch information
Showing
72 changed files
with
2,858 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@atproto/bsky": patch | ||
"@atproto/api": patch | ||
"@atproto/pds": patch | ||
--- | ||
|
||
Lexicons and support for video embeds within bsky posts. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "app.bsky.embed.defs", | ||
"defs": { | ||
"aspectRatio": { | ||
"type": "object", | ||
"description": "width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.", | ||
"required": ["width", "height"], | ||
"properties": { | ||
"width": { "type": "integer", "minimum": 1 }, | ||
"height": { "type": "integer", "minimum": 1 } | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "app.bsky.embed.video", | ||
"description": "A video embedded in a Bluesky record (eg, a post).", | ||
"defs": { | ||
"main": { | ||
"type": "object", | ||
"required": ["video"], | ||
"properties": { | ||
"video": { | ||
"type": "blob", | ||
"accept": ["video/mp4"], | ||
"maxSize": 50000000 | ||
}, | ||
"captions": { | ||
"type": "array", | ||
"items": { "type": "ref", "ref": "#caption" }, | ||
"maxLength": 20 | ||
}, | ||
"alt": { | ||
"type": "string", | ||
"description": "Alt text description of the video, for accessibility.", | ||
"maxGraphemes": 1000, | ||
"maxLength": 10000 | ||
}, | ||
"aspectRatio": { | ||
"type": "ref", | ||
"ref": "app.bsky.embed.defs#aspectRatio" | ||
} | ||
} | ||
}, | ||
"caption": { | ||
"type": "object", | ||
"required": ["lang", "file"], | ||
"properties": { | ||
"lang": { | ||
"type": "string", | ||
"format": "language" | ||
}, | ||
"file": { | ||
"type": "blob", | ||
"accept": ["text/vtt"], | ||
"maxSize": 20000 | ||
} | ||
} | ||
}, | ||
"view": { | ||
"type": "object", | ||
"required": ["cid", "playlist"], | ||
"properties": { | ||
"cid": { "type": "string", "format": "cid" }, | ||
"playlist": { "type": "string", "format": "uri" }, | ||
"thumbnail": { "type": "string", "format": "uri" }, | ||
"alt": { | ||
"type": "string", | ||
"maxGraphemes": 1000, | ||
"maxLength": 10000 | ||
}, | ||
"aspectRatio": { | ||
"type": "ref", | ||
"ref": "app.bsky.embed.defs#aspectRatio" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "app.bsky.video.defs", | ||
"defs": { | ||
"jobStatus": { | ||
"type": "object", | ||
"required": ["jobId", "did", "state"], | ||
"properties": { | ||
"jobId": { "type": "string" }, | ||
"did": { "type": "string", "format": "did" }, | ||
"state": { | ||
"type": "string", | ||
"description": "The state of the video processing job. All values not listed as a known value indicate that the job is in process.", | ||
"knownValues": ["JOB_STATE_COMPLETED", "JOB_STATE_FAILED"] | ||
}, | ||
"progress": { | ||
"type": "integer", | ||
"minimum": 0, | ||
"maximum": 100, | ||
"description": "Progress within the current processing state." | ||
}, | ||
"blob": { "type": "blob" }, | ||
"error": { "type": "string" }, | ||
"message": { "type": "string" } | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "app.bsky.video.getJobStatus", | ||
"defs": { | ||
"main": { | ||
"type": "query", | ||
"description": "Get status details for a video processing job.", | ||
"parameters": { | ||
"type": "params", | ||
"required": ["jobId"], | ||
"properties": { | ||
"jobId": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"required": ["jobStatus"], | ||
"properties": { | ||
"jobStatus": { | ||
"type": "ref", | ||
"ref": "app.bsky.video.defs#jobStatus" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "app.bsky.video.getUploadLimits", | ||
"defs": { | ||
"main": { | ||
"type": "query", | ||
"description": "Get video upload limits for the authenticated user.", | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"required": ["canUpload"], | ||
"properties": { | ||
"canUpload": { "type": "boolean" }, | ||
"remainingDailyVideos": { "type": "integer" }, | ||
"remainingDailyBytes": { "type": "integer" }, | ||
"message": { "type": "string" }, | ||
"error": { "type": "string" } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "app.bsky.video.uploadVideo", | ||
"defs": { | ||
"main": { | ||
"type": "procedure", | ||
"description": "Upload a video to be processed then stored on the PDS.", | ||
"input": { | ||
"encoding": "video/mp4" | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"required": ["jobStatus"], | ||
"properties": { | ||
"jobStatus": { | ||
"type": "ref", | ||
"ref": "app.bsky.video.defs#jobStatus" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.