/**
 *
 * User: yuwang@iflytek.com
 * Date: 13-7-9 下午4:27
 * Version: 1.0
 */

define(function(require, exports, module){

    /**
     * 本地文件前缀
     * @const
     * @type {string}
     */
    var LOCAL_FILE_PREFIX = 'file:///';

    /**
     * 获取SpeechUI根路径
     * @return {string} SpeechUI根路径
     */
    exports.getSpeechUIBase = function() {
        var path= require.resolve("../../");
        if(RunningPlatform === "PC"){
            if(path.indexOf(LOCAL_FILE_PREFIX) > -1){
                path = path.substr(LOCAL_FILE_PREFIX.length);
            }
        }
        if(RunningPlatform === "Android"){
            path = path.substr(0,path.lastIndexOf("/")+1);
        }
        return  path;
    }
});