File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 6060 // Note: force change now since we are adding things straight away outside of a proper stage object
6161 me . state . change ( me . state . DEFAULT , true ) ;
6262
63+
64+ // user interaction is required to start the video
65+ // it does not need to clickable, video will start as soon as a click is detected by the browser
66+ let textMsg = new me . Text (
67+ me . game . viewport . width / 2 ,
68+ me . game . viewport . height / 2 , {
69+ font : "Arial" ,
70+ size : 20 ,
71+ fillStyle : "white" ,
72+ textAlign : "center" ,
73+ text : "click here to start the video"
74+ } ) ;
75+
76+ // add the video sprite to the scene
77+ me . game . world . addChild ( textMsg ) ;
78+
6379 // create a new sprite instance
6480 var videoSprite = new me . Sprite (
6581 me . game . viewport . width / 2 ,
You can’t perform that action at this time.
0 commit comments