Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stories projects: interoperability discussion #477

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 160 additions & 0 deletions stories-interop-example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
{
"frames": [
{
"source": {
"type": "com.wordpress.stories.compose.story.StoryFrameItem.BackgroundSource.FileBackgroundSource",
"file": "/data/user/0/com.automattic.portkey/app_tmp/tmp_wp_story1595960744285.jpg"
},
"frameItemType": {
"type": "com.wordpress.stories.compose.story.StoryFrameItemType.IMAGE"
},
"addedViews": [
{
"viewType": "TEXT",
"viewInfo": {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it would be better to break this into position and info where info is the extra type specific values and position is the translation, rotation, and scale.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea! 👍

"rotation": 0,
"translationX": -180,
"translationY": -861.4966,
"scale": 1,
"addedViewTextInfo": {
"text": "this is some text",
"fontSizePx": 140,
"textColor": -1,
"textAlignment": 2
}
},
"uri": null
}
],
"saveResultReason": {
"type": "com.wordpress.stories.compose.frame.StorySaveEvents.SaveResultReason.SaveSuccess"
}
},
{
"source": {
"type": "com.wordpress.stories.compose.story.StoryFrameItem.BackgroundSource.UriBackgroundSource",
"contentUri": "content://media/external/video/media/639"
},
"frameItemType": {
"type": "com.wordpress.stories.compose.story.StoryFrameItemType.VIDEO",
"muteAudio": false
},
"addedViews": [
{
"viewType": "TEXT",
"viewInfo": {
"rotation": 0,
"translationX": 5.053711,
"translationY": -769.71716,
"scale": 1,
"addedViewTextInfo": {
"text": "this is some text, on a video background",
"fontSizePx": 140,
"textColor": -1,
"textAlignment": 4
}
},
"uri": null
},
{
"viewType": "EMOJI",
"viewInfo": {
"rotation": 0,
"translationX": 0,
"translationY": 0,
"scale": 1,
"addedViewTextInfo": {
"text": "😁",
"fontSizePx": 284,
"textColor": -16777216,
"textAlignment": 4
}
},
"uri": null
}
],
"saveResultReason": {
"type": "com.wordpress.stories.compose.frame.StorySaveEvents.SaveResultReason.SaveSuccess"
}
},
{
"source": {
"type": "com.wordpress.stories.compose.story.StoryFrameItem.BackgroundSource.UriBackgroundSource",
"contentUri": "content://media/external/images/media/638"
},
"frameItemType": {
"type": "com.wordpress.stories.compose.story.StoryFrameItemType.IMAGE"
},
"addedViews": [
{
"viewType": "TEXT",
"viewInfo": {
"rotation": 0,
"translationX": -240.0293,
"translationY": -866.2858,
"scale": 1,
"addedViewTextInfo": {
"text": "one text view",
"fontSizePx": 140,
"textColor": -1,
"textAlignment": 2
}
},
"uri": null
},
{
"viewType": "TEXT",
"viewInfo": {
"rotation": 0,
"translationX": -120.01465,
"translationY": -683.99414,
"scale": 1,
"addedViewTextInfo": {
"text": "another text view",
"fontSizePx": 140,
"textColor": -1,
"textAlignment": 2
}
},
"uri": null
},
{
"viewType": "TEXT",
"viewInfo": {
"rotation": 0,
"translationX": -214.98047,
"translationY": -504.95605,
"scale": 1,
"addedViewTextInfo": {
"text": "third text view",
"fontSizePx": 140,
"textColor": -1,
"textAlignment": 2
}
},
"uri": null
},
{
"viewType": "EMOJI",
"viewInfo": {
"rotation": 0,
"translationX": 0,
"translationY": 0,
"scale": 1,
"addedViewTextInfo": {
"text": "😬",
"fontSizePx": 284,
"textColor": -16777216,
"textAlignment": 4
}
},
"uri": null
}
],
"saveResultReason": {
"type": "com.wordpress.stories.compose.frame.StorySaveEvents.SaveResultReason.SaveSuccess"
}
}
],
"title": null
}