diff --git a/tests/js-tests/src/GUITest/UIVideoPlayerTest/UIVideoPlayerTest.js b/tests/js-tests/src/GUITest/UIVideoPlayerTest/UIVideoPlayerTest.js index 8461604551..8f32b002cb 100644 --- a/tests/js-tests/src/GUITest/UIVideoPlayerTest/UIVideoPlayerTest.js +++ b/tests/js-tests/src/GUITest/UIVideoPlayerTest/UIVideoPlayerTest.js @@ -23,6 +23,10 @@ var UIVideoPlayerTest = UIScene.extend({ cc.log("VideoPlayer COMPLETED"); }); + var playState = new cc.LabelTTF("PLAY State", "Thonburi", 28); + playState.setPosition(400, 350); + this.addChild(playState); + ccui.VideoPlayer.EventType = { PLAYING: "play", PAUSED: "pause", @@ -30,26 +34,31 @@ var UIVideoPlayerTest = UIScene.extend({ COMPLETED: "complete" }; var list = [ - { name: "PLAYWEB", func: function(){ + { name: "PLAYURL", func: function(){ cc.log("play!"); + playState.setString("play"); video.setURL("http://benchmark.cocos2d-x.org/cocosvideo.mp4"); video.play(); }}, - { name: "PLAYNATIVE", func: function(){ + { name: "PLAYLOCAL", func: function(){ cc.log("play!"); + playState.setString("play"); video.setURL("cocosvideo.mp4"); video.play(); }}, { name: "STOP", func: function(){ cc.log("stop!"); + playState.setString("stop"); video.stop(); }}, { name: "PAUSE", func: function(){ cc.log("pause!"); + playState.setString("pause"); video.pause(); }}, { name: "RESUME", func: function(){ cc.log("resume!"); + playState.setString("resume"); video.resume(); }}, { name: "SEEKTO", func: function(){ @@ -59,10 +68,12 @@ var UIVideoPlayerTest = UIScene.extend({ }}, { name: "ISPLAYING", func: function(){ cc.log("isPlaying!"); + playState.setString("isPlaying"); cc.log(video.isPlaying()); }}, { name: "Full Screen", func: function(){ cc.log("setFullScreenEnabled!"); + playState.setString("setFullScreenEnabled"); video.setFullScreenEnabled(true); }}, { name: "Scale", func: function(){