css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<title></title>
      <style>
      /*These are the classes which apply the rotation
        to the dials*/
       .rotation1 {
         -webkit-transform:rotate(40deg);
         transform:rotate(40deg);
         transition:all 0.5s;
        }
        
        .rotation2 {
         -webkit-transform:rotate(-60deg);
         transform:rotate(-60deg);
         transition:all 0.5s;
        }
        
        .rotation3 {
         -webkit-transform:rotate(120deg);
         transform:rotate(120deg);
         transition:all 0.7s;
        }
        
        .rotation4 {
         -webkit-transform:rotate(-160deg);
         transform:rotate(-160deg);
         transition:all 0.6s;
        }
      </style>
	</head>
  
  	<!--This is the link to the jquery-idletimer CDN-->
	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-idletimer/1.0.0/idle-timer.min.js"></script>
  	 
  	
	<body style="width:1920px;height:1080px; margin: 0; overflow: hidden;" >
	<div  id="home-page" class="page" data-index="0" placeholder="true" style="width:1920px;height:1080px;left:0px;top:0px;z-index:0;position:absolute;background:rgba(100,100,100,1);">
    	<div  id="image-slideshow" placeholder="true" style="width:1920px;height:1080px;left:-40px;top:0px;z-index:11;position:absolute;"></div>  
    </div>
	<div  id="page-1" class="page" data-index="1" placeholder="true" style="width:1920px;height:1080px;left:0px;top:0px;z-index:1;position:absolute;background:rgba(100,100,100,1);">
    	<div  id="video-1" placeholder="true" style="width:1920px;height:1080px;left:0px;top:0px;z-index:9;position:absolute;"></div>  
    </div>
	<div  id="page-2" class="page" data-index="2" placeholder="true" style="width:1920px;height:1080px;left:0px;top:0px;z-index:2;position:absolute;background:rgba(100,100,100,1);">
    	<div  id="video-2" placeholder="true" style="width:1920px;height:1080px;left:0px;top:0px;z-index:9;position:absolute;"></div>
    </div>
	<div  id="tv-overlay" placeholder="true" style="width:1920px;height:1080px;left:0px;top:0px;z-index:10;position:absolute;background:url('https://storage.googleapis.com/risemedialibrary-7fa5ee92-7deb-450b-a8d5-e5ed648c575f/Multipage-TV-Images/overlay.png') no-repeat left top;background-size:contain;"></div>
    <div  id="button-1" onclick="showPage('0');" placeholder="true" style="width:400px;height:120px;left:1448px;top:620px;z-index:11;position:absolute;background:url('https://storage.googleapis.com/risemedialibrary-7fa5ee92-7deb-450b-a8d5-e5ed648c575f/Multipage-TV-Images/channel-1.png') no-repeat center center;"></div>
	<div  id="button-2" onclick="showPage('1');" placeholder="true" style="width:400px;height:120px;left:1449px;top:745px;z-index:11;position:absolute;background:url('https://storage.googleapis.com/risemedialibrary-7fa5ee92-7deb-450b-a8d5-e5ed648c575f/Multipage-TV-Images/channel-2.png') no-repeat center center;"></div>
	<div  id="button-3" onclick="showPage('2');" placeholder="true" style="width:400px;height:120px;left:1449px;top:874px;z-index:11;position:absolute;background:url('https://storage.googleapis.com/risemedialibrary-7fa5ee92-7deb-450b-a8d5-e5ed648c575f/Multipage-TV-Images/channel-3.png') no-repeat center center;"></div>
    <div  id="dial-1" placeholder="true" style="width:300px;height:300px;left:1491px;top:76px;z-index:11;position:absolute;background:url('https://storage.googleapis.com/risemedialibrary-7fa5ee92-7deb-450b-a8d5-e5ed648c575f/Multipage-TV-Images/dial-1.png') no-repeat center center;"></div>
	<div  id="dial-2" placeholder="true" style="width:300px;height:300px;left:1491px;top:330px;z-index:11;position:absolute;background:url('https://storage.googleapis.com/risemedialibrary-7fa5ee92-7deb-450b-a8d5-e5ed648c575f/Multipage-TV-Images/dial-2.png') no-repeat center center;"></div>
 
    <script>
      
      //This is where we define the button and dial variables
      var button1 = document.getElementById("button-1");
      var button2 = document.getElementById("button-2");
      var button3 = document.getElementById("button-3");
      var dial1 = document.getElementById("dial-1");
      var dial2 = document.getElementById("dial-2");
      
      //This is where we define the functions that add the CSS classes for the rotation
      function rotation1() {
      	dial1.className = "rotation1";
        dial2.className = "rotation3";
      }
      
      function rotation2() {
      	dial1.className = "rotation2";
        dial2.className = "rotation4";
      }
      
      function rotation3() {
      	dial1.className = "rotation3";
        dial2.className = "rotation2";
      }
      
      //We add a listener to the buttons to respond to click event which will
      //call one of the functions defined above
      button1.addEventListener("click", rotation1);
      button2.addEventListener("click", rotation2);
      button3.addEventListener("click", rotation3);
      
      
      //This is where we define the variables for the array of widget IDs and the previousIndex for the pages
      var ids = [],
	  previousIndex = "-1";
			
	  //We construct an array of Widget IDs and add in a reference to the Placeholder that they are in.
			
      ids.push({
        "id": "image-slideshow_0w",        
        "index": "0"             
      });
      ids.push({
        "id": "video-1_0w",        
        "index": "1"             
      });
      ids.push({
        "id": "video-2_0w",        
        "index": "2"             
      });
			
	//Show a particular page of the Presentation.
      function showPage(index) {
        
        //This is were we set the idle timer to return the presentation
        //to page 1 if the user has not touched the screen for 20 seconds
        $.idleTimer(20000);
      
      	$(document).bind("idle.idleTimer", function() {
        	$.idleTimer('destroy');
   			showPage('0');
	  	});
        
        var $page = $("div[data-index='" + index + "']");
				
        //Hide all pages.
        $(".page").each(function() {
          $(this).hide();
        });

        //Show the page we want.
        if ($page != null) {
          $page.show();
        }

        //Pause all Widgets on the previous page.
        if (previousIndex != "-1") {
          pause(previousIndex);
        }

        //Play all Widgets on the current page.
        play(index);
				
		previousIndex = index;
	}	
			
      //Play all Widgets on a particular page.
      function play(index) {
        for (var i = 0; i < ids.length; i++) {
          if (ids[i].index == index) {
            playCmd(ids[i].id);
          }
        }
      }
			
      //Pause all Widgets on a particular page.
      function pause(index) {
        for (var i = 0; i < ids.length; i++) {
          if (ids[i].index == index) {
            pauseCmd(ids[i].id);
          }
        }
      }
			
      //Add an event handler for when a Gadget reports itself as Ready.
      $(document).bind("gadgetReady", function(e, id) {
        //You can uncomment the following line when building your Presentation
        //in order to show the Gadget IDs in the console.
        //console.log(id);  
				
		var newId = id.substring(9);
				
        //Construct the Widget's true ID.
        for (var i = 0; i < ids.length; i++) {
          if (newId == ids[i].id) {
            ids[i].id = id;
            break;
          }
        }
      });
			
      //Add an event handler for when a Gadget starts playing.
      $(document).bind("playCommand", function(e, id) {
        var $gadget = $("#" + id);

        //Show the Gadget's Placeholder.
        $gadget.parent().parent().css("visibility", "visible");

        //Show the Gadget. Handle each possible Placeholder transition.
        if ($gadget.hasClass("none_hide")) {
          $gadget.removeClass("none_hide").addClass("none_show");
        }
        else if ($gadget.hasClass("fade_hide")) {
          $gadget.removeClass("fade_hide").addClass("fade_show");
        }
        else if ($gadget.hasClass("iris_hide")) {
          $gadget.removeClass("iris_hide").addClass("iris_show");
        }	
        else if ($gadget.hasClass("slide-right_hide")) {
          $gadget.removeClass("slide-right_hide").addClass("slide-right_show");
        }
        else if ($gadget.hasClass("slide-left_hide")) {
          $gadget.removeClass("slide-left_hide").addClass("slide-left_show");
        }
        else if ($gadget.hasClass("slide-up_hide")) {
          $gadget.removeClass("slide-up_hide").addClass("slide-up_show");
        }
        else if ($gadget.hasClass("slide-down_hide")) {
          $gadget.removeClass("slide-down_hide").addClass("slide-down_show");
        }
      });
		
     //This function is called once the presentation has loaded
      $(document).ready(function() {
        //Show home page.
        showPage("0");
      });
    </script>
	</body>

<!-- Warning - Editing the Presentation Data Object incorrectly may result in the Presentation not functioning correctly -->
	<script language="javascript">
	<!--
	var presentationData = {
	"presentationData": {
		"id": "01e6c212-93bf-4c35-8264-df8aed995a32",
		"hidePointer": true,
		"donePlaceholder": "",
		"placeholders": [
			{
				"id": "home-page",
				"type": "playlist",
				"timeDefined": false,
				"visibility": true,
				"transition": "none",
				"items": []
			},
			{
				"id": "page-1",
				"type": "playlist",
				"timeDefined": false,
				"visibility": true,
				"transition": "none",
				"items": []
			},
			{
				"id": "page-2",
				"type": "playlist",
				"timeDefined": false,
				"visibility": true,
				"transition": "none",
				"items": []
			},
			{
				"id": "tv-overlay",
				"type": "playlist",
				"timeDefined": false,
				"visibility": true,
				"transition": "none",
				"items": []
			},
			{
				"id": "button-1",
				"type": "playlist",
				"timeDefined": false,
				"visibility": true,
				"transition": "none",
				"items": []
			},
			{
				"id": "button-2",
				"type": "playlist",
				"timeDefined": false,
				"visibility": true,
				"transition": "none",
				"items": []
			},
			{
				"id": "button-3",
				"type": "playlist",
				"timeDefined": false,
				"visibility": true,
				"transition": "none",
				"items": []
			},
			{
				"id": "dial-1",
				"type": "playlist",
				"timeDefined": false,
				"visibility": true,
				"transition": "none",
				"items": []
			},
			{
				"id": "dial-2",
				"type": "playlist",
				"timeDefined": false,
				"visibility": true,
				"transition": "none",
				"items": []
			},
			{
				"id": "video-1",
				"type": "playlist",
				"timeDefined": false,
				"visibility": false,
				"transition": "none",
				"items": [
					{
						"name": "Video Widget",
						"duration": 10,
						"type": "widget",
						"objectReference": "2d407395-d1ae-452c-bc27-78124a47132b",
						"objectData": "https://s3.amazonaws.com/widget-video-rv/1.0.0/dist/widget.html",
						"additionalParams": "{\"url\":\"\",\"selector\":{\"selection\":\"single-file\",\"storageName\":\"peter/video-test/MadeInLadakh-HD.mp4\",\"url\":\"https://storage.googleapis.com/risemedialibrary-f114ad26-949d-44b4-87e9-8528afc76ce4/peter%2Fvideo-test%2FMadeInLadakh-HD.mp4\"},\"storage\":{\"companyId\":\"f114ad26-949d-44b4-87e9-8528afc76ce4\",\"fileName\":\"MadeInLadakh-HD.mp4\",\"folder\":\"peter/video-test/\"},\"video\":{\"scaleToFit\":true,\"volume\":0,\"controls\":true,\"autoplay\":true,\"resume\":true,\"pause\":1}}",
						"timeDefined": false
					}
				]
			},
			{
				"id": "video-2",
				"type": "playlist",
				"timeDefined": false,
				"visibility": false,
				"transition": "none",
				"items": [
					{
						"name": "Video Widget",
						"duration": 10,
						"type": "widget",
						"objectReference": "2d407395-d1ae-452c-bc27-78124a47132b",
						"objectData": "https://s3.amazonaws.com/widget-video-rv/1.0.0/dist/widget.html",
						"additionalParams": "{\"url\":\"\",\"selector\":{\"selection\":\"single-file\",\"storageName\":\"peter/video-test/girlbythesea.mp4\",\"url\":\"https://storage.googleapis.com/risemedialibrary-f114ad26-949d-44b4-87e9-8528afc76ce4/peter%2Fvideo-test%2Fgirlbythesea.mp4\"},\"storage\":{\"companyId\":\"f114ad26-949d-44b4-87e9-8528afc76ce4\",\"fileName\":\"girlbythesea.mp4\",\"folder\":\"peter/video-test/\"},\"video\":{\"scaleToFit\":true,\"volume\":0,\"controls\":true,\"autoplay\":true,\"resume\":true,\"pause\":1}}",
						"timeDefined": false
					}
				]
			},
			{
				"id": "image-slideshow",
				"type": "playlist",
				"timeDefined": false,
				"visibility": true,
				"transition": "none",
				"items": [
					{
						"name": "Image Widget",
						"duration": 10,
						"type": "widget",
						"objectReference": "5233a598-35ce-41a4-805c-fd2147f144a3",
						"objectData": "https://s3.amazonaws.com/widget-image/0.1.1/dist/widget.html",
						"additionalParams": "{\"selector\":{\"selection\":\"single-folder\",\"storageName\":\"peter/multipage-test/multipage-images/\",\"url\":\"https://www.googleapis.com/storage/v1/b/risemedialibrary-f114ad26-949d-44b4-87e9-8528afc76ce4/o?prefix=peter%2Fmultipage-test%2Fmultipage-images%2F\"},\"storage\":{\"companyId\":\"f114ad26-949d-44b4-87e9-8528afc76ce4\",\"folder\":\"peter/multipage-test/multipage-images/\",\"fileName\":\"\"},\"resume\":true,\"scaleToFit\":true,\"position\":\"middle-center\",\"duration\":10,\"pause\":10,\"autoHide\":false,\"url\":\"\",\"background\":{}}",
						"timeDefined": false
					}
				]
			}
		]
	}
};
	//-->
	</script>
<!-- No scripts after this point -->
</html>


            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console