Log in or register to post comments

Changing videoplayback path dynamicly

November 14, 2013 - 6:00am #1

Hi , I'm trying to change the path of my video playback in my script . everything seems correct but the video doesn't play. here's the related parts of code :

public VideoPlaybackBehaviour video;

void OnGUI(){

 if(GUI.Button(new Rect(0,0,100,100),"btn"))

  {

   video.m_path = "test.mp4";

   video.VideoPlayer.Play(false,0);

  }

}

 

I'll apprecaite if you can tell me the steps define a new path for the video . 

thanks very much

Changing videoplayback path dynamicly

August 2, 2018 - 4:18am #5

I also trying to change the source of the video clip from the code behind

I don't have the m_path variable in vuforia samples. 

In the code i have access to the path but it's read only in VideoController.cs:

videoPlayer.clip.originalPath

 

 

Changing videoplayback path dynamicly

March 6, 2017 - 5:07am #4

I tried this code but it doesnt work on my code...I need changing videoplayback path dynamicly too....Plz help me!!!

Changing videoplayback path dynamicly

May 2, 2014 - 1:21pm #3

Dear,

Can you help me achieve your result?

I want to set the path for the video by pressing a button, but can't succeed.

Any help plz?

Changing videoplayback path dynamicly

November 14, 2013 - 1:04pm #2

Well I don't get what's wrong with that code , but this code works for me :

public VideoPlaybackBehaviour video;

void OnGUI(){

 if(GUI.Button(new Rect(0,0,100,100),"btn")){

  video.VideoPlayer.Unload();

  var path = video.m_path = "test.mp4";

  if(video.VideoPlayer.IsPlayableOnTexture()){

   if(video.VideoPlayer.Load(path,VideoPlayerHelper.MediaType.ON_TEXTURE,true,0)){

     video.VideoPlayer.Play(false,0);

    }

  }

}

 

Log in or register to post comments