File tree 2 files changed +61
-0
lines changed
2 files changed +61
-0
lines changed Original file line number Diff line number Diff line change 1
1
[
2
+ {
3
+ "desc" : " Full screen of the page, and individual elements" ,
4
+ "url" : " fullscreen" ,
5
+ "tags" : " fullscreen" ,
6
+ "support" : {
7
+ "live" : " opera" ,
8
+ "nightly" : " chrome firefox safari"
9
+ },
10
+ "test" : " "
11
+ },
2
12
{
3
13
"desc" : " Stream video and filter with canvas" ,
4
14
"url" : " gum-canvas" ,
Original file line number Diff line number Diff line change
1
+ < title > Simple Fullscreen API demo</ title >
2
+ < style >
3
+ # status {
4
+ background : # c00 ;
5
+ }
6
+
7
+ # game {
8
+
9
+ }
10
+ </ style >
11
+ < article >
12
+ < p > This example shows how an element can request fullscreen support from the browser.</ p >
13
+ < p id ="unavailable "> Not supported :(</ p >
14
+ < div id ="game ">
15
+
16
+ </ div >
17
+ </ article >
18
+ < script >
19
+ function $ ( id ) {
20
+ return document . getElementById ( id ) ;
21
+ }
22
+
23
+ // fullscreen is a bit of mess due to mixed case support
24
+ // taken from http://voxeljs.com/ the very cool game world
25
+ // building toolkit by @maxogden , et al
26
+ function shim ( el ) {
27
+ return ( el . requestFullscreen ||
28
+ el . webkitRequestFullscreen ||
29
+ el . webkitRequestFullScreen ||
30
+ el . mozRequestFullscreen ||
31
+ el . mozRequestFullScreen ||
32
+ el . msRequestFullscreen ||
33
+ el . msRequestFullScreen ||
34
+ el . oRequestFullscreen ||
35
+ el . oRequestFullScreen )
36
+ }
37
+
38
+ function available ( ) {
39
+ return ! ! shim ( document . body )
40
+ }
41
+
42
+ var no = $ ( '#unavailable' ) ;
43
+
44
+ if ( available ( ) ) {
45
+ no . parentNode . removeChild ( no ) ;
46
+ }
47
+
48
+
49
+
50
+
51
+ </ script >
You can’t perform that action at this time.
0 commit comments