-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfluent.html
More file actions
executable file
·1008 lines (918 loc) · 37.6 KB
/
fluent.html
File metadata and controls
executable file
·1008 lines (918 loc) · 37.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<title>HTML5, Flash, and the Battle for Faster Cat Videos</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<!--<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">-->
<!--<meta name="viewport" content="width=device-width, initial-scale=1.0">-->
<!--This one seems to work all the time, but really small on ipad-->
<!--<meta name="viewport" content="initial-scale=0.4">-->
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" media="all" href="theme/css/default.css">
<link rel="stylesheet" media="only screen and (max-device-width: 480px)" href="theme/css/phone.css">
<style>
.segue {
background-position: center;
background-repeat: no-repeat;
}
.browser-graph .highlight,
.browser-graph .ie {
-webkit-transition: opacity 2s;
-moz-transition: opacity 2s;
-o-transition: opacity 2s;
transition: opacity 2s;
}
.browser-graph .highlight {
opacity: 1;
}
.graph-centered,
.vert-centered {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
-o-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.graph-centered {
left: 60%;
}
</style>
<base target="_blank"> <!-- This amazingness opens all links in a new tab. -->
<script data-main="js/slides" src="js/require-1.0.8.min.js"></script>
</head>
<body style="opacity: 0">
<slides class="layout-widescreen">
<slide class="logoslide nobackground">
<article class="flexbox vcenter">
<span><img src="images/google_developers_logo.png"></span>
</article>
</slide>
<style>
slides > slide.title-slide::after {
background: none;
}
</style>
<slide class="title-slide segue nobackground">
<aside class="gdbar"><img src="images/google_developers_icon_128.png"></aside>
<!-- The content of this hgroup is replaced programmatically through the slide_config.json. -->
<hgroup class="auto-fadein">
<h1>HTML5, Flash, and the Battle for Faster Cat Videos</h1>
<p>Greg Schechter - Web Warrior, YouTube
<br>
Phil Harnish - Sr. Play Button Eng, YouTube
</p>
<h1 data-config-title style="display:none"></h1>
<h2 data-config-subtitle style="display:none;"></h2>
<p data-config-presenter="" style="display:none;"></p>
</hgroup>
</slide>
<slide class="fill nobackground">
<div style="text-align: center; display: inline-block; width: 49%;">
<h2>Greg Schechter</h2>
<h2>The Web Warrior</h2>
<img src="images/greg.png" height="450">
<h3>schechter@youtube.com<h3>
</div>
<div style="text-align: center; display: inline-block; width: 49%;">
<h2>Phil Harnish</h2>
<h2>Sr. Play Button Eng</h2>
<img src="images/phil.png" height="450">
<h3>philharnish@youtube.com<h3>
</div>
</slide>
<slide class="fill nobackground" style="background-image: url(images/html5.png)">
<footer class="source black">http://www.w3.org/html/logo/</footer>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h2 class="black">
HTML + JS + CSS + Awesomeness
</h2>
</article>
</slide>
<style>
.html5-features svg {
height: 100px;
width: 100px;
display: block;
margin: auto;
-webkit-transition: fill 1s, -webkit-transform 1s;
-moz-transition: fill 1s, -moz-transform 1s;
-o-transition: fill 1s, -o-transform 1s;
transition: fill 1s, transform 1s;
}
.html5-features h4 {
text-align: center;
font-size: 30px;
font-weight: inherit;
color: #797979;
}
.html5-features ul {
overflow: hidden;
}
.html5-features li {
display: inline-block;
width: 23%;
}
.html5-features ul > li::before {
content: '';
}
.html5-features[data-step-on="2"] .multimedia {
fill: #F14A29;
-webkit-transform: scale(1.3);
-moz-transform: scale(1.3);
-o-transform: scale(1.3);
transform: scale(1.3);
}
.html5-features[data-step-on="1"] .used-feature {
fill: #F14A29;
-webkit-transform: scale(1.2);
-moz-transform: scale(1.2);
-o-transform: scale(1.2);
transform: scale(1.2);
}
</style>
<slide class="html5-features nobackground" data-number-of-steps="2">
<hgroup class="flexbox vcenter">
<ul>
<li>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0.0 0.0 240.2 217.3" class="used-feature">
<path d="M130.2,0L68.5,19.9 202.2,63.2 202.2,148.5 113.1,177.3 37.9,153.0 37.9,69.4 110.6,92.9 172.3,73.0 38.4,29.6 0,42.1 0,180.6 113.1,217.2 240.2,176.1 240.2,35.5z"/>
</svg>
<h4>Graphics</h4>
</li>
<li>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 305.5 229.5">
<path fill="#231F20" d="M229.5,172.5h37.9V81.5l-42.7-42.7l-26.8,26.8l31.6,31.6V172.5z M267.5,191.5 h-55.2h-77.0l-31.6-31.6l13.4-13.4l26.1,26.1h53.7l-52.9-53.0l13.5-13.5l52.9,52.9v-53.7 l-26.0-26.0l13.3-13.3L132.0,0L67.2,0.0V0L0,0.0l37.8,37.8v0.1h0.2l78.2-0.0l27.7,27.7 l-40.5,40.5l-27.7-27.7V56.9H37.8v37.2l65.6,65.6l-26.7,26.7l42.7,42.7h64.8h121.1v-0.0 L267.5,191.5z"/>
</svg>
<h4>Connectivity</h4>
</li>
<li>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 220.5 199.5" class="used-feature">
<path d="M32.8,0L25.4,37.0 176.0,37.0 171.3,60.9 20.6,60.9 13.3,97.9 163.9,97.9 155.5,140.1 94.8,160.2 42.2,140.1 45.8,121.8 8.8,121.8 0,166.2 87.0,199.5 187.3,166.2 200.6,99.4 203.3,86.0 220.4,0z"/>
</svg>
<h4>CSS3 Styling</h4>
</li>
<li>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 247.2 233.1">
<path fill="#231F20" d="M179.2,50.1L229.3,0h-53.7l-52.0,52.0L71.5,0H17.8l50.1,50.1H0v182.9h35.7h38.7 h14.9l34.1-34.1l34.1,34.1h19.8h33.9h35.7V50.1H179.2z M123.5,145.1l-49.8,49.9h-35.7V88.1h171.1 v106.9h-35.7L123.5,145.1z"/>
</svg>
<h4>Device Access</h4>
</li>
<li>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0.0 0.0 243.6 186.6" class="multimedia used-feature">
<path d="M243.4,0L189.7,0 151.7,37.9 205.4,37.9zM122.0,37.9L159.9,0 106.2,0 68.2,37.9zM205.5,148.6L37.9,148.6 37.9,38.3 76.3,0 22.5,0 0,22.5 0,186.6 243.5,186.6 243.5,37.9 205.5,37.9z"/>
</svg>
<h4>Multimedia</h4>
</li>
<li>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 294.1 256.3" class="used-feature">
<path d="M294.1,79.0H246.3C226.7,31.9,180.0,0,128.1,0C57.5,0,0,57.4,0,128.1 C0,198.8,57.5,256.3,128.1,256.3c51.9,0,98.5-31.8,118.2-79.0h47.7V79.0z M256.1,139.2H128.1 c-6.1,0-11.1-4.9-11.1-11.1c0-6.1,4.9-11.1,11.1-11.1h127.9V139.2z M128.1,218.3 c-49.7,0-90.1-40.4-90.1-90.1c0-49.7,40.4-90.1,90.1-90.1c30.8,0,59.1,16.0,75.5,41.0h-75.5 c-27.0,0-49.1,22.0-49.1,49.1c0,27.0,22.0,49.1,49.1,49.1h75.5 C187.3,202.3,159.0,218.3,128.1,218.3z"/>
</svg>
<h4>Offline and Storage</h4>
</li>
<li>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 278.28 278.31" class="used-feature">
<path d="M272.4,114.38L232.28,97.74l16.52-39.89c-4.22-5.90-8.78-11.48-13.80-16.56c-0.30-0.32-0.60-0.65-0.92-0.97 c-0.51-0.51-1.07-1-1.63-1.52c-4.91-4.82-10.31-9.19-16.00-13.29L176.56,42.01L159.93,1.90 c-14.45-2.44-29.03-2.50-43.14-0.35c-0.26,0.03-0.48,0.05-0.69,0.07c-0.61,0.09-1.20,0.22-1.75,0.35 L97.72,41.99L57.60,25.39c-11.98,8.55-22.39,18.83-30.89,30.44c-0.08,0.12-0.18,0.24-0.27,0.37 c-0.35,0.48-0.69,0.98-1.02,1.49l16.57,40.00L1.88,114.34c-2.40,14.45-2.48,28.99-0.35,43.09 c0.03,0.25,0.05,0.52,0.10,0.76c0.07,0.59,0.19,1.16,0.30,1.74l40.06,16.58l-16.57,39.99 c3.81,5.34,7.92,10.46,12.39,15.15c0.79,0.83,1.54,1.70,2.37,2.52c0.57,0.59,1.22,1.13,1.83,1.70 c4.82,4.69,10.13,8.94,15.7,12.93l39.97-16.56l16.58,40.05c0.59,0.12,1.22,0.23,1.82,0.37 c0.14-0.02,0.32,0.01,0.47,0.03c14.17,2.18,28.78,2.11,43.33-0.31l16.62-40.12l40.02,16.58 c0.52-0.31,1.03-0.66,1.52-1.03c0.15-0.09,0.30-0.22,0.47-0.35c11.51-8.46,21.78-18.82,30.32-30.77l-16.62-40.14 l40.06-16.58c0.10-0.57,0.23-1.18,0.34-1.80c0.02-0.18,0.02-0.37,0.05-0.55 C274.88,143.47,274.82,128.89,272.4,114.38z M239.98,144.63l-42.22,17.49l0.06,0.16l-0.14,0.05l17.50,42.20 c-3.26,3.80-6.81,7.32-10.63,10.63l-42.22-17.47l-0.05,0.14l-0.14-0.07l-17.48,42.2 c-4.99,0.37-9.97,0.35-15.02,0.02l-17.50-42.22l-0.12,0.05l-0.07-0.16l-42.35,17.55 c-0.44-0.37-0.93-0.70-1.37-1.11c-1.40-1.24-2.72-2.65-4.05-4.00c-1.33-1.33-2.72-2.61-3.99-4.02 c-0.37-0.40-0.71-0.92-1.09-1.37l17.52-42.35l-0.14-0.07l0.07-0.13l-42.23-17.49 c-0.33-5.04-0.36-10.05,0.03-15.02l42.18-17.47l-0.04-0.13l0.12-0.05L59.09,69.73 c3.31-3.81,6.84-7.37,10.62-10.62l42.22,17.47l0.05-0.12l0.12,0.05l17.50-42.22c5.04-0.35,10.04-0.35,15.03,0.02 l17.47,42.22l0.18,0.07l42.22-17.49c1.83,1.61,3.59,3.33,5.36,5.06c1.78,1.81,3.56,3.63,5.22,5.56l-17.47,42.20 l0.14,0.05l-0.06,0.16l42.21,17.47C240.34,134.60,240.35,139.61,239.98,144.63z M172.59,122.50l-0.06-0.12 l10.23-24.62c-1.87-2.21-3.97-4.26-6.19-6.23l-24.66,10.20l-0.03-0.06l-0.08,0.02l-10.20-24.64 c-2.91-0.23-5.83-0.23-8.77,0l-10.21,24.63l-0.07,0.00l-0.04,0.03l-24.65-10.17c-2.20,1.87-4.25,3.94-6.23,6.15 l10.23,24.67l-0.08,0.03l0.03,0.09l-24.73,10.26c-0.03,0.31-0.08,0.68-0.10,1.00 c-0.05,1.09-0.01,2.21-0.02,3.31c0,1.09-0.04,2.22,0.05,3.32c0,0.34,0.02,0.68,0.08,1.03l24.73,10.24l-0.00,0.11 l0.05,0.03l-10.19,24.65c1.88,2.20,3.98,4.25,6.21,6.15l24.63-10.20l0.02,0.10l0.09-0.03l10.21,24.65 c2.96,0.23,5.88,0.23,8.78,0l10.20-24.65l0.08,0.03l0.05-0.09l24.63,10.18c2.22-1.90,4.27-3.97,6.19-6.17 l-10.20-24.63l0.07-0.05l-0.03-0.09l24.63-10.20c0.10-1.48,0.12-3.00,0.14-4.45c0-1.44-0.02-2.89-0.12-4.30 L172.59,122.50z M137.15,153.76c-9.18,0-16.63-7.44-16.63-16.63c0-9.18,7.44-16.63,16.63-16.63s16.63,7.44,16.63,16.63 C153.78,146.31,146.33,153.76,137.15,153.76z"/>
</svg>
<h4>Performance and Integration</h4>
</li>
<li>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 256.155 256.155">
<polygon fill="black" points="128.106,0 0,64.744 0,107.32 128.106,42.577 256.155,107.32 256.155,64.744"/>
<polygon fill="black" points="128.106,74.316 0,139.06 0,181.636 128.106,116.893 256.155,181.636 256.155,139.06"/>
<polygon y="148.653" fill="black" points="128.106,148.653 0,213.397 0,255.973 128.106,191.23 256.155,255.973 256.155,213.397"/>
</svg>
<h4>Semantics</h4>
</li>
</ul>
</hgroup>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h2 class="black">
Translation
</h2>
</article>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h2 class="black" style="line-height: 400px">
HTML5 -> <img style="vertical-align: middle; height: 400px;" src="images/rainbow.jpg">
</h2>
</article>
<footer class="source">http://www.flickr.com/photos/geishaboy500/3183872667/</footer>
</slide>
<slide class="fill nobackground">
<article class="flexbox vcenter">
<img src="images/flash.png">
</article>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h2 class="black">
Why HTML5?
</h2>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>HTML5 vs Flash</h2>
</hgroup>
<article>
<ul>
<li>Features</li>
<li>Accessibility</li>
<li>"Device-ability"</li>
<li>Security</li>
<li>Embeds</li>
<li>API</li>
</ul>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Round 1: Features</h2>
</hgroup>
<article class="flexbox vcenter">
<img src="images/features.jpg" style="height: 470px;">
</article>
<footer class="source">http://www.flickr.com/photos/zipckr/4624150058/</footer>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Why Flash?</h2>
<h3>Features missing in HTML5</h3>
</hgroup>
<article>
<ul class="build">
<li>Content protection<ul><li>RTMPE protocol / Flash Access</li></ul></li>
<li>Camera & Microphone Access</li>
<li>Adaptive & Live Streaming</li>
<li>Fullscreen video
<ul>
<li>HD, hardware accelerated cat videos!</li>
<li>**API available in webkit and gecko </li>
</ul>
</li>
</ul>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Webkit Fullscreen API</h2>
</hgroup>
<article>
<pre class="prettyprint" data-lang="javascript">
<script>
var elem = document.getElementById("my-element");
document.onwebkitfullscreenchange = function() {
// The fullscreen element:
// document.webkitFullScreenElement;
console.log ("We went fullscreen!");
};
elem.webkitRequestFullScreen();
</script>
</pre>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Why Flash?</h2>
<h3>Features missing in HTML5</h3>
</hgroup>
<article>
<ul>
<li>Content protection<ul><li>RTMPE protocol / Flash Access</li></ul></li>
<li>Camera & Microphone Access</li>
<li>Adaptive & Live Streaming</li>
<li>Fullscreen video
<ul>
<li>HD, hardware accelerated cat videos!</li>
<li>**API available in webkit and gecko </li>
</ul>
</li>
</ul>
<ul class="build">
<li>Consistent format support<ul><li>HTML5 needs to support both H.264 and WebM</li></ul></li>
<li>Cross platform consistency****</li>
</ul>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Why HTML5?</h2>
<h3><video> Expectations</h3>
</hgroup>
<article>
<ul class="build">
<li>Open source technology<ul><li>Browser / Player / Codec</li></ul></li>
<li>Lower latency<ul><li>No plug-in instantiation</li></ul></li>
<li>Better performance and fidelity<ul><li>Power consumption</li></ul></li>
</ul>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Power</h2>
</hgroup>
<article>
<iframe data-src="http://www.youtube.com/embed/f5Fg6KFcOsU?rel=0"></iframe>
</article>
</slide>
<style>
.power {
margin-top: -23px;
-webkit-transform: scale(.9);
-moz-transform: scale(.9);
-o-transform: scale(.9);
transform: scale(.9);
}
</style>
<slide class="mobile-stats nobackground">
<hgroup>
<h2>Power Consumption: H264 vs WebM</h2>
</hgroup>
<article class="centered power">
<svg width="900" height="600"><defs id="defs"><clipPath id="_ABSTRACT_RENDERER_ID_2"><rect x="172" y="115" width="556" height="371"></rect></clipPath></defs><rect x="0" y="0" width="900" height="600" stroke="none" stroke-width="0" fill="#ffffff"></rect><g><rect x="748" y="115" width="132" height="52" stroke="none" stroke-width="0" fill-opacity="0" fill="#ffffff"></rect><g><rect x="748" y="115" width="132" height="20" stroke="none" stroke-width="0" fill-opacity="0" fill="#ffffff"></rect><g><text text-anchor="start" x="776" y="132" font-family="Arial" font-size="20" stroke="none" stroke-width="0" fill="#222222">Software</text></g><rect x="748" y="115" width="20" height="20" stroke="none" stroke-width="0" fill="#383b42"></rect></g><g><rect x="748" y="147" width="132" height="20" stroke="none" stroke-width="0" fill-opacity="0" fill="#ffffff"></rect><g><text text-anchor="start" x="776" y="164" font-family="Arial" font-size="20" stroke="none" stroke-width="0" fill="#222222">Hardware</text></g><rect x="748" y="147" width="20" height="20" stroke="none" stroke-width="0" fill="#bfbfbf"></rect></g></g><g><rect x="172" y="115" width="556" height="371" stroke="none" stroke-width="0" fill-opacity="0" fill="#ffffff"></rect><g clip-path="url(#_ABSTRACT_RENDERER_ID_2)"><g><rect x="172" y="115" width="1" height="371" stroke="none" stroke-width="0" fill="#cccccc"></rect><rect x="283" y="115" width="1" height="371" stroke="none" stroke-width="0" fill="#cccccc"></rect><rect x="394" y="115" width="1" height="371" stroke="none" stroke-width="0" fill="#cccccc"></rect><rect x="505" y="115" width="1" height="371" stroke="none" stroke-width="0" fill="#cccccc"></rect><rect x="616" y="115" width="1" height="371" stroke="none" stroke-width="0" fill="#cccccc"></rect></g><g><rect x="173" y="130" width="66" height="22" stroke="none" stroke-width="0" fill="#383b42"></rect><rect x="173" y="204" width="476" height="22" stroke="none" stroke-width="0" fill="#383b42"></rect><rect x="173" y="278" width="138" height="22" stroke="none" stroke-width="0" fill="#383b42"></rect><rect x="173" y="352" width="487" height="22" stroke="none" stroke-width="0" fill="#383b42"></rect><rect x="173" y="426" width="304" height="22" stroke="none" stroke-width="0" fill="#383b42"></rect><rect x="-604" y="153" width="776" height="22" stroke="none" stroke-width="0" fill="#bfbfbf"></rect><rect x="173" y="227" width="143" height="22" stroke="none" stroke-width="0" fill="#bfbfbf"></rect><rect x="173" y="301" width="132" height="22" stroke="none" stroke-width="0" fill="#bfbfbf"></rect><rect x="-604" y="375" width="776" height="22" stroke="none" stroke-width="0" fill="#bfbfbf"></rect><rect x="-604" y="449" width="776" height="22" stroke="none" stroke-width="0" fill="#bfbfbf"></rect></g><g><rect x="172" y="115" width="1" height="371" stroke="none" stroke-width="0" fill="#333333"></rect></g></g><g></g><g><g><text text-anchor="middle" x="172.5" y="515" font-family="Arial" font-size="20" stroke="none" stroke-width="0" fill="#444444">700</text></g><g><text text-anchor="middle" x="283.5" y="515" font-family="Arial" font-size="20" stroke="none" stroke-width="0" fill="#444444">800</text></g><g><text text-anchor="middle" x="394.5" y="515" font-family="Arial" font-size="20" stroke="none" stroke-width="0" fill="#444444">900</text></g><g><text text-anchor="middle" x="505.50000000000006" y="515" font-family="Arial" font-size="20" stroke="none" stroke-width="0" fill="#444444">1,000</text></g><g><text text-anchor="middle" x="616.5" y="515" font-family="Arial" font-size="20" stroke="none" stroke-width="0" fill="#444444">1,100</text></g><g><text text-anchor="end" x="152" y="159.5" font-family="Arial" font-size="20" stroke="none" stroke-width="0" fill="#222222">idle</text></g><g><text text-anchor="end" x="152" y="233.5" font-family="Arial" font-size="20" stroke="none" stroke-width="0" fill="#222222">webm</text></g><g><text text-anchor="end" x="152" y="307.5" font-family="Arial" font-size="20" stroke="none" stroke-width="0" fill="#222222">h264</text></g><g><text text-anchor="end" x="152" y="381.5" font-family="Arial" font-size="20" stroke="none" stroke-width="0" fill="#222222">flash*</text></g><g><text text-anchor="end" x="152" y="455.5" font-family="Arial" font-size="20" stroke="none" stroke-width="0" fill="#222222">flash**</text></g></g></g><g><g><text text-anchor="middle" x="450" y="566" font-family="Arial" font-size="20" font-style="italic" stroke="none" stroke-width="0" fill="#222222">Mean current draw (milliamps)</text></g></g><g></g></svg>
</article>
<footer class="source">Research done by Yossi Oren For more information visit <a href="http://iss.oy.ne.ro/">http://iss.oy.ne.ro/</a></footer>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Why HTML5?</h2>
<h3><video> Expectations</h3>
</hgroup>
<article>
<ul>
<li>Open source technology<ul><li>Browser / Player / Codec</li></ul></li>
<li>Lower latency<ul><li>No plug-in instantiation</li></ul></li>
<li>Better performance and fidelity<ul><li>Power consumption</li></ul></li>
</ul>
<ul class="build">
<li>Accessibility<ul><li>User agents can have special video handling</li></ul></li>
</ul>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Accessibility</h2>
</hgroup>
<article class="flexbox vcenter">
<img src="images/captioncats.png">
</article>
<footer class="source">http://imgs.xkcd.com/comics/in_ur_reality.png</footer>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h2 class="black">
Please put on your 3D Glasses
</h2>
</article>
</slide>
<slide class="fill nobackground">
<article class="flexbox vcenter">
<img src="images/3dcats.jpg" style="height:560px;">
</article>
<footer class="source">http://www.flickr.com/photos/jmettraux/4959258811/</footer>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Why HTML5?</h2>
<h3>3D</h3>
</hgroup>
<article>
<img src="images/3d.png" style="position:absolute; right: 25px;">
<ul style="width: 675px;">
<li>Flash
<ul>
<li>Build for graphics</li>
<li>Tools for easy video manipulation
<ul><li>HTML5 would require WebGL or Canvas</li></ul>
</li>
</ul>
</li>
<li>HTML5
<ul>
<li>Easy integration with browser and devices</li>
<li>Open Standard</li>
<li>Allows for innovations by the browser vendors as well as YouTube</li>
</ul>
</li>
</ul>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Round 2: Device-ability</h2>
</hgroup>
<article class="flexbox vcenter">
<img src="images/fight.jpg" style="height: 470px;">
</article>
<footer class="source">http://www.flickr.com/photos/dakiny/4430765149/</footer>
</slide>
<style>
.browser-dist .graph {
-webkit-transform: scale(1.3);
-ms-transform: scale(1.3);
-o-transform: scale(1.3);
transform: scale(1.3);
}
</style>
<style>
.care-graph[data-step-on="0"] .highlight,
.care-graph[data-step-on="1"] .ie8,
.care-graph[data-step-on="1"] .ie7 {
opacity: 0;
}
.care-graph[data-step-on="1"] .ie {
opacity: .5;
}
.care-graph .text-percent {
display: none;
}
.care-graph[data-step-on="1"] .text-percent {
display: block;
}
</style>
<slide class="nobackground browser-graph care-graph" data-number-of-steps="1" data-step-on="0">
<hgroup>
<h2 class="black">
HTML5 Video Capable Browsers
</h2>
<h3 class="text-percent black">
~80%
</h3>
</hgroup>
<article>
<svg class="graph-centered" width="1000" height="600"><g><path class="ie" d="M381,301L381,116A185,185,0,0,1,560.1878848087968,347.0076291254981L381,301A0,0,0,0,0,381,301" stroke="#ffffff" stroke-width="1" fill="#3366cc"></path><text text-anchor="start" x="500.3175317833905" y="208.2680787092657" font-family="Arial" font-size="15" stroke="none" stroke-width="0" fill="#ffffff">IE</text>
<path class="ie9 highlight" d="M381,112A189,189,0,0,1,533.9042119368651,189.90858731672256" stroke="#3366cc" stroke-width="5" fill-opacity="1" fill="none"></path>
<path class="ie8 highlight" d="M533.9042119368651,189.90858731672256A189,189,0,0,1,569.6270516729434,312.8674081910402" stroke="#3366cc" stroke-width="5" fill-opacity="1" fill="none"></path>
<path class="ie7 highlight" d="M569.6270516729434,312.8674081910402A189,189,0,0,1,564.0622174533113,348.0023886741576" stroke="#3366cc" stroke-width="5" fill-opacity="1" fill="none"></path>
</g>
<g><path d="M381,301L357.8133517906038,117.4587802568216A185,185,0,0,1,381,116L381,301A0,0,0,0,0,381,301" stroke="#ffffff" stroke-width="1" fill="#990099"></path>
<path class="opera highlight" d="M357.3120188563466,113.49032145156369A189,189,0,0,1,381,112" stroke="#990099" stroke-width="5" fill-opacity="1" fill="none"></path>
</g>
<g><path d="M381,301L302.2308310604615,133.6069952937864A185,185,0,0,1,357.8133517906038,117.4587802568216L381,301A0,0,0,0,0,381,301" stroke="#ffffff" stroke-width="1" fill="#109618"></path><text text-anchor="start" x="318.2743370794805" y="155.74528104774413" font-family="Arial" font-size="15" stroke="none" stroke-width="0" fill="#ffffff">Safari</text>
<path class="safari highlight" d="M300.5277138942012,129.98768708392234A189,189,0,0,1,357.3120188563466,113.49032145156369" stroke="#109618" stroke-width="5" fill-opacity="1" fill="none"></path>
</g>
<g><path d="M381,301L201.81211519120325,347.00762912549817A185,185,0,0,1,302.23083106046136,133.60699529378647L381,301A0,0,0,0,0,381,301" stroke="#ffffff" stroke-width="1" fill="#ff9900"></path><text text-anchor="start" x="226.01061944290322" y="243.90522986989345" font-family="Arial" font-size="15" stroke="none" stroke-width="0" fill="#ffffff">Firefox</text>
<path class="firefox highlight" d="M197.93778254668874,348.00238867415754A189,189,0,0,1,300.52771389420104,129.9876870839224" stroke="#ff9900" stroke-width="5" fill-opacity="1" fill="none"></path>
</g>
<g><path d="M381,301L560.1878848087968,347.0076291254981A185,185,0,0,1,201.81211519120325,347.00762912549817L381,301A0,0,0,0,0,381,301" stroke="#ffffff" stroke-width="1" fill="#dc3912"></path><text text-anchor="start" x="354.50000000000006" y="466.6718568263226" font-family="Arial" font-size="15" stroke="none" stroke-width="0" fill="#ffffff">Chrome</text>
<path class="chrome highlight" d="M564.0622174533113,348.00238867415754A189,189,0,0,1,197.93778254668874,348.00238867415754" stroke="#dc3912" stroke-width="5" fill-opacity="1" fill="none"></path>
</g>
</svg>
</article>
</slide>
<slide class="browser-dist nobackground">
<hgroup>
<h2>Flash Support vs. HTML5 Support</h2>
</hgroup>
<article class="flexbox vcenter">
<img class="graph" src="images/html5vsflash1.png">
</article>
</slide>
<slide class="browser-dist nobackground">
<hgroup>
<h2>YouTube Data API Usage for Flash vs. HTML5 Devices</h2>
</hgroup>
<article class="flexbox vcenter">
<img class="graph" src="images/html5vsflash2.png">
</article>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h2 class="black">
Why HTML5?
</h2>
</article>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h2 class="black">
When HTML5?
</h2>
</article>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h2 class="black" style="line-height: 1em;">
Primary Goal: Recover playbacks that would be lost without flash
</h2>
</article>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h2 class="black">
Our Solution
</h2>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Embeds</h2>
</hgroup>
<article>
<pre class="prettyprint" data-lang="html">
<iframe type="text/html">
width="640"
height="385"
frameborder="0"
src="http://www.youtube.com/embed/VIDEO_ID"
<b>allowfullscreen</b>>
</iframe>
</pre>
<ul class="build">
<li>Plan for the future (if you can)</li>
</ul>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>When HTML5?</h2>
<h3><iframe> Embed</h3>
</hgroup>
<article>
<ul class="build">
<li>Give the user HTML5 or Flash based on device and user preferences.</li>
<li>Allows for better mobile support.</li>
<li>Offers an "it just works" experience.</li>
</ul>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Why an iframe?</h2>
<h3>Other embedding methods</h3>
</hgroup>
<article>
<ul class="build">
<li>
<script>
<ul>
<li>We need our content to be sandboxed</li>
<li>More than just a video tag</li>
</ul>
</li>
<li>
<object>
<ul>
<li>Can load content with the data attribute</li>
<li>But no way to interact with it via JavaScript</li>
</ul>
</li>
</ul>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>When does the user get HTML5?</h2>
</hgroup>
<article class="flexbox vcenter">
<img style="height: 500px" src="images/flow1.png">
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Detecting HTML5</h2>
</hgroup>
<article>
<pre class="prettyprint" data-lang="javascript">
<script>
var videoElement = document.createElement('video');
if (videoElement && videoElement.canPlayType &&
(videoElement.canPlayType('video/mp4; codecs="avc1.42001E, mp4a.40.2"') ||
videoElement.canPlayType('video/webm; codecs="vp8.0, vorbis"'))) {
// Sweet, we can use HTML5!
}
</script>
</pre>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>When does the user get HTML5?</h2>
</hgroup>
<article class="flexbox vcenter">
<img style="height: 500px" src="images/flow1.png">
</article>
</slide>
<slide class="fill nobackground" style="background-image: url(images/helmetcat.jpg)">
<hgroup>
<h2 class="white">Round 3: Performance</h2>
</hgroup>
<footer class="source white">http://www.flickr.com/photos/mycoolpics/92033686/</footer>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Player Start Time</h2>
</hgroup>
<article class="flexbox vcenter">
<img style="height: 300px" src="images/perf1.png">
<div style="position:absolute; left: 100px; top: 280px;">
HTML5
</div>
<div style="position:absolute; left: 100px; top: 205px;">
Flash
</div>
<div style="position:absolute; left: 575px; top: 255px;">
500ms
</div>
<p>(Up from 200ms in Jan 2011)</p>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Get Video Time</h2>
</hgroup>
<article>
<ul class="build">
<li>
HTML5
<ul>
<li>Opera is Awesome
<ul>
<li>200ms ahead of the pack</li>
</ul>
</li>
</ul>
</li>
<li>
Flash
<ul>
<li>IE9 and Opera are the leaders
<ul>
<li>300ms faster</li>
</ul>
</li>
</ul>
</li>
<li>
HTML5 is almost always faster than Flash
<ul>
<li>300ms - 400ms faster</li>
<li>IE9 is an exception
<ul>
<li>IE9 Flash is slightly faster than IE9 HTML5</li>
</ul>
</li>
</ul>
</li>
</ul>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Video Start Time</h2>
</hgroup>
<article class="flexbox vcenter">
<img style="height: 300px" src="images/perf2.png">
<div style="position:absolute; left: 100px; top: 280px;">
Flash
</div>
<div style="position:absolute; left: 100px; top: 205px;">
HTML5
</div>
<div style="position:absolute; left: 575px; top: 255px;">
2.5s
</div>
<ul class="build"><li>Firefox closest to catching Flash
<ul><li>HTML5 ~1.0s slower than Flash</li></ul>
</li></ul>
</article>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h2 class="black">
So why is Flash so fast?
</h2>
</article>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h2 class="black">
Make Assumptions
</h2>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Making Assumptions</h2>
</hgroup>
<article>
<ul class="build">
<li>Most users have a recent version of flash</li>
<li>Thus we can optimistically embed the most common case and do version checking and updating after a script loads</li>
<li>250ms improvement to flash start time</li>
</ul>
</article>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h2 class="black">
Preload Video Connection
</h2>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Preload Video Connection</h2>
</hgroup>
<article>
<ul>
<li>Resolves DNS while page is rendering</li>
<li>Maintains an open connection</li>
<li>200ms improvement</li>
</ul>
</article>
<article>
<pre class="prettyprint" data-lang="html">
<head>
<script>
var img = new Image();
img.src = videoConnectionUrl;
</script>
</head>
</pre>
</article>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h2 class="black">
What about embeds?
</h2>
</article>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h2 class="black">
#1 cache
</h2>
</article>
</slide>
<style>
.load-slide ul > li::before {
content: '';
}
</style>
<slide class="fill nobackground load-slide">
<hgroup>
<h2>Loading a player</h2>
</hgroup>
<article>
<ul class="build" style="color: black;">
<li>
<ul>
<li>1. youtube.com/v/di5I49yg7bY <span style="color: grey">302 redirect</span></li>
<li>2. s.ytimg.com/swf/l.swf?args&swf=swf2-hash_url.swf</li>
<li>3. s.ytimg.com/swf/swf2-hash_url.swf <span style="color: grey">~150kb</span></li>
</ul>
</li>
<li>
<p>Better</p>
<ul>
<li>1. youtube.com/v/di5I49yg7bY <span style="color: grey">application/x-shockwave-flash</span></li>
<li>2. s.ytimg.com/swf/swf2-hash_url.swf</li>
</ul>
</li>
<li>
<p>Best</p>
<ul>
<li>1. youtube.com/embed/di5I49yg7bY <span style="color: grey">text/html</span></li>
<li>2. s.ytimg.com/swf/swf2-hash_url.swf</li>
</ul>
</li>
</ul>
</article>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h2 class="black">
#2 lazy load
</h2>
</article>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h2 class="black">
Most embeds are never played.
</h2>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Preload Video Connection</h2>
</hgroup>
<article>
<ul>
<li>Delay expensive queries</li>
<li>Use cache for most videos</li>
<li>Delay loading... flash?</li>
</ul>
</article>
<article>
<img src="images/lazy.png" style="width: 48%;">
<img src="images/lazy.png" style="width: 48%;">
</article>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h3 class="black">
Demo <a href="http://gregthebusker.com/iframedemo.html">http://gregthebusker.com/iframedemo.html</a>
</h3>
</article>
</slide>
<slide class="segue quote nobackground">
<article class="flexbox vleft">
<h3 class="black">
Player API <a href="https://developers.google.com/youtube/getting_started#player_apis">https://developers.google.com/youtube/getting_started#player_apis</a>
</h3>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>The JavaScript API</h2>
<h3>Communication</h3>
</hgroup>
<article>
<ul class="build">
<li>Poll the URL fragment?
<br>
<span style="color:#000;">http://youtube.com/embed/video_id</span><span class="red">#fragment</span>
</li>
<li>Messages are one dimensional</li>
<li>Polling eats up CPU and is not instant</li>
<li>Both directions of communication use the same fragment</li>
</ul>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>The JavaScript API</h2>
<h3>Communication</h3>
</hgroup>
<article>
<ul class="build">
<li>Better idea: PostMessage API
<br>
<span style="color:#000;">someWindow.<span class="red">postMessage</span>(message, targetOrigin);</span>
</li>
<li>Uses JSON for native encoding and decoding of data</li>
<li>No polling</li>
<li>Native event listeners</li>
<li>Communications are sandboxed per-window</li>
<li>Calls are asynchronous</li>
</ul>
</article>
</slide>
<slide class="fill nobackground">
<hgroup>
<h2>Conclusion</h2>
</hgroup>
<article>
<ul class="build">
<li>Flash is still preferred in most places
<ul>
<li>More critical features</li>
<li>Deeper reach</li>
</ul>
</li>
<li>HTML5 is awesome
<ul>
<li>Improves every day</li>
<li>Greater mobile reach</li>
<li>People want it</li>
</ul>
</li>
</ul>
</article>
</slide>
<slide class="thank-you-slide segue nobackground">
<aside class="gdbar right"><img src="images/google_developers_icon_128.png"></aside>
<article class="flexbox vleft auto-fadein">
<h2><Thank You!></h2>
</article>
<p class="auto-fadein" data-config-contact>
<!-- populated from slide_config.json -->
</p>
</slide>
<slide class="fill nobackground" style="background-image: url(images/questions.jpg)">
<hgroup>
<h2 class="white">can haz question?</h2>
</hgroup>
<footer class="source white">http://www.flickr.com/photos/cloudzilla/378829651/</footer>
</slide>
<slide class="logoslide dark nobackground">
<article class="flexbox vcenter">
<span><img src="images/google_developers_logo_white.png"></span>
</article>