Пример #1
0
 @Override
 protected void setUp() throws Exception {
   super.setUp();
   mVideo =
       Video.createFromVideo(
           getActivity(),
           Uri.parse("android.resource://com.mediatek.ngin3d.tests/" + R.raw.gg_taeyeon),
           240,
           160);
   mStage.add(mVideo);
   mVideo.setPosition(new Point(0.2f, 0.2f, true));
   mStageView.waitSurfaceReady();
 }
Пример #2
0
  public void testVideoPlaying() throws InterruptedException {
    PresentationStubActivity activity = getActivity();

    assertEquals(false, mVideo.isPlaying());
    waitForTime(activity, 2000);
    mVideo.play();
    waitForTime(activity, 2000);
    assertEquals(true, mVideo.isPlaying());
    mVideo.play();
    waitForTime(activity, 500);
    assertEquals(true, mVideo.isPlaying());
    mVideo.pause();
    waitForTime(activity, 500);
    assertEquals(false, mVideo.isPlaying());
  }