2015-06-30 73 views

回答

1

等待玩家狀態改變事件

OoyalaPlayer mPlayer; 
... 

Observable o = new Observer() { 
      @Override 
      public void update(Observable observable, Object data) { 
       trackProgress(mPlayer.getPlayheadPercentage()); 

       Log.wtf("state", mPlayer.getState()); 
if(mPlayer.getState() == READY) 
doMeasure(); 
      } 
     }; 

mPlayer.addObservable(o); 

BTW這裏是availbale

public static enum State { 
     INIT, 
     LOADING, 
     READY, 
     PLAYING, 
     PAUSED, 
     COMPLETED, 
     SUSPENDED, 
     ERROR; 

     private State() { 
     } 
    } 
的國家名單