MediaPlayerCtrl.CopyStreamingAssetVideoAndLoad C# (CSharp) Method

CopyStreamingAssetVideoAndLoad() private method

private CopyStreamingAssetVideoAndLoad ( string strURL ) : IEnumerator
strURL string
return IEnumerator
    IEnumerator CopyStreamingAssetVideoAndLoad(string strURL)
    {
        strURL = strURL.Trim();

        string write_path = Application.persistentDataPath + "/" + strURL;

        if (System.IO.File.Exists(write_path) == false)
        {
            Debug.Log("CopyStreamingAssetVideoAndLoad : " + strURL);

            WWW www = new WWW(Application.streamingAssetsPath + "/" + strURL);

            yield return www;

            if (string.IsNullOrEmpty(www.error))
            {



                Debug.Log(write_path);
                System.IO.File.WriteAllBytes(write_path, www.bytes);

                Load("file://" + write_path);


            }
            else
            {
                Debug.Log(www.error);

            }

            www.Dispose();
            www = null;
        }
        else
        {
            Load("file://" + write_path);
        }

    }
MediaPlayerCtrl