Another way to determine if a video is triggered is to use videoView.getCurrentPosition (). getCurrentPosition () returns 0 if streaming is not running.
protected Runnable playingCheck = new Runnable() { public void run() { while (true) { if (vw.getCurrentPosition() != 0) { // do what you want when playing started break; } else { try { Thread.sleep(250); } catch (InterruptedException e) { e.printStackTrace(); } } } } };
Then call:
new Thread(playingCheck).start();
sulu.dev
source share