Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1020)

Unified Diff: src/site/samples/video/example/video.dart

Issue 30853002: Added several more HTML5 samples (Closed) Base URL: https://github.com/dart-lang/dartlang.org.git@master
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/site/samples/video/example/video.dart
diff --git a/src/site/samples/video/example/video.dart b/src/site/samples/video/example/video.dart
new file mode 100644
index 0000000000000000000000000000000000000000..fce8d4d798f46c3089249271f1564a58e3c241a8
--- /dev/null
+++ b/src/site/samples/video/example/video.dart
@@ -0,0 +1 @@
+import "dart:html" as j;class t{const t();}class u{final name;const u(this.name);}class v{const v();}class AB{const AB();}class BB{var DB;var EB;var FB;var GB;var HB;var IB,JB;var KB=false;final LB=100;final MB=4;BB(){var h=-2.0;DB=j.query('#video-canvas-fancy');EB=j.query('#canvas-copy-fancy');FB=j.query('#canvas-draw-fancy');GB=<num>[] ;HB=<num>[] ;for(var i=0;i<MB;i++ ){GB.add(0);HB.add(h);h+= 0.4;}DB.onCanPlay.listen((g)=>NB());DB.onPlay.listen((g)=>OB());DB.onPause.listen((g)=>PB());DB.onEnded.listen((g)=>PB());} NB(){EB.width=FB.width=DB.videoWidth;EB.height=DB.videoHeight;FB.height=DB.videoHeight+LB;IB=EB.context2D;JB=FB.context2D;} OB(){KB=true;QB();} QB(){if(!KB)return;var k=DB.videoWidth/MB;IB.drawImage(DB,0,0);JB.clearRect(0,0,FB.width,FB.height);for(var g=0;g<MB;g++ ){var l=g*k;var i=0;var h=k;var m=DB.videoHeight;var n=l;var o=GB[g]+i+LB;var q=h;var s=m;JB.drawImageScaledFromSource(EB,l,i,h,m,n,o,q,s);if((GB[g]+HB[g]).abs()<LB){GB[g]+=HB[g];}else{HB[g]=-HB[g];}}j.window.requestAnimationFrame(( CB){QB();return false;});} PB(){KB=false;}} main(){new BB();}
« no previous file with comments | « src/site/samples/video/example/packages/browser/interop.js ('k') | src/site/samples/video/example/video.dart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698