Created
October 8, 2020 18:52
-
-
Save xeladotbe/eaaee9bd819f51707496ecea5ae9143f to your computer and use it in GitHub Desktop.
Video is Playing
This file contains hidden or 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
{ | |
"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