title: Unity: VideoPlayer freezes for half of a second with .webm video
body: <p>I'm using windows 10 Pro and unity 5.6.4p2.
  I've 2 planes with a videoplayer component (both videos are loaded from the streaming assets folder. One video is a .mp4 and the other is a .webm with transparency (alpha channel).
  I've some scripts attached to the planes but I've this problem with and without scripts, so there is no need to post the code.</p>
  
  <p>The webm video (6 seconds long) play in loop and every 10-15-20 or more seconds it freezes for half of a second. With the mp4 video I don't have problems. </p>
  
  <p>In the Editor there are no freeze, when I try it on a build it gives me the problem.</p>
  
  <p>I don't know what to do. Is there something that I can try with the quality options on Unity? I tried 5 different videos with transparency (webm) but They were make by the same person with the same method. Could be the file? </p>
  
  <p>In the meanwhile I'm looking for another .webm for some tests.</p>
  
  <p>Thank you!</p>
  
  <p>EDIT (code for playing the video):</p>
  
  <pre><code>IEnumerator playVideo(string name)
      {
          blackScreen.SetActive (true);
          wait = true;
  
          videoPlayer = gameObject.GetComponent&lt;VideoPlayer&gt;();
          audioSource = gameObject.GetComponent&lt;AudioSource&gt;();
  
          //Disable Play on Awake for both Video and Audio
          videoPlayer.playOnAwake = false;
          audioSource.playOnAwake = false;
          audioSource.Pause();
  
          videoPlayer.source = VideoSource.Url;
          if (!alpha) {
              videoPlayer.url = Application.streamingAssetsPath + "/Scenarios/" + 
      name + ".mp4";
          } else {
              videoPlayer.url = Application.streamingAssetsPath + "/Scenarios/" + 
      name + ".webm";
          }
          videoPlayer.EnableAudioTrack(0, true);
          videoPlayer.SetTargetAudioSource(0, audioSource);
  
          //Set video To Play then prepare Audio to prevent Buffering
          videoPlayer.clip = videoToPlay;
          currentVideoName = name;
          videoPlayer.Prepare();
  
          //Wait until video is prepared
          WaitForSeconds waitTime = new WaitForSeconds(0.1f);
          while (!videoPlayer.isPrepared)
          {
              Debug.Log("Preparing Video");
  
              yield return waitTime;
  
              break;
          }
  
          Debug.Log("Done Preparing Video");
          videoPlayer.gameObject.GetComponent&lt;MeshRenderer&gt; ().enabled = true;
          blackScreen.SetActive (false);
          //Assign the Texture from Video to RawImage to be displayed
          image.texture = videoPlayer.texture;
  
          //Play Video
          videoPlayer.Play();
          ready = true;
          //Play Sound
          audioSource.Play();
          Debug.Log("Playing Video");
          while (videoPlayer.isPlaying)
          {
              wait = true;
              yield return null;
          }
          Debug.Log("Done Playing Video");
          wait = false;
      } 
  </code></pre>