define('player',['videoplay'],function(videoplay){
var wrap_player = $('#live_SWF'),
obj_player = ''; function v_switch(mtype,mid){
if(obj_player){
obj_player.destroy();
}
obj_player = videoplay(wrap_player,{
type : mtype
});
obj_player.play(mid);
} return function(){
v_switch(VIDEOCONFIG.type,VIDEOCONFIG.vid); //return 放回结果就是一个方法
}
}); M.use(['player'],function(player){ // function(player)这儿用的就是player的放回结果 实际上就是v_switch
player(); });
define('player',['videoplay'],function(videoplay){
var wrap_player = $('#live_SWF'),
obj_player = ''; function v_switch(mtype,mid){
if(obj_player){
obj_player.destroy();
}
obj_player = videoplay(wrap_player,{
type : mtype
});
obj_player.play(mid);
}
v_switch(VIDEOCONFIG.type,VIDEOCONFIG.vid); // 没有return 直接执行了
}); M.use(['player']); //也是执行的意思