사용자함수 하이브리드앱 비활성시 음원 꺼주기 함수 >>> App.inFarm(), App.outFarm()
페이지 정보

본문
var App = {
lastStdMode : null, // "word", "ebook", "check", "main"
isPlaying : false,
outFarm : function(){
this.lastStdMode = Farm.std; //now study code..
switch(this.lastStdMode){
case "ebook" : {
if(BK.autoPlay) {
$("btn_play").click(); ; //toggle mode
this.isPlaying = true;
}
break;
}
case "word" :
case "check" : {
if(!Farm[this.lastStdMode].audio.paused) {
Farm[this.lastStdMode].audio.pause();
this.isPlaying = true;
}
break;
}
}
},
inFarm : function(){
Farm.go(this.lastStdMode);
if(this.isPlaying) {
switch(this.lastStdMode){
case "ebook" : {
$("btn_play").click();
}
case "word" :
case "check" : {
Farm[this.lastStdMode].audio.play();
}
}
this.isPlaying = false;
}
this.lastStdMode = null;
}
}
//앱 비활성시 App.outFarm();
//앱 활성시 App.inFarm();- 이전글제이쿼리 총정리(1) - 선택자 19.12.26
- 다음글모바일, PC 체크 19.03.14
댓글목록
등록된 댓글이 없습니다.

