Forked from xeladotbe/gist:eaaee9bd819f51707496ecea5ae9143f
Created
October 8, 2020 19:04
-
-
Save goldzulu/4c08539a302123e92aba06e838f21369 to your computer and use it in GitHub Desktop.
Video is Playing
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
{ | |
"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