Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

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


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


  By default user progress is saved in the browser's local storage, this means that user can continue to watch the video where he left off. You can store this progress and restore it in the next session in case you want to give your user seamless experience on any of his devices (Netflix style). To do that simply send user progress stats.hm_range to be saved on your server and restore it using gallery.set_video_play_stats() in the video.load callback.
  Get realtime stats about the video that is being played. Register to get a callback video.timeupdate and each callback sample gallery.get_video_play_stats(). hm_range will contain a csv list of all seconds that were already played. each value can also be a range for example "10-20,30-40" means that user watched from second 10 to 20 and from 30 to 40. in case user watch a specific second or a range more than one time then a colon will be used for example "10-20:2,21-30,31:3" means that user watched second 10 to 20 twice, 21-30 one time and second 31 3 times.
current_completion_percent <span id="current_completion_percent">0</span>% - current progress of the video
<br>completion_percent <span id="completion_percent">0</span>% - actually watched
<br>hm_range "<span id="hm_range">...</span>" - a comma separated range in seconds of actual play and how much each segment was played, jump forth and back in the video to see it changes
<br>duration_sec <span id="duration_sec">0</span> sec, current_progress_sec <span id="current_progress_sec">0</span> sec, completion_sec <span id="completion_sec">0</span> sec, 
<div id="cp_widget_1539590707155">...</div>

<script type="text/javascript">
var cincopa = cincopa || {};
cincopa.analytics_persistent = { mode: "localstorage" };
cincopa.registeredFunctions = cincopa.registeredFunctions || [];
	func: function (name, data, gallery) {    
    var stats = gallery.get_video_play_stats(data);
    document.getElementById("current_completion_percent").innerHTML = stats.current_completion_percent;
    document.getElementById("completion_percent").innerHTML = stats.completion_percent;
    document.getElementById("hm_range").innerHTML = stats.hm_range;
    document.getElementById("duration_sec").innerHTML = stats.duration_sec;
    document.getElementById("current_progress_sec").innerHTML = stats.current_progress_sec;
    document.getElementById("completion_sec").innerHTML = stats.completion_sec;
    // update server with user progress stats.hm_range
	}, filter: "video.timeupdate"
	func: function (name, data, gallery) {
    // load user progress from server and set the player to continue
    gallery.set_video_play_stats(data, "0-7,8-13:2,14-16");
	}, filter: "video.load"

<script type="text/javascript">
var cpo = []; cpo["_object"] ="cp_widget_1539590707155"; cpo["_fid"] = "A4HAcLOLOO68!AYJDnKyNYNPX";
var _cpmp = _cpmp || []; _cpmp.push(cpo);
(function() { var cp = document.createElement("script"); cp.type = "text/javascript";
cp.async = true; cp.src = "//";
var c = document.getElementsByTagName("script")[0];
c.parentNode.insertBefore(cp, c); })();