Play YouTube Videos


You can use YouTube videos in iOS, Android and HTML5 apps using the following code:

Instal Tutorial App

Click here to install the Play YouTube Video Tutorial app in your workspace. 

HTML Embed

To play YouTube video we use the YouTube embed HTML available on YouTube site under 'Share' :

<iframe width="560" height="315" src="" frameborder="0" allowfullscreen></iframe>

The HTML is pasted in the HTML Block of the 'Play Your tube Video' view of the app.

Here is the detail of the HTML.
We do capture the device Width and Height to calculate our iFrame, feel free to change this as you see fit:

We include some EachScape JavaScript libraries to execute custom script from JS.
 You are now ready to play YouTube video.

HTML Code Example

<!DOCTYPE html> 



<style type="text/css"> 

iframe {width: [[sys:devicePortraitWidth]]px !important; height: [[sys:devicePortraitWidth:div 5|mul 3]]px !important; } 

a {

    color: #00CED1;



<script type="text/javascript" src="es-jquery-1.7.min.js"></script>

<script type="text/javascript" src="es_js_api.min.js"></script>



<iframe id="myYoutubeIframe" src="[[ds:/YouTube - EachScape Channel Links (Cloud Collection)/record/youtube_video_ID]]" frameborder="0">


<script type="text/javascript" src="">




Learn More

- Introduction to using JavaScript in EachScape

- Execute EachScape Custom Script from JavaScript