Display YouTube videos on Sketchware App

1. Copy the code below(View on Github)
data:text/html, <iframe width="100%" height="100%" src="http://www.youtube.com/embed/3DSrJos_Ick" frameborder="0"></iframe>

2. In place of 3DSrJos_Ick add the id of YouTube video.
3. To get video id go to youtube and copy video url
Example:https://youtu.be/3DSrJos_Ick
You can see the dark part of video url is video id.
4. Add a webview and change its width to match parent

and hieght to 325.
5. Add a block webview loadurl block in onCreate and choose a webview then paste the code in loadurl
6. Save and run the project.


Comments

Popular posts from this blog

How to make edittext in dialog in Sketchware