Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save goldzulu/4c08539a302123e92aba06e838f21369 to your computer and use it in GitHub Desktop.
Save goldzulu/4c08539a302123e92aba06e838f21369 to your computer and use it in GitHub Desktop.
Video is Playing
{
"document": {
"type": "APL",
"version": "1.4",
"settings": {},
"theme": "dark",
"import": [],
"resources": [],
"styles": {},
"onMount": [],
"graphics": {},
"commands": {},
"layouts": {},
"mainTemplate": {
"parameters": [
"payload"
],
"items": [
{
"type": "Container",
"onMount": [
{
"type": "Parallel",
"commands": [
{
"type": "SpeakItem",
"componentId": "videoIsPlaying"
},
{
"type": "ControlMedia",
"componentId": "videoPlayer",
"command": "play"
}
]
}
],
"items": [
{
"type": "Text",
"position": "absolute",
"id": "videoIsPlaying",
"speech": "${payload.currentView.properties.speech}",
"text": ".",
"left": "${viewport.width * -1}",
"top": 0
},
{
"type": "Video",
"height": "100%",
"width": "100%",
"shrink": 1,
"autoplay": false,
"audioTrack": "foreground",
"id": "videoPlayer",
"source": {
"url": "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
}
}
]
}
]
}
},
"datasources": {
"currentView": {
"type": "object",
"properties": {
"text": "Video is playing"
},
"transformers": [
{
"inputPath": "text",
"transformer": "textToSpeech",
"outputName": "speech"
}
]
}
},
"sources": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment