Play video from StreamingAssets folder in Windows Media Player?(Unity 3D) -


this question on unity 3d. can play video there in streamingassets folder. there way in click button , same video gets played in windows media player. researched lot on not find solution.

this code playing video normally,

using unityengine; using system.collections;   public class videodemo : monobehaviour {  public string filepath; public string result;  void start() {     filepath = system.io.path.combine (application.streamingassetspath, "demo.mp4");     result = "";  }  void ongui() { if(gui.button(new rect(10,10,100,30),"click me"))     {         startcoroutine(example());     } }  ienumerator example () {     if (filepath.contains ("://")) {         www www = new www (filepath);         yield return www;         result = www.text;      } else     {         result = system.io.file.readalltext (filepath);      }  }      } 

kindly share ideas.

this post covers using process.start open files in default handlers or using specific app, notepad.exe. should able target windows media player using commands highlighted here

ath.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -