Log in or register to post comments

Playing video on texture which is downloaded and saved.

November 25, 2013 - 10:17am #1

Hi,

I m using unity. 

My app downloads video file from url and saves to Application.persistentDataPath then loads the video where it saved.

But video is not playing on texture it play fullscreen. I m testing on ipad 4. 

Is this normal? I excpet that video plays on texture. Cant I play video on texture which was downloaded and saved to Application.persistentDataPath

 

Thanks

Harun.

 

Playing video on texture which is downloaded and saved.

November 25, 2013 - 11:23am #4

Can you post your working code? - it will be helpful to other developers.

Playing video on texture which is downloaded and saved.

November 25, 2013 - 10:45am #3

Ok you can delete all post i fixed my code :)

 

Playing video on texture which is downloaded and saved.

November 25, 2013 - 10:38am #2

Some of my code. May be help to answer.

 

filePath =  Application.persistentDataPath + "/" + mFilename;

       

FileStream stream = new FileStream(filePath, FileMode.Create);

stream.Write( www.bytes, 0,  www.bytes.Length);

stream.Close();

 

#if UNITY_IPHONE

filePath = "file://" + filePath;

#endif

 

video.m_path = filePath;

video.VideoPlayer.Load( video.m_path, VideoPlayerHelper.MediaType.ON_TEXTURE, false, 0);

 

 

 

 

 

Log in or register to post comments