mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Upped Processing.js to 1.3.6, plus fixes to examples for 1.3.6
This commit is contained in:
@@ -6,6 +6,13 @@ window.onload = function () {
|
||||
var sketch = Processing.instances[0];
|
||||
if ( sketch == undefined )
|
||||
return setTimeout(tryFindSketch, 200); // retry in 0.2 secs
|
||||
|
||||
// extending our HTMLVideoElement object to return a PImage
|
||||
video['getFrame'] = function () {
|
||||
var img = new sketch.PImage;
|
||||
img.fromHTMLImageData(video);
|
||||
return img;
|
||||
};
|
||||
|
||||
(function( s, v ){
|
||||
var tryAddVideo = function () {
|
||||
@@ -19,6 +26,8 @@ window.onload = function () {
|
||||
})( sketch, video );
|
||||
}
|
||||
|
||||
// looping currently not working in chrome as our internal server does
|
||||
// not support http byte ranges
|
||||
addEvent(video,'ended',function(){
|
||||
if ( 'loop' in this && this.loop ) {
|
||||
this.currentTime = 0;
|
||||
|
||||
Reference in New Issue
Block a user