all repos — simplyrpg @ main

Fork of https://github.com/harperd1/simplyRPG — multi-map VTT, token visibility, dark theme, stream HUD

libraries/EaselJS_docs/classes/VideoBuffer.html (view raw)

  1<!DOCTYPE html>
  2<html lang="en">
  3<head>
  4    <meta charset="utf-8">
  5    <link rel="stylesheet" href="../assets/css/yui-cssgrids-min.css">
  6    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
  7    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
  8    <link rel="shortcut icon" type="image/x-icon" href="../assets/favicon.ico">
  9    <script src="../assets/js/yui-source.js"></script>
 10	<title>EaselJS v1.0.0 API Documentation : VideoBuffer</title>
 11</head>
 12<body class="yui3-skin-sam">
 13
 14<div id="doc">
 15    <div id="hd" class="yui3-g header">
 16        <div class="yui3-u-3-4">
 17            
 18                <h1><a href="http://www.createjs.com/easeljs"><img src="../assets/docs-icon-EaselJS.png" title="EaselJS"></a></h1>
 19            
 20        </div>
 21        <div class="version">
 22            <em>API Documentation for: 1.0.0</em>
 23        </div>
 24    </div>
 25    <div id="bd" class="yui3-g">
 26
 27        <div class="yui3-u-1-4">
 28            <div id="docs-sidebar" class="sidebar apidocs">
 29                <div id="api-list">
 30    <h2 class="off-left">APIs</h2>
 31    <div id="api-tabview" class="tabview">
 32        <ul class="tabs">
 33            <li><a href="#api-classes">Classes</a></li>
 34        </ul>
 35
 36        <div id="api-tabview-filter">
 37            <input type="search" id="api-filter" placeholder="Type to filter APIs">
 38        </div>
 39
 40        <div id="api-tabview-panel">
 41            <ul id="api-classes" class="apis classes">
 42            
 43                <li><a href="../classes/AlphaMapFilter.html">AlphaMapFilter</a></li>
 44            
 45                <li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
 46            
 47                <li><a href="../classes/Bitmap.html">Bitmap</a></li>
 48            
 49                <li><a href="../classes/BitmapCache.html">BitmapCache</a></li>
 50            
 51                <li><a href="../classes/BitmapText.html">BitmapText</a></li>
 52            
 53                <li><a href="../classes/BlurFilter.html">BlurFilter</a></li>
 54            
 55                <li><a href="../classes/ButtonHelper.html">ButtonHelper</a></li>
 56            
 57                <li><a href="../classes/ColorFilter.html">ColorFilter</a></li>
 58            
 59                <li><a href="../classes/ColorMatrix.html">ColorMatrix</a></li>
 60            
 61                <li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
 62            
 63                <li><a href="../classes/Container.html">Container</a></li>
 64            
 65                <li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
 66            
 67                <li><a href="../classes/DisplayProps.html">DisplayProps</a></li>
 68            
 69                <li><a href="../classes/DOMElement.html">DOMElement</a></li>
 70            
 71                <li><a href="../classes/EaselJS.html">EaselJS</a></li>
 72            
 73                <li><a href="../classes/Event.html">Event</a></li>
 74            
 75                <li><a href="../classes/EventDispatcher.html">EventDispatcher</a></li>
 76            
 77                <li><a href="../classes/Filter.html">Filter</a></li>
 78            
 79                <li><a href="../classes/Graphics.html">Graphics</a></li>
 80            
 81                <li><a href="../classes/Graphics.Arc.html">Graphics.Arc</a></li>
 82            
 83                <li><a href="../classes/Graphics.ArcTo.html">Graphics.ArcTo</a></li>
 84            
 85                <li><a href="../classes/Graphics.BeginPath.html">Graphics.BeginPath</a></li>
 86            
 87                <li><a href="../classes/Graphics.BezierCurveTo.html">Graphics.BezierCurveTo</a></li>
 88            
 89                <li><a href="../classes/Graphics.Circle.html">Graphics.Circle</a></li>
 90            
 91                <li><a href="../classes/Graphics.ClosePath.html">Graphics.ClosePath</a></li>
 92            
 93                <li><a href="../classes/Graphics.Ellipse.html">Graphics.Ellipse</a></li>
 94            
 95                <li><a href="../classes/Graphics.Fill.html">Graphics.Fill</a></li>
 96            
 97                <li><a href="../classes/Graphics.LineTo.html">Graphics.LineTo</a></li>
 98            
 99                <li><a href="../classes/Graphics.MoveTo.html">Graphics.MoveTo</a></li>
100            
101                <li><a href="../classes/Graphics.PolyStar.html">Graphics.PolyStar</a></li>
102            
103                <li><a href="../classes/Graphics.QuadraticCurveTo.html">Graphics.QuadraticCurveTo</a></li>
104            
105                <li><a href="../classes/Graphics.Rect.html">Graphics.Rect</a></li>
106            
107                <li><a href="../classes/Graphics.RoundRect.html">Graphics.RoundRect</a></li>
108            
109                <li><a href="../classes/Graphics.Stroke.html">Graphics.Stroke</a></li>
110            
111                <li><a href="../classes/Graphics.StrokeDash.html">Graphics.StrokeDash</a></li>
112            
113                <li><a href="../classes/Graphics.StrokeStyle.html">Graphics.StrokeStyle</a></li>
114            
115                <li><a href="../classes/Matrix2D.html">Matrix2D</a></li>
116            
117                <li><a href="../classes/MouseEvent.html">MouseEvent</a></li>
118            
119                <li><a href="../classes/MovieClip.html">MovieClip</a></li>
120            
121                <li><a href="../classes/MovieClipPlugin.html">MovieClipPlugin</a></li>
122            
123                <li><a href="../classes/Point.html">Point</a></li>
124            
125                <li><a href="../classes/Rectangle.html">Rectangle</a></li>
126            
127                <li><a href="../classes/Shadow.html">Shadow</a></li>
128            
129                <li><a href="../classes/Shape.html">Shape</a></li>
130            
131                <li><a href="../classes/Sprite.html">Sprite</a></li>
132            
133                <li><a href="../classes/SpriteSheet.html">SpriteSheet</a></li>
134            
135                <li><a href="../classes/SpriteSheetBuilder.html">SpriteSheetBuilder</a></li>
136            
137                <li><a href="../classes/SpriteSheetUtils.html">SpriteSheetUtils</a></li>
138            
139                <li><a href="../classes/Stage.html">Stage</a></li>
140            
141                <li><a href="../classes/StageGL.html">StageGL</a></li>
142            
143                <li><a href="../classes/Text.html">Text</a></li>
144            
145                <li><a href="../classes/Ticker.html">Ticker</a></li>
146            
147                <li><a href="../classes/Touch.html">Touch</a></li>
148            
149                <li><a href="../classes/UID.html">UID</a></li>
150            
151                <li><a href="../classes/Utility Methods.html">Utility Methods</a></li>
152            
153                <li><a href="../classes/VideoBuffer.html">VideoBuffer</a></li>
154            
155                <li><a href="../classes/WebGLInspector.html">WebGLInspector</a></li>
156            
157            </ul>
158
159            <ul id="api-modules" class="apis modules">
160            
161                <li><a href="../modules/CreateJS.html">CreateJS</a></li>
162            
163                <li><a href="../modules/EaselJS.html">EaselJS</a></li>
164            
165            </ul>
166        </div>
167    </div>
168</div>
169
170            </div>
171        </div>
172        <div class="yui3-u-3-4">
173            <div id="api-options">
174        Show:
175        <label for="api-show-inherited">
176            <input type="checkbox" id="api-show-inherited" checked>
177            Inherited
178        </label>
179
180        <label for="api-show-protected">
181            <input type="checkbox" id="api-show-protected">
182            Protected
183        </label>
184
185        <label for="api-show-private">
186            <input type="checkbox" id="api-show-private">
187            Private
188        </label>
189        <label for="api-show-deprecated">
190            <input type="checkbox" id="api-show-deprecated">
191            Deprecated
192        </label>
193
194    </div>
195            <div class="apidocs">
196                <div id="docs-main">
197                    <div class="content">
198                        <h1>VideoBuffer Class</h1>
199<div class="box meta">
200    
201
202    
203
204    
205        <div class="foundat">
206            Defined in: <a href="../files/easeljs_utils_VideoBuffer.js.html#l41"><code>VideoBuffer:41</code></a>
207        </div>
208    
209
210    
211        
212            Module: <a href="../modules/EaselJS.html">EaselJS</a>
213        
214    
215
216    
217</div>
218
219
220
221<div class="box intro">
222    <p>When an HTML video seeks, including when looping, there is an indeterminate period before a new frame is available.
223This can result in the video blinking or flashing when it is drawn to a canvas. The VideoBuffer class resolves
224this issue by drawing each frame to an off-screen canvas and preserving the prior frame during a seek.</p>
225<pre class="code prettyprint"><code>var myBuffer = new createjs.VideoBuffer(myVideo);
226var myBitmap = new Bitmap(myBuffer);</code></pre>
227
228</div>
229
230
231    <div class="constructor">
232        <h2>Constructor</h2>
233        <div id="method_VideoBuffer" class="method item">
234    <h3 class="name"><code>VideoBuffer</code></h3>
235
236    
237        <div class="args">
238            <span class="paren">(</span><ul class="args-list inline commas">
239            
240                <li class="arg">
241                    
242                        <code>video</code>
243                    
244                </li>
245            
246            </ul><span class="paren">)</span>
247        </div>
248    
249
250    
251
252    
253
254    
255
256    
257
258    
259
260    
261
262    
263
264    <div class="meta">
265        
266            
267                
268                <p>
269                
270                Defined in
271                
272            
273        
274        
275        <a href="../files/easeljs_utils_VideoBuffer.js.html#l41"><code>VideoBuffer:41</code></a>
276        
277        </p>
278
279
280        
281
282        
283    </div>
284
285    <div class="description">
286        
287    </div>
288
289    
290        <div class="params">
291            <h4>Parameters:</h4>
292
293            <ul class="params-list">
294            
295                <li class="param">
296                    
297                        <code class="param-name">video</code>
298                        <span class="type">HTMLVideoElement</span>
299                    
300
301                    
302
303                    <div class="param-description">
304                        <p>The HTML video element to buffer.</p>
305
306                    </div>
307
308                    
309                </li>
310            
311            </ul>
312        </div>
313    
314
315    
316
317    
318</div>
319
320    </div>
321
322
323<div id="classdocs" class="tabview">
324    <ul class="api-class-tabs">
325        <li class="api-class-tab index"><a href="#index">Index</a></li>
326
327        
328            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
329        
330        
331            <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
332        
333        
334        
335    </ul>
336
337    <div>
338        <div id="index" class="api-class-tabpanel index">
339            <h2 class="off-left">Item Index</h2>
340
341            
342                <div class="index-section methods">
343                    <h3>Methods</h3>
344
345                    <ul class="index-list methods">
346                        
347                            <li class="index-item method protected">
348                                <a href="#method__videoReady">_videoReady</a>
349
350                                
351                                
352                            </li>
353                        
354                            <li class="index-item method">
355                                <a href="#method_getImage">getImage</a>
356
357                                
358                                
359                            </li>
360                        
361                    </ul>
362                </div>
363            
364
365            
366                <div class="index-section properties">
367                    <h3>Properties</h3>
368
369                    <ul class="index-list properties">
370                        
371                            <li class="index-item property protected">
372                                <a href="#property__canvas">_canvas</a>
373
374                                
375                                
376                            </li>
377                        
378                            <li class="index-item property protected">
379                                <a href="#property__lastTime">_lastTime</a>
380
381                                
382                                
383                            </li>
384                        
385                            <li class="index-item property protected">
386                                <a href="#property__video">_video</a>
387
388                                
389                                
390                            </li>
391                        
392                            <li class="index-item property protected">
393                                <a href="#property_readyState">readyState</a>
394
395                                
396                                
397                            </li>
398                        
399                    </ul>
400                </div>
401            
402
403            
404
405            
406        </div>
407
408        
409            <div id="methods" class="api-class-tabpanel">
410                <h2 class="off-left">Methods</h2>
411
412                
413                    <div id="method__videoReady" class="method item protected">
414    <h3 class="name"><code>_videoReady</code></h3>
415
416    
417        <span class="paren">()</span>
418    
419
420    
421
422    
423
424    
425        <span class="flag protected">protected</span>
426    
427
428    
429
430    
431
432    
433
434    
435
436    <div class="meta">
437        
438            
439                
440                <p>
441                
442                Defined in
443                
444            
445        
446        
447        <a href="../files/easeljs_utils_VideoBuffer.js.html#l118"><code>_videoReady:118</code></a>
448        
449        </p>
450
451
452        
453
454        
455    </div>
456
457    <div class="description">
458        
459    </div>
460
461    
462
463    
464
465    
466</div>
467
468                
469                    <div id="method_getImage" class="method item">
470    <h3 class="name"><code>getImage</code></h3>
471
472    
473        <span class="paren">()</span>
474    
475
476    
477
478    
479
480    
481
482    
483
484    
485
486    
487
488    
489
490    <div class="meta">
491        
492            
493                
494                <p>
495                
496                Defined in
497                
498            
499        
500        
501        <a href="../files/easeljs_utils_VideoBuffer.js.html#l95"><code>getImage:95</code></a>
502        
503        </p>
504
505
506        
507
508        
509    </div>
510
511    <div class="description">
512        <p>Gets an HTML canvas element showing the current video frame, or the previous frame if in a seek / loop.
513Primarily for use by <a href="../classes/Bitmap.html" class="crosslink">Bitmap</a>.</p>
514
515    </div>
516
517    
518
519    
520
521    
522</div>
523
524                
525            </div>
526        
527
528        
529            <div id="properties" class="api-class-tabpanel">
530                <h2 class="off-left">Properties</h2>
531
532                
533                    <div id="property__canvas" class="property item protected">
534    <h3 class="name"><code>_canvas</code></h3>
535    <span class="type">HTMLCanvasElement</span>
536
537    
538
539    
540        <span class="flag protected">protected</span>
541    
542
543    
544
545    
546
547    
548
549    <div class="meta">
550        
551            
552                
553                <p>
554                
555                Defined in
556                
557            
558        
559        
560        <a href="../files/easeljs_utils_VideoBuffer.js.html#l73"><code>_canvas:73</code></a>
561        
562        </p>
563
564        
565
566        
567    </div>
568
569    <div class="description">
570        
571    </div>
572
573    
574        <p><strong>Default:</strong> 0</p>
575    
576
577    
578
579    
580</div>
581
582                
583                    <div id="property__lastTime" class="property item protected">
584    <h3 class="name"><code>_lastTime</code></h3>
585    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
586
587    
588
589    
590        <span class="flag protected">protected</span>
591    
592
593    
594
595    
596
597    
598
599    <div class="meta">
600        
601            
602                
603                <p>
604                
605                Defined in
606                
607            
608        
609        
610        <a href="../files/easeljs_utils_VideoBuffer.js.html#l81"><code>_lastTime:81</code></a>
611        
612        </p>
613
614        
615
616        
617    </div>
618
619    <div class="description">
620        
621    </div>
622
623    
624        <p><strong>Default:</strong> -1</p>
625    
626
627    
628
629    
630</div>
631
632                
633                    <div id="property__video" class="property item protected">
634    <h3 class="name"><code>_video</code></h3>
635    <span class="type">HTMLVideoElement</span>
636
637    
638
639    
640        <span class="flag protected">protected</span>
641    
642
643    
644
645    
646
647    
648
649    <div class="meta">
650        
651            
652                
653                <p>
654                
655                Defined in
656                
657            
658        
659        
660        <a href="../files/easeljs_utils_VideoBuffer.js.html#l65"><code>_video:65</code></a>
661        
662        </p>
663
664        
665
666        
667    </div>
668
669    <div class="description">
670        
671    </div>
672
673    
674        <p><strong>Default:</strong> 0</p>
675    
676
677    
678
679    
680</div>
681
682                
683                    <div id="property_readyState" class="property item protected">
684    <h3 class="name"><code>readyState</code></h3>
685    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
686
687    
688
689    
690        <span class="flag protected">protected</span>
691    
692
693    
694
695    
696
697    
698
699    <div class="meta">
700        
701            
702                
703                <p>
704                
705                Defined in
706                
707            
708        
709        
710        <a href="../files/easeljs_utils_VideoBuffer.js.html#l56"><code>readyState:56</code></a>
711        
712        </p>
713
714        
715
716        
717    </div>
718
719    <div class="description">
720        <p>Used by Bitmap to determine when the video buffer is ready to be drawn. Not intended for general use.</p>
721
722    </div>
723
724    
725        <p><strong>Default:</strong> 0</p>
726    
727
728    
729
730    
731</div>
732
733                
734            </div>
735        
736
737        
738
739        
740    </div>
741</div>
742
743                    </div>
744                </div>
745            </div>
746        </div>
747    </div>
748</div>
749<script src="../assets/vendor/prettify/prettify-min.js"></script>
750<script>prettyPrint();</script>
751<script src="../assets/js/yui-prettify.js"></script>
752<script src="../assets/../api.js"></script>
753<script src="../assets/js/api-filter.js"></script>
754<script src="../assets/js/api-list.js"></script>
755<script src="../assets/js/api-search.js"></script>
756<script src="../assets/js/apidocs.js"></script>
757</body>
758</html>