Forwarding Video in android lagging

Hei guys,

I created the slider for the video player which controls the video frames, somehow it works perfectly in editor but when built on android it takes really long time to process video and adjust the frame with slider. The code also contains two events on pointdown and on pointup to know if the user is moving slider or not.’ Any help will be appreciated.

Here is my code.

using System.Collections; 
using System.Collections.Generic; 
using UnityEngine;
 using UnityEngine.Video; 
using UnityEngine.UI; 
using System;

public class VIdeoBeheviour : MonoBehaviour {

 public VideoPlayer vplayer;
 public Slider videoslider;
 public bool dragging = false;
 
 void Start()
 {
     
     vplayer.Play ();
     Debug.Log ("started " + vplayer.frameCount);
 }
 void Update() 
 {
     
     if (dragging) {
         
         vplayer.frame = Convert.ToInt64 (videoslider.value);
             
         }
 else 
     {
         videoslider.maxValue = vplayer.frameCount;
         videoslider.value = vplayer.frame;
     }
     //Debug.Log ("update " + vplayer.frame + " " + vplayer.frameCount + " " + videoslider.value );
 }
 
 public void OnBeginDrag()
 {
     
     dragging = true;
 }
 public void OnEndDrag()
 {
     
     dragging = false;
     
 }
 }

I’m sorry, I’m not familiar with the code. But I know there are some video editing apps you can use to make your videos better.