title: How to play a video using url in vuforia videoplayback app using youtube player activity
body: <p>I am working on AR project with Vuforia sdk and following VideoPlayBack sample project, i just want to play video using youtube url.so iam add a youtube player activity class the project and pass a static videoid to the activity its working properly.....but the issue is iam deleted the previously presented videos from assests folder then app crashes.</p>
  
  <p>how to stop the loading of videoplayerhelper class in Vuforia sample app:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState)
      {
          Log.d(LOGTAG, "onCreate");
          super.onCreate(savedInstanceState);
  
      vuforiaAppSession = new SampleApplicationSession(this);
  
      mActivity = this;
  
      startLoadingAnimation();
  
      vuforiaAppSession
          .initAR(this, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
  
      // Load any sample specific textures:
      mTextures = new Vector&lt;Texture&gt;();
      loadTextures();
  
      // Create the gesture detector that will handle the single and
      // double taps:
      mSimpleListener = new SimpleOnGestureListener();
      mGestureDetector = new GestureDetector(getApplicationContext(),
          mSimpleListener);
  
      mVideoPlayerHelper = new VideoPlayerHelper[NUM_TARGETS];
      mSeekPosition = new int[NUM_TARGETS];
      mWasPlaying = new boolean[NUM_TARGETS];
      mMovieName = new String[NUM_TARGETS];
  
      // Create the video player helper that handles the playback of the movie
      // for the targets:
      for (int i = 0; i &lt; NUM_TARGETS; i++)
      {
          mVideoPlayerHelper[i] = new VideoPlayerHelper();
          mVideoPlayerHelper[i].init();
          mVideoPlayerHelper[i].setActivity(this);
      }
  
      mMovieName[STONES] = "VideoPlayback/VuforiaSizzleReel_1.mp4";
      mMovieName[CHIPS] = "VideoPlayback/VuforiaSizzleReel_2.mp4";
  
      // Set the double tap listener:
      mGestureDetector.setOnDoubleTapListener(new OnDoubleTapListener()
      {
          // Handle the double tap
          public boolean onDoubleTap(MotionEvent e)
          {
              boolean isDoubleTapHandled = false;
              for (int i = 0; i &lt; NUM_TARGETS; i++)
              {
                  // Verify that the tap happens inside the target:
                  if (mRenderer!= null &amp;&amp; mRenderer.isTapOnScreenInsideTarget(i, e.getX(),
                      e.getY()))
                  {
                      // Check whether we can play full screen at all:
                   if (mVideoPlayerHelper[i].isPlayableFullscreen())
                      {
                          // Pause all other media:
                          pauseAll(i);
  
                          // Request the playback in fullscreen:
                          mVideoPlayerHelper[i].play(true,
                              VideoPlayerHelper.CURRENT_POSITION);
  
                          isDoubleTapHandled = true;
                      }
  
                      // Even though multiple videos can be loaded only one
                      // can be playing at any point in time. This break
                      // prevents that, say, overlapping videos trigger
                      // simultaneously playback.
  
                      break;
                  }
              }
               return isDoubleTapHandled;
          }
  
  
          public boolean onDoubleTapEvent(MotionEvent e)
          {
              // We do not react to this event
              return false;
          }
  
  
          // Handle the single tap
          public boolean onSingleTapConfirmed(MotionEvent e)
          {
              boolean isSingleTapHandled = false;
             /// Toast.makeText(getApplicationContext(), "single touch", Toast.LENGTH_LONG).show();
              // Do not react if the StartupScreen is being displayed
              for (int i = 0; i &lt; NUM_TARGETS; i++)
              {
                  // Verify that the tap happened inside the target
                  if (mRenderer!= null &amp;&amp; mRenderer.isTapOnScreenInsideTarget(i, e.getX(),
                      e.getY()))
                  {
  
                      Intent intent=new Intent(VideoPlayback.this,VideoActivity.class);
                      intent.putExtra("videoid", "yCt-YUbs7H4");
                      intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
                      startActivity(intent);
                      isSingleTapHandled = true;
                      break;
                  }
              }
              return isSingleTapHandled;
          }
      });
  }
  </code></pre>