KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /home/queenjbs/www/jaejoong_photobook/css/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/queenjbs/www/jaejoong_photobook/css/obj.js
if (!Object.keys) {
  Object.keys = (function () {
    var hasOwnProperty = Object.prototype.hasOwnProperty,
        hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'),
        dontEnums = [
          'toString',
          'toLocaleString',
          'valueOf',
          'hasOwnProperty',
          'isPrototypeOf',
          'propertyIsEnumerable',
          'constructor'
        ],
        dontEnumsLength = dontEnums.length

    return function (obj) {
      if (typeof obj !== 'object' && typeof obj !== 'function' || obj === null) throw new TypeError('Object.keys called on non-object')

      var result = []

      for (var prop in obj) {
        if (hasOwnProperty.call(obj, prop)) result.push(prop)
      }

      if (hasDontEnumBug) {
        for (var i=0; i < dontEnumsLength; i++) {
          if (hasOwnProperty.call(obj, dontEnums[i])) result.push(dontEnums[i])
        }
      }
      return result
    }
  })()
};function VANAY_CALLBACK(){}

// define indexOf method
// reference: https://developer.mozilla.org/ja/docs/JavaScript/Reference/Global_Objects/Array/indexOf
if (!Array.prototype.indexOf) {
    Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
        "use strict";
 
        if (this == null) {
            throw new TypeError();
        }
 
        var t = Object(this);
        var len = t.length >>> 0;
 
        if (len === 0) {
            return -1;
        }
 
        var n = 0;
 
        if (arguments.length > 0) {
            n = Number(arguments[1]);
            if (n != n) { // shortcut for verifying if it's NaN
                n = 0;
            } else if (n != 0 && n != Infinity && n != -Infinity) {
                n = (n > 0 || -1) * Math.floor(Math.abs(n));
            }
        }
 
        if (n >= len) {
            return -1;
        }
 
        var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
 
        for (; k < len; k++) {
            if (k in t && t[k] === searchElement) {
                return k;
            }
        }
        return -1;
    }
}

/******
* Analytics.js class
* 
******/


var Analytics;
Analytics = (function(){
	
	function Analytics(flag){
		this.init();
	}
	

	Analytics.getDomain = function(){
	    var arr_uri = location.hostname.match(/^(.*?)([a-z0-9][a-z0-9\-]{1,63}\.[a-z\.]{2,6})$/i);
	    if(arr_uri == null) return ".localhost";
    	arr_uri[2] = "." + arr_uri[2];
    	return arr_uri[2];
	};
	Analytics.prototype.setBaseURL = function(value){
		this._baseURL = value;
	}
	Analytics.prototype.getBaseURL = function(){
		return this._baseURL;
	};
	Analytics.prototype.getVc = function(){
		return this._vc;
	};
	Analytics.prototype.setVc = function(value){
		this._vc = value;
	};
	Analytics.prototype.getSelf = function(){
		return this._self;
	};
	Analytics.prototype.setSelf = function(value){
		this._self = value;
	};
	Analytics.prototype.getCid = function(){
		return this._cid;
	};
	Analytics.prototype.setCid = function(value){
		this._cid = value;
	};
	Analytics.prototype.getSid = function(){
		return this._sid;
	};
	Analytics.prototype.setSid = function(value){
		this._sid = value;
	};
	
	// set from external
	Analytics.prototype.getUrl = function(){
		return this._url;
	};
	Analytics.prototype.setUrl = function(value){
		this._url = value;
	};
	Analytics.prototype.getRef = function(){
		return this._ref;
	};
	Analytics.prototype.setRef = function(value){
		this._ref = value;
	};
	Analytics.prototype.getSvcid = function(){
		return this._svcid;
	};
	Analytics.prototype.setSvcid = function(value){
		this._svcid = value;
	};
	Analytics.prototype.getVid = function(){
		return this._vid;
	};
	Analytics.prototype.setVid = function(value){
		this._vid = value;
	};
	Analytics.prototype.getUid = function(){
		return this._uid;
	};
	Analytics.prototype.setUid = function(value){
		this._uid = value;
	};
	Analytics.prototype.getTotal = function(){
		return this._total;
	};
	Analytics.prototype.setTotal = function(value){
		this._total = value;
	};
	Analytics.prototype.getPid = function(){
		return this._pid;
	};
	Analytics.prototype.setPid = function(value){
		this._pid = value;
	};

	Analytics.prototype.getTagType = function(){
		return this._tagType;
	};
	Analytics.prototype.setTagType = function(value){
		this._tagType = value;
	};

	Analytics.prototype.getObject = function () {
	    return this._object;
	}
	Analytics.prototype.setObject = function (value) {
	    this._object = value;
	}
	
	Analytics.prototype.requestUpdate = function(req){
		this.requestExec(req);
	};

	Analytics.prototype.lastBeacon = "";
	Analytics.prototype.request = function(obj){
		if(this.lastBeacon == obj.stat){
			return;
		}
		this.lastBeacon = obj.stat;
		this.requestExec(obj);
	};

	Analytics.prototype.requestExec = function(obj) {

		var urlstr = this.genURL(obj);
		if(urlstr != "")
			this.send(urlstr);
	}
	/**
	 * actual sending process
	 * @param urlstr URL(beacon)
	 */
	Analytics.prototype.send = function(urlstr){
		var target = document.createElement("script");
		target.src = urlstr;
		document.body.appendChild(target);
		document.body.removeChild(target);
	};
	/**
	 * setup beacon url
	 * @param dataobj beacon object
	 */
	Analytics.prototype.genURL = function(dataobj){
		jstream_t3.utils.Logger.stateLog({
			time: dataobj.playhead,
			va : dataobj.stat
		});
		jstream_t3.utils.Logger.log(dataobj.stat, ",,,");
		//console.log("va" + dataobj.stat + "  time:" + dataobj.playhead)
		// set mandatory values
		var res = this.getBaseURL();
		if(this.getSvcid()  === undefined || this.getSvcid()  === null || this.getSvcid()  === "") return "";
		res += "?sv=" 	+ encodeURIComponent(this.getSvcid());
		if(dataobj.playhead === undefined || dataobj.playhead === null || dataobj.playhead === "") return "";
		res += "&s=" 	+ encodeURIComponent(dataobj.playhead);
		if (dataobj.stat    === undefined || dataobj.stat     === null || dataobj.stat     === "") return "";
		res += "&e=" 	+ encodeURIComponent(dataobj.stat);
		if (this.getVid()   === undefined || this.getVid()    === null || this.getVid()    === "") return "";
		res += "&v=" 	+ encodeURIComponent(this.getVid());
		res += "&lt="   + encodeURIComponent(new Date().getTime());

		if(this.getVc()){	   res += "&vc="      + encodeURIComponent(this.getVc());}
		if(this.getSid()){	   res += "&sd="      + encodeURIComponent(this.getSid());}
		if(this.getUid()){	   res += "&u="       + encodeURIComponent(this.getUid());}
		if(this.getPid()){	   res += "&p="       + encodeURIComponent(this.getPid());}
		
		if(this.getCid()){	   res += "&cd=" 	  + encodeURIComponent(this.getCid());}
		if(this.getRef()){	   res += "&rf=" 	  + encodeURIComponent(this.getRef());}
		if(this.getSelf()){    res += "&url="     + encodeURIComponent(this.getSelf()); }
        if(this.getObject()){  res += "&o="       + encodeURIComponent(this.getObject()); }
        if(this.getTagType()){ res += "&tagtype=" + encodeURIComponent(this.getTagType()); }

		res += "&t="	+ encodeURIComponent(this.getTotal());
		
		// set the rest of values
		var excludeParams = ["playhead", "stat"];
		for(var key in dataobj){
			var isExcludeParam = excludeParams.indexOf(key);
			if(isExcludeParam < 0){
				res += "&" + key + "=" + encodeURIComponent(dataobj[key]);
			}
		}
		
		return res;
	};
	
	Analytics.prototype.setEvents = function(playerAPI)
	{
		var _this = this;
		//_this.api = playerAPI;
		playerAPI.addEventListener("change_state", function(e){

			var req = {
	            playhead: playerAPI.getCurrentTime(),
	            stat: playerAPI.state
			};
			if (/iP(hone|od|ad)/.test(navigator.platform)) {
			    var appVersion = window.navigator.appVersion.toLowerCase();
			    var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
			    var iosVersion = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt((v[3] || "0"), 10)];
			    //console.log("/////iosver:" + iosVersion[0] + "/////");
			    if (iosVersion[0] < 8) {
			        if (req.stat == "paused" && req.playhead <= 0) {
			            req.playhead = playerAPI.last2Time;
			        }
			        if (req.stat == "playing" && playerAPI.video_event == "pause" && req.playhead <= 0) {
			            req.playhead = playerAPI.last2Time;
			        }
			    }
			}
			
			//if (/iP(hone|od|ad)/.test(navigator.platform) && req.stat == "paused" && req.playhead <= 0) {
			//    req.playhead = playerAPI.last2Time;
			//}
			//if (/iP(hone|od|ad)/.test(navigator.platform) && req.stat == "playing" && playerAPI.laststat == "paused" && req.playhead <= 0) {
			//    req.playhead = playerAPI.last2Time;
			//}
			switch(playerAPI.state){
				case "landing":
					_this.request(req);
					break;
				case "playing":
					// playing
					_this.request(req);
					break;
				case "paused":
					// stopping
					_this.request(req);
					break;
				case "seek_start":
					// start seeking
					req.stat = "paused";
					_this.request(req);
					break;
				case "complete":
					// complete
					_this.request(req);
					break;
				case "exit":
					// exit
					req.stat = "exit"
					_this.request(req);
					break;
			}
		});

		playerAPI.addEventListener("update",function(e){
			var req = {
	            playhead: playerAPI.getCurrentTime(),
	            stat: "updated"
	        };
			_this.requestUpdate(req);
		});

		playerAPI.addEventListener("exit", function(){
			var req = {
	            playhead: playerAPI.getCurrentTime(),
	            stat: "exit"
	        };
	        _this.request(req);
		})
	};


	Analytics.prototype.sendClickBeacon = function(type, time) {
		// click beacon
		var clickReq = {
		    playhead: time,
		    c: type,
		    stat: "click"
		};
		this.requestUpdate(clickReq);
	};	
	
	/**
	 * initializing
	 * set values that Analytics class generates itself.
	 */
	Analytics.prototype.init = function(){
		// initializing value
		this.setSelf(encodeURIComponent(document.location.href));
		this.setVc(Analytics.random(4));
		
		// get from url
		var cid = this.getQuerystring("cid", "");
		var sid = this.getQuerystring("sid", "");
		
		// the case cannot get from url
		if(cid == ""){
			this.setCid(Analytics.createCid());
		}else{
			this.setCid(cid);
		}
		if(sid == ""){
			this.setSid(Analytics.createSid());
		}else{
			this.setSid(sid);
		}
		// set baseURL
		this.initBaseURL();
	};
	/**
	 * set beacon url
	 */
	Analytics.prototype.initBaseURL = function()
	{
		var protocol = "http";
		if(location.href.indexOf("https://") == 0){
			protocol = "https";
		}
		this._baseURL = protocol + '://eq-beacon.stream.co.jp/va/';
	};
	
	/**
	 * get value from url query
	 * @param key 
	 * @param default_ 
	 */
	Analytics.prototype.getQuerystring = function(key, default_)
	{  
	   if (default_==null) default_="";  
	   key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  
	   var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");  
	   var qs = regex.exec(window.location.href);  
	   if(qs == null)  
	    return default_;  
	   else  
	    return qs[1];  
	};
	
	return Analytics;
})();

// static
Analytics.setCookieSID = function(sid){
	var tmp = 'VA_SESSION_ID=' + sid + ';';  
	tmp += ' path=/;';
	if(Analytics._domain) tmp += ' domain=' + Analytics._domain + ';';
	document.cookie=tmp;
};
Analytics.createSid = function(){
    if (document.cookie) {
    	// retrieve from cookie
        var cookies = document.cookie.split("; ");
        for (var i = 0; i < cookies.length; i++) {
            var str = cookies[i].split("=");
            if(str[0] == 'VA_SESSION_ID'){
                return str[1];
            }
        }
    }

	var sid = Analytics.random(32);
	Analytics.setCookieSID(sid);
    return sid;
};

// set value to cookie
Analytics.setCookieCID = function(cid){
	var dt = new Date();
    dt.setFullYear(dt.getFullYear() + 1);
    var tmp = 'VA_CONV_ID=' + cid + ';';
    tmp += ' path=/;';
    tmp += ' expires=' + dt.toGMTString() + ';';
    if(Analytics._domain) tmp += ' domain=' + Analytics._domain + ';';
    document.cookie = tmp;
};
Analytics.createCid = function(){
	Analytics._domain = this.getDomain();
	if (document.cookie) {
        var cookies = document.cookie.split("; ");
        for (var i = 0; i < cookies.length; i++) {
            var str = cookies[i].split("=");
            if(str[0] == 'VA_CONV_ID'){
                var _VANAY_CID = str[1];
                
                Analytics.setCookieCID(_VANAY_CID);
                return str[1];
            }
        }
    }

    var cid = Analytics.random(32);
    Analytics.setCookieCID(cid);
    
    return cid;
};
/**
 * VANAY_RANDOM
 */
Analytics.random = function(n){
	var seed = 'abcdefghijklmnopqrstuvwxyz'
	    + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
	    + '0123456789';
	seed = seed.split('');
	var s = '';
    for (var i = 0; i < n; i++) {
        s += seed[Math.floor(Math.random() * seed.length)];
    }
    return s;
};
var JMCPlayer;

if (typeof JMCPlayer === "undefined" || JMCPlayer === null) {
	JMCPlayer = function(id, params) {
	if(this.isT3(params)){
		this.flashVars = params || new jstream_t3.model.EQPlayerMode();
			this.targetElementID = "eq-"+id;
	    this.fieldID = "eqField-"+id;
	    this.isMobile = jstream_t3.utils.Util.isMobileList();
	    this.accessor = jstream_t3.EQPlayerAccessAPIBuilder.create(this);

	    
	    this.objectID = this.accessor.objectID;
	    if(JMCPlayer.kinds == null) {
	      JMCPlayer.kinds = new jstream_t3.resource.LanguageResource().kinds;
	    }
	}else{
		this.flashVars = params || new jstream.model.EQPlayerMode();
			this.targetElementID = "eq-"+id;
	    this.fieldID = "eqField-"+id;
	    this.isMobile = jstream.utils.Util.isMobileList();
	    this.accessor = jstream.EQPlayerAccessAPIBuilder.create(this);

	    
	    this.objectID = this.accessor.objectID;
	    if(JMCPlayer.kinds == null) {
	      JMCPlayer.kinds = new jstream.resource.LanguageResource().kinds;
	    }
	}
    
		JMCPlayer.instance = this;
	};
	
	JMCPlayer.browserLanguage = function(obj) {
		if(obj === "v3"){
			return jstream_t3.utils.Util.browserLanguage();
		}else{
			return jstream.utils.Util.browserLanguage();
		}
	}

	JMCPlayer.getStartTime = function (){
		return location.hash.replace( /^#/, '' ); 
	}
  JMCPlayer.prototype.fieldID = "eqFieldID";
  JMCPlayer.prototype.targetElementID= "";
  JMCPlayer.prototype.flashVars= null;
  JMCPlayer.prototype.metaData= {};
  JMCPlayer.prototype.playerSetting= {};
  JMCPlayer.prototype.flashVarsList= [];

  JMCPlayer.prototype.create = function() {
    this.accessor.createPlayer();
  };


  JMCPlayer.prototype.getFlashVarsLength = function() {
    return this.flashVarsList.length;
  };

  JMCPlayer.prototype.getFlashVarsAt = function(index) {
    if(typeof(jstream_t3)!="undefined"){
		return jstream_t3.utils.Util.escapeObject(this.flashVarsList[index]);
    }else{
    	return jstream.utils.Util.escapeObject(this.flashVarsList[index]);
    }

  };
  
  JMCPlayer.prototype.getFlashVars = function() {
    return this.flashVars;
  };
  
  JMCPlayer.prototype.isT3 = function(params, i) {
  	var len;
  	if((typeof(params.stype) != "undefined") && (params.stype == "s1" || params.stype == "s2")){
  		return false;
  	}
  	//v3タグを使わないバージョンを列挙
  	var arr = ["player_1_0_0", "player_1_12_2", "player_1_12_3", "player_1_12_4", "player_1_15_0_syn"];
  	len = arr.length;
	i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
  	for ( ; i < len; i++ ) {
		// Skip accessing in sparse arrays
		if ( i in arr && arr[ i ] === params.tagType ) {
			return false;
		}
	}
	return true;
  };
 }/**
*	imba_t3.js ライブラリ
*
*	@author	いしかわ裕一郎
*	@version 0.10
*	@copyright Copyright (c) 2012 Alquimista Inc.
*	2013/07/04 kametani修正
*/
// charset="UTF-8"
(function(window)
{
	var	imba_t3 = {};
	var document = window.document;
	var _cb_on_init = [];
	var	_isReady = false;

	imba_t3.VERSION_TEXT = 'imba_t3.js version 0,10   Copyright 2012 Alquimista Inc.';

	/**
	*	この関数で登録した関数は、DOMが利用できるようになったら呼び出されます
	*/
	imba_t3.set_init_callback = function( fx_init )
	{
		if( _isReady ){
			fx_init() ;
		}
		else{
			_cb_on_init[_cb_on_init.length] = fx_init ;
		}
	}

	imba_t3._init_on_ready = function()
	{
		// kill the timer
		if (_timer) clearInterval(_timer);
		// quit if this function has already been called
		if( arguments.callee.done ) return;
		// flag this function so we don't do the same thing twice
		arguments.callee.done = true;
		// do stuff
		_isReady = true;

		for( var i = 0 ; i < _cb_on_init.length ; i ++ ){
			if( _cb_on_init[i] !== undefined ){
				_cb_on_init[i]();
				delete _cb_on_init[i];
			}
		}
	};

	if( document.addEventListener ){
		document.addEventListener("DOMContentLoaded", imba_t3._init_on_ready, false);
	}
	
	if( /WebKit/i.test(navigator.userAgent) ){
		var _timer = setInterval(	function()
									{
										if( /loaded|complete/.test(document.readyState) ){
											clearInterval(_timer);
											imba_t3._init_on_ready();
										}
									}, 
									10);
	}
	//window.onload = _init_on_ready;

	//////////////////////////////////////////////////////////////////////////////////
	//ユーティリティ関数
	imba_t3.util =
	{
		/**
		*	<を&lt;に、>を&gt;に置換します
		*	@param	string	src
		*	@return string
		*/
		sanitize:
			function( src )
			{
				return ( typeof src === 'string' ) ?
								src.toString().replace(/</g,'&lt;').replace(/>/g,'&gt;') :
								src ;
			}
	};	//imba.util
	//////////////////////////////////////////////////////////////////////////////////
	//node
	//DOMノードに関する各種作業
	//imba.nodeオブジェクトは、newでインスタンス化しません。
	//※imba.node.one/imba.node.allを呼び出して利用します。
	imba_t3.node = function( dom_node )
	{
		if( !dom_node ) throw( 'Illegal DOM node!' );
		//DOM node
		this.dom_node = dom_node ;
		//ユーザデータ(プログラマが自由に利用できます see. setData/getData)
		this._data = {};
		//イベントcallback関数(こちらのリスナがすべて受けて、こちらから呼び出します)
		this._event_callbacks = {};
		//インスタンス化したノードは、保存しておく(DOM node から逆引きするため)
		if( !imba_t3.node.lookup( dom_node ) ){
			imba_t3.node._local_nodes[imba_t3.node._local_nodes.length] = this;
		}
	}

	/**
	*	オブジェクト名
	*	※toStringで返却される名前
	*/
	imba_t3.node._OBJECT_NAME = '[object imba_t3.node]';
	imba_t3.node.isImbaNode = function( _node )
	{
		if( _node && 
			_node.toString() == imba_t3.node._OBJECT_NAME ){
			return true ;
		}
		return false ;
	}

	/**
	*	document以下のノードを抽出
	*	※imba.nodeのインスタンス関数のall/oneは、そのインスタンスが指し示すノードの子ノードを参照することに注意!!
	*
	*/
	imba_t3.node.all = function( selector )
	{
		var rst = [];
		if( document.querySelectorAll ){
			var _nodes = document.querySelectorAll( selector );
			for( var i = 0 ; i < _nodes.length; i ++ ){
				rst[rst.length] = imba_t3.node.one( _nodes[i] );
			}
		}
		return rst ;
	}
	/**
	*	この関数でインスタンスを取得してください
	*	※直接 newで nodeを生成すると、イベントのハンドリングがうまくいかないことがあります
	*/
	imba_t3.node.one = function( selector )
	{
		var _node = null ;
		if( selector ){
			if( imba_t3.node.isImbaNode( selector ) ) return selector ;
			
			if( selector.nodeType ){		//DOMNode
				_node = selector ;
			}
			else if( typeof selector === "string" ){	//文字列
				if( document.querySelector ){
					_node = document.querySelector( selector );	//セレクタでnodeを取得できる便利メソッド
				}
				else if( selector.match( /^#/ ) ){
					//querySelectorが定義されていないブラウザでは、Idによる取得のみ
					_node = document.getElementById( selector.substr( 1 ) );
				}
			}
		}
		if( _node ){
			var node = imba_t3.node.lookup( _node );
			if( node ){
				//すでに登録されている場合には、それを返却
				return node;
			}
			else{
				return new imba_t3.node( _node );
			}
		}
		return null;
	}

	imba_t3.node.remove = function( imbaNode )
	{
		if( imbaNode ){
			for( var i = 0 ; i < imba_t3.node._local_nodes.length ; i ++ ){
				if( imba_t3.node._local_nodes[i] &&
					imba_t3.node._local_nodes[i].DOMNode() == imbaNode ){
					delete imba_t3.node._local_nodes[i];
					delete imbaNode;
				}
			}
		}
	}

	imba_t3.node._local_nodes = [];	//imba.nodeでインスタンス化されているノード
	/**
	*	@param	object<DOMelement>	domNode	DOMのエレメント
	*	@return	imba.node		インスタンス化されていない場合にはnull
	*/
	imba_t3.node.lookup = function( domNode )
	{
		if( domNode ){
			for( var i = 0 ; i < imba_t3.node._local_nodes.length ; i ++ ){
				if( imba_t3.node._local_nodes[i] &&
					imba_t3.node._local_nodes[i].DOMNode() == domNode ){
					return imba_t3.node._local_nodes[i];
				}
			}
		}
		return null;
	}
	//imba.nodeのイベント用のハンドラ関数
	imba_t3.node._event_listener = function( e )
	{
		var node = imba_t3.node.lookup( this );
		if( node ){
			if( node._event_callbacks && node._event_callbacks[e.type] !== undefined){
				node._event_callbacks[e.type].call(node, new imba_t3.event(e) );

			}
		}
	}

	/**
	*	DOMノードを作成します
	*	※tagにclassを設定する場合、attributeのプロパティ名はclassNameとしてください
	*	@param	string	tag			HTMLタグ(divとかpとか...)
	*	@param	object	attribute	このオブジェクトのプロパティをアトリビュートとしてセットします
	*	@param	string	inner_html	内部のHTML
	*/
	imba_t3.node.create = function( tag, attribute, inner_html )
	{
		var _node = document.createElement( tag );
		if( _node ){
			for( var _prop in attribute ){
				_node[_prop] = attribute[_prop];
			}
			if( inner_html ){
				try{
					_node.innerHTML = inner_html ;
				}
				catch( e ){
					//readOnly
					alert( inner_html );
				}
			}
		}
		return ( _node ) ?
					imba_t3.node.one( _node ) :
					null ;
	}

	//指定されたhtmlのタグを取得します
	imba_t3.node._extract_tag = function( text_html )
	{
		var rst = '';
		if( typeof text_html === 'string' ){
			var tag = text_html.match( /<([a-z]+)/i );
			if( tag && tag[1] ) rst = tag[1];
		}
		return rst ;
	}

	/**
	*	新しいノードを作成します
	*	@param string text_html		作成するHTMLテキスト
	*	@return object imba.node
	*/
	imba_t3.node.create2 = function( text_html )
	{
		var _tag = imba_t3.node._extract_tag( text_html );
		if( !_tag ) return null;
		
		var _inner = '';
		//divエレメントのinnerHTMLで使用できないものがあるので、それに関しては
		//fullで作成して、一部を抜き出す。
		//特に問題ないものは、そのまま使用する。
		switch( _tag.toLowerCase() )
		{
			case	'option':	//一番先頭にselected属性がつくので、2番目に挿入する(ちょっと強引ですが...)
				_inner = '<select><option></option>'+text_html+'</select>';
				break ;
			case	'tr':
				_inner = '<table><tbody>'+text_html+'</tbody></table>';
				break ;
			case	'td':
				_inner = '<table><tbody><tr>'+text_html+'</tr></tbody></table>';
				break ;
			case	'tbody':
			case	'thead':
				_inner = '<table>'+text_html+'</table>';
				break ;
			default:
				_inner = text_html;
				break ;
		}
		//div作成
		var _div = document.createElement( 'div' );
		try{
			_div.innerHTML = _inner ;
			var _children = _div.querySelectorAll( _tag );
			var rst = null ;
			if( _tag.toLowerCase() == 'option' ){//optionの場合は1つ目はdummyなので2つ目から取得する
				if( _children.length == 2 ) rst = imba_t3.node.one( _children[1] );
				else if( _children.length > 2 ){
					rst = [];
					for( var i = 1 ; i < _children.length ; i ++ ){
						rst[rst.length] = imba_t3.node.one( _children[i] );
					}
				}
			}
			else{
				if( _children.length == 1 ) rst = imba_t3.node.one( _children[0] );
				else if( _children.length > 1 ){
					rst = [];
					for( var i = 0 ; i < _children.length ; i ++ ){
						rst[rst.length] = imba_t3.node.one( _children[i] );
					}
				}
			}
		}
		catch(e){
			throw( 'Could no create['+e+']' );
		}
		return rst ;
	}

	//共通の内部関数(各インスタンスが共有する関数)
	//	※privateにしたい場合には、コンストラクタでthisのプロパティとして定義する
	imba_t3.node.prototype =
	{
		toString:
			function()
			{
				return imba_t3.node._OBJECT_NAME;
			},
		on:
			function( type, fx_callback )
			{
				if( this.dom_node ){
					this._event_callbacks[type] = fx_callback;
					if( this.dom_node.addEventListener ){
						this.dom_node.addEventListener( type, imba_t3.node._event_listener );
					}
					else if( this.dom_node.attachEvent ){	//for IE
						this.dom_node.attachEvent( type, imba_t3.node._event_listener );
					}
					else{
						throw( 'no EventListenerMethod' );
					}
				}
			},
		//ユーザデータ入出力
		setData:
			function( name, value )
			{
				if( this._data ){
					this._data[name] = value ;
				}
			},
		getData:
			function( name )
			{
				return ( this._data && this._data[name] !== undefined ) ?
												this._data[name] :
												null ;
			},
		setInner:
			function( inner_html )
			{
				this.set( 'innerHTML', inner_html );
			},
		getInner:
			function( sanitize )
			{
				var rst = this.get( 'innerHTML' );
				if( rst && sanitize ){
					rst = imba_t3.util.sanitize( rst );
				}
				return rst ;
			},
		getOuter:
			function( sanitize )
			{
				var rst = this.get( 'outerHTML' );
				if( rst && sanitize ){
					rst = imba_t3.util.sanitize( rst );
				}
				return rst ;
			},
		//DOM検索
		one:
			function( selector )
			{
				var rst = null ;
				if( this.dom_node && this.dom_node.querySelector ){
					var _node = this.dom_node.querySelector( selector );	//セレクタでnodeを取得できる便利メソッド
					if( _node != null ){
						rst = imba_t3.node.one( _node );
					}
				}
				return rst;
			},
		all:
			function( selector )
			{
				var rst = [];
				if( this.dom_node && this.dom_node.querySelectorAll ){
					var _nodes = this.dom_node.querySelectorAll( selector );
					for( var i = 0 ; i < _nodes.length; i ++ ){
						rst[rst.length] = imba_t3.node.one( _nodes[i] );
					}
				}
				return rst ;
			},
		//プロパティの入出力
		set:
			function( name, value )
			{
				if( this.dom_node ){
					this.dom_node[name] = value ;
				}
			},
		get:
			function( name )
			{
				if( this.dom_node ){
					return this.dom_node[name] ;
				}
				return undefined;
			},
		//スタイル関連の操作
		setStyle:
			function( name, value )
			{
				if( this.dom_node && this.dom_node.style ){
					this.dom_node.style[name] = value ;
				}
			},
		getStyle:
			function( name )
			{
				if( this.dom_node && this.dom_node.style ){
					return this.dom_node.style[name] ;
				}
				return undefined;
			},
		//nodeの階層操作
		appendChild:
			function( child )
			{
				if( this.dom_node && child.DOMNode ){
					this.dom_node.appendChild( child.DOMNode() );
				}
			},
		appendChilds:
			function( children )
			{
				//appendChildの配列対応(複数imba.node追加対応)
				if( this.dom_node ){
					if( typeof( children ) == 'object' && ( children instanceof Array ) ){
						for( var i = 0 ; i < children.length ; i ++ ){
							this.appendChild( children[i] );
						}
					}
					else{
						this.appendChild( children );
					}
				}
			},
		insertBefore:
			function( child, node_basis )
			{
				if( this.dom_node && child.DOMNode && node_basis.DOMNode ){
					this.dom_node.insertBefore( child.DOMNode(), node_basis.DOMNode() );
				}
			},
		removeChild:
			function( child )
			{
				if( this.dom_node && child.DOMNode ){
					this.dom_node.removeChild( child.DOMNode() );
				}
			},
		removeAllChild:
			function()
			{
				if( this.dom_node ){
					var childs = this.dom_node.childNodes ;
					for( var i = 0 ; i < childs.length ; i ++ ){
						this.dom_node.removeChild( childs[i] );
					}
				}
			},
		//class関連
		appendClass:
			function( cls )
			{
				if( !this.hasClass( cls ) ){
					if( this.dom_node ){
						if( !this.dom_node.className ){
							this.dom_node.className = cls ;
						}
						else{
							var tokens = this.dom_node.className.split( " " );
							tokens[tokens.length] = cls;
							this.dom_node.className = tokens.join(" ");
						}
					}
				}
			},
		removeClass:
			function( cls )
			{
				if( this.dom_node && this.dom_node.className ){
					var tokens = this.dom_node.className.split( " " );
					for( var i = 0 ; i < tokens.length ; i ++ ){
						if( tokens[i] == cls ){
							delete tokens[i];
							this.dom_node.className = tokens.join(" ");
							break;
						}
					}
				}
			},
		toggleClass:
			function( cls )
			{
				if( this.hasClass( cls ) ){
					this.removeClass( cls );
				}
				else{
					this.appendClass( cls );
				}
			},
		hasClass:
			function( cls )
			{
				var rst = false ;
				if( this.dom_node ){
					if( !this.dom_node.className ) this.dom_node.className = '';
					var tokens = this.dom_node.className.split( " " );
					for( var i = 0 ; i < tokens.length ; i ++ ){
						if( tokens[i] == cls ){
							rst = true ;
							break ;
						}
					}
				}
				return rst ;
			},
		DOMNode:
			function()
			{
				return this.dom_node;
			}

	};	//imba.node.prototype

	////////////////////////////////////////////////////////////////////////////////
	//event wrapper
	imba_t3.event = function( _event )
	{
		this._event = _event;
	}
	imba_t3.event._OBJECT_NAME = '[object imba_t3.event]';
	imba_t3.event.isImbaEvent = function( obj )
	{
		return (obj && 
				obj.toString() == imba_t3.event._OBJECT_NAME);
	}
	imba_t3.event.prototype = 
	{
		toString:
			function()
			{
				return imba_t3.event._OBJECT_NAME;
			},
		//プロパティの入出力
		set:
			function( name, value )
			{
				if( this._event ){
					this._event[name] = value ;
				}
			},
		get:
			function( name )
			{
				if( this._event ){
					return this._event[name] ;
				}
				return undefined;
			},
		//これ以上のバブリングをやめる
		stopBubble:
			function()
			{
				//イベントのこれ以上のバブルを禁止
				if( this._event ){
					if( this._event.stopPropagation ) this._event.stopPropagation();
					else this._event.cancelBubble = true ;	//for IE
				}
			},
		//デフォルトの処理をやめる
		stopDefault:
			function()
			{
				//このイベントに対するデフォルトの挙動を抑制
				if( this._event ){
					if( this._event.preventDefault ) this._event.preventDefault();
					else this._event.returnValue = false;		//for IE
				}
			},
		//targetをimba.nodeで取得します	
		getTarget:
			function()
			{
				return ( this._event && this._event.target ) ?
												imba_t3.node.one( this._event.target ) :
												null ;
			},
		//currentTargetをimba.nodeで取得します	
		getCurrentTarget:
			function()
			{
				return ( this._event && this._event.currentTarget ) ?
												imba_t3.node.one( this._event.currentTarget ) :
												null ;
			},
		getEvent:
			function()
			{
				return this._event;
			}

	};

	////////////////////////////////////////////////////////////////////////////////
	//imbaライブラリをwindowにセット
	window.imba_t3 = imba_t3;

})(window);
/**
	mekaライブラリ.
	2013/07/04
*/
(function(window)
{
	var	meka = {};
	var document = window.document;
	
	meka.set_nodeStyleSize = function (node,width,height) 
	{
		if( width >= 0) node.setStyle('width' ,width + "px");
		if( height>= 0) node.setStyle('height',height+ "px");
	}

	meka.set_nodeStylePosition = function (node,left,top) 
	{
		node.setStyle('left' ,left + "px");
		node.setStyle('top'  ,top  + "px");
	}
	
	meka.set_nodeStyleBox =	function ( node,top,left,width,height )
	{
		meka.set_nodeStylePosition (node,top,left);
		meka.set_nodeStyleSize ( node,width,height);
	}
	
	/**
	*	スライダの生成
	*	@param object	config	スライダプロパティ
	*			プロパティ
	*					skin: 		string		スキン名(ユニークID)			default 'normal'
	*					parent: 	node		ハウジングするノード
	*					dir: 		string		方向							'horizontal'か'vertical'
	*					width: 		string		幅(横スライダのときに利用)		default '200px'
	*					height: 	string		高さ(縦スライダのときに利用)	default '200px'
	*					minValue: 	numeric		最小値
	*					maxValue: 	numeric		最大値
	*					init_value: numeric		初期値
	*					prefix:		string		設定するIDの接頭詞				default''
	*
	*/
	meka.range = function(config){
		this.prop = {
						skin: 'normal',
						parent: null,				//imba.node
						dir: 'horizontal',			//or vertical
						width: '200px',				//horizontalのときに使用(スライダの表示サイズ)
						height: '200px',			//verticalのときに使用(スライダの表示サイズ)
						minValue: 0,				//最小値
						maxValue: 100,				//最大値
						init_value: 0,				//初期値
						value:50,
						prefix:''
					};

		// デフォルト値を指定値に入替
		if( config ){
			for( var _prop in config ){
				this.prop[_prop] = config[_prop] ;
			}
		}
		
		// 初期値設定
		this.value = this.prop.init_value;
		
		// スライダーノードの生成
		this.node_slider_rail = this._createNode();
		
		// ノードの登録
		this.prop.parent.appendChild( this.node_slider_rail );
		
		// ノードの詳細保存
		this.node_slider_rail  = document.getElementById( this.prop.prefix + this._getBaseClassName() + '_rail');
		this.node_slider_thumb = document.getElementById( this.prop.prefix + this._getBaseClassName() + '_thumb');
		this.node_slider_dist  = document.getElementById( this.prop.prefix + this._getBaseClassName() + '_dist');

		//サイズセット
		if( this.isHorizontal() )	this.node_slider_rail.style[ 'width' ] = this.prop.width ;
		else						this.node_slider_rail.style[ 'height'] = this.prop.height ;
		
		this.fx_update_callback = null ;						//更新通知関数
		//initial update
		
		var ctx = this;
		setTimeout(	function(){meka.range._initial_update.call( ctx );}, 10 );
		
		// イベント登録
		this.node_slider_rail.addEventListener('touchstart', _handle_touch,false);
		this.node_slider_rail.addEventListener('touchmove' , _handle_touch,false);
		
		ctx.paint();
		
		function _handle_touch(event)
		{
			event.preventDefault();
			ev = event.touches[0];

			thumb = document.getElementById(ctx.prop.prefix+  ctx._getBaseClassName() + '_thumb');
			obj   = document.getElementById(ctx.prop.prefix+  ctx._getBaseClassName() + '_rail');
			dist  = document.getElementById(ctx.prop.prefix+  ctx._getBaseClassName() + '_dist');

			palRect = ctx.node_slider_rail.getBoundingClientRect();
			thumbRect = ctx.node_slider_thumb.getBoundingClientRect();
			_value = 0;
			thumb.style.opacity = 0.5;
			
			if( ctx.isHorizontal() ){	// 横
				// 親オブジェクトのサイズ
				w  = ctx.node_slider_rail.clientWidth;
				// スライダーのサイズ
				tw = ctx.node_slider_thumb.clientWidth;
				
				// スクリーンスクロール考慮
				var scrL = document.documentElement.scrollLeft || document.body.scrollLeft;
				// 親オブジェクト基準の新座標
				mx = parseInt(ev.pageX,10) - palRect['left'] -scrL ;
//				mx = parseInt(ev.pageX,10) - ctx.node_slider_rail.offsetLeft ;
				if( mx < 0 ) mx = 0;
				if( mx > w ) mx = w;
				
				// 座標更新
				_value = mx;
				ctx.node_slider_thumb.style.left = (mx-tw/2) +"px";
				
				// distの幅も更新
				ctx.node_slider_dist.style.width = mx + "px";
			}else{
				// 縦
				// 親オブジェクトのサイズ
				h  = ctx.node_slider_rail.clientHeight;
				
				// スライダーのサイズ
				th = ctx.node_slider_thumb.clientHeight;
				
				// スクリーンスクロール考慮
				var scrT = document.documentElement.scrollTop || document.body.scrollTop;
				
				// 親オブジェクト基準の新座標
				my = parseInt(ev.pageY,10) - palRect['top' ] -scrT;
//				my = parseInt(ev.pageY,10) - ctx.node_slider_rail.offsetTop;
				if( my < 0 ) my = 0;
				if( my > h ) my = h;
				
				// distの幅も更新
				dist.style['top'] = my + "px";
				dist.style['height'] = (h-my) + "px";
				
				// 座標更新
				_value = my;
				
				// 座標更新
				_value = my;
				ctx.node_slider_thumb.style.top = (my - th/2) +"px";
				
				// distの幅/高さも更新
				ctx.node_slider_dist.style.top    = my + "px";
				ctx.node_slider_dist.style.height = (h-my) + "px";
			}
						thumb.style.opacity = 1;

			ctx.fx_update_callback( ctx._dp2lp(_value));
		}
	}
	
	meka.range.prototype = 
	{
	_getBaseClassName:
		function()
		{
			var rst = '';
			try{
				rst = 'slider-'+this.prop.skin+'-'+( this.isHorizontal() ? 'h' : 'v' );
			}
			catch(e){
				rst = '';
			}
			return rst;
		},
	_createNode :
		function() 
		{
			cls_name = this._getBaseClassName();
			node = document.createElement( 'div' );
			node.innerHTML = '<div id="'+ this.prop.prefix + cls_name +'_dist" class="'+ cls_name +'_dist" ></div><div id="'+ this.prop.prefix + cls_name+'_thumb" class="'+ cls_name+'_thumb"></div>';
			node['id'] = this.prop.prefix + cls_name + "_rail";
			node['className'] = cls_name + "_rail";
			return node;
		},
	
	//値をピクセルに変更します(指定値が表示上どの位置なのかを取得)
	_lp2dp:
		function( logical_pos )
		{
			var device_range = this.getMotionRange();
			var dp = ( logical_pos - this.prop.minValue ) *  device_range / ( this.prop.maxValue - this.prop.minValue ) ;
			return ( this.isHorizontal() ) ?
									dp :
									( device_range - dp );
			
		},
	//ピクセルを値に変更します(表示位置に対する値を取得します)
	_dp2lp:
		function( device_pos )
		{
			var device_range = this.getMotionRange();
			var lp = device_pos * ( this.prop.maxValue - this.prop.minValue )  * 1 / device_range + this.prop.minValue ;
			return ( this.isHorizontal() ) ?
									lp :
									( ( this.prop.maxValue - this.prop.minValue ) - lp );
		},
	
	//コントロールのスクリーン上の可動範囲(幅)(pixel数)を取得します
	getMotionRange:
		function()
		{
			var rail_size	= 0;
			if( this.isHorizontal() ){
				rail_size	= this.node_slider_rail.clientWidth;
			}
			else{
				rail_size	= this.node_slider_rail.clientHeight;
			}
			return	rail_size;
		},
	/**
	*	再描画します
	*/
	paint:
		function()
		{
			var pos = this._lp2dp( this.value ) ;
			
			if( this.isHorizontal() ){
				this.node_slider_thumb.style['left'] = (pos - (this.node_slider_thumb.clientWidth)/2) +'px' ;
				this.node_slider_dist.style['width'] = pos +'px';
			}
			else{
				this.node_slider_thumb.style['top'] = (pos + (this.node_slider_thumb.clientWidth)/2 )+'px' ;
				this.node_slider_dist.style['top'] = pos +'px';
				this.node_slider_dist.style['height'] = (this.node_slider_rail.clientHeight - pos)+'px';
			}
		},
	/**
	*	値をセットします
	*	@param	numeric	value		値  (minValue~maxValueの範囲外の場合は、範囲内に丸められます)
	*	@param	boolean	no_redraw	true..再描画しない ※つまみがドラッグされたときなどは、再描画する必要はありません
	*	@param	boolean	do_callback	true..値をセットした後に更新コールバックが呼び出されます
	*/	
	setValue:
		function( value, no_redraw, do_callback )
		{
			if( this.prop.maxValue < value )		this.value = this.prop.maxValue ;
			else if( this.prop.minValue > value )	this.value = this.prop.minValue ;
			else									this.value = value;
			
			if( !no_redraw ) this.paint();
			if( do_callback && 
				this.fx_update_callback ){
				this.fx_update_callback.call( this, this.value );
			}
		}, 
	/**
	*	値を取得します
	*/	
	getValue:
		function()
		{
			return this.value ;
		},
	/**
	*	更新コールバックのセット
	*	@param function(numeric)	fx_callback		setValueのdo_callbackをtrueにしたときのオペレーションで呼び出される関数
	*/
	setUpdateCallback:
		function( fx_callback )
		{
			this.fx_update_callback = fx_callback ;
		},
	//横スライダ?
	isHorizontal:
		function()
		{
			return ( this.prop && this.prop.dir && ( this.prop.dir == 'horizontal' ) );
		},
	//縦スライダ?
	isVertical:
		function()
		{
			return ( this.prop && this.prop.dir && ( this.prop.dir == 'vertical' ) );
		},
	// 最大値更新
	setLimitValue:
		function(minValue,maxValue)
		{
			this.prop.maxValue = maxValue;
			this.prop.minValue = minValue;
		}
	}
	
	/**
	*	初回更新
	*	※表示位置やサイズが確定した段階で、描画して終了
	*/
	meka.range._initial_update = function()
	{
		var ctx = this ;
		if( meka.range.prototype.getMotionRange.call( ctx ) == 0 ){
			setTimeout(	function(){ meka.range._initial_update.call( ctx );},10 );
		}
		
		meka.range.prototype.paint.call( ctx );
	}
	
	window.meka = meka;
	
})(window);

/**
	2013/10/17	再生完了後のpause制御
*/
/*=========================================================*/

"use strict";
// Date.now未実装対策
Date.now || (Date.now = function () { return +new Date; });

function HTML5Player_t3() {
    imba_t3._init_on_ready();
    var _my = this;
    _my._nodes = new Object();
    _my._values = new Object();
    _my._defVals = new Object();

    //--------------------------------------------------
    _my._values.title_use = false;
    _my._values.replay_use = false;
    _my._values.exlink_use = false;
    _my._values.sns_use = false;
    _my._values.play_use = false;
    _my._values.time_use = false;
    _my._values.seek_use = false;
    _my._values.multibitrate_use = false;
    _my._values.fullscreen_use = false;
    _my._values.footer_use = false;
    _my._values.watermark_design = 1;
    _my._values.watermark_use = true;

    _my._values.header_use = true;
    _my._values.ctrl_use = true;
    _my._values.loading_use = true;
    _my._values.is_iphone = false;
    _my._values.is_Chrome = false;
    _my._values.is_android = false;
    _my._values.is_android_40x = false;

    _my._values.responsive = "off";
    _my._values.start_time = 0;
    _my._values.loadedmetadata = false;
    _my._values.fullscreen = false;
    _my._values.movie_auth = false;
    _my._values.auth_input = false;
    _my._values.authed = false;
    _my._values.a = null;
    _my._values.resumeEnable = "off";

    _my._values.isLive = false;

	_my._values.first_play = true;

    _my._languageResource;
    //--------------------------------------------------
    // プレイヤータイプ定数
    _my.PS_NORMAL = 1;
    _my.PS_MIDDLE = 2;
    _my.PS_MINIMUM = 3;
    //--------------------------------------------------
    // 初期化
    // @param	jmcPlayer	情報が設定されたJMCPlayer
    // @param	videoID		videoタグに設定するID
    _my.init = function (jmcPlayer, videoID) {
        // debug-------------------------
        _my.version = "1.18_000";
        //-------------------------------


        var nodeName = '#' + jmcPlayer.fieldID;
        // プレイヤーの作成

        _my.videoID = videoID;
        _my.playerID = videoID;
        _my._values.movie_w = Math.floor(jmcPlayer.flashVars.movie_width);
        _my._values.movie_h = Math.floor(jmcPlayer.flashVars.movie_height);
        _my._values.width = _my._values.movie_w;
        _my._values.height = _my._values.movie_h;

        _my._values.jmcPlayer = jmcPlayer;
        _my._load_values();

        var playerNode = imba_t3.node.create('div',
                                    {
                                        id: _my.playerID + "player_main",
                                        className: "player_main"
                                    },
                                    _my._create_tag());
        if (_my._values.responsive == "on") {
            var aspect = _my._values.movie_h / _my._values.movie_w*100;
            playerNode.setStyle('padding-bottom', aspect + "%");
        } else if (_my._values.responsive == "fit") {
            playerNode.setStyle("width", "100%");
            playerNode.setStyle("height", "100%");
        } else {
            playerNode.setStyle('width', _my._values.movie_w + "px");
            playerNode.setStyle('height', _my._values.movie_h + "px");
        }
        

        var pnode = imba_t3.node.one(nodeName);
        if (pnode == null) return pnode;

        pnode.appendChild(playerNode);
        pnode.set('className', 'h5_player');

        _my._nodes.player_main = playerNode;

        //ページへのイベント
        //window.addEventListener("beforeunload", _my._leaving);

        _my._init_nodes();
        _my._init_video();
        _my._init_video_state();
    };

    //--------------------------------------------------
    // タグ生成関連
    _my._create_tag = function () {
        var cssType = _my._get_css_suffix();
        var cssTypeWidth = _my._get_css_suffix("width");
        var cssTypeHeight = _my._get_css_suffix("height");
        var lang = "ja";
        if (jstream_t3.utils.Util.browserLanguage() != "ja") {
            lang = "en";
        }
        _my._languageResource = new jstream_t3.resource.LanguageResource(_my._values.jmcPlayer.flashVars["language_resource_" + lang]);
        var html = '<div id="' + _my.playerID + 'video_main" class="video_main">';

        if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
            _my._values.width = "100%";
            _my._values.height = "100%";
            html = html + '<video id="' + _my.videoID + '"  class="h5_video" ></video>';
        } else {
            html = html + '<video id="' + _my.videoID + '"   class="h5_video" ></video>';
        }

        html = html + '<div id="' + _my.playerID + 'video_operation" class="video_operation">'
                + '<div id="' + _my.playerID + 'play" class="play">'
                + '<div id="' + _my.playerID + 'play_state" class="play_state">';
        if (_my._values.watermark_use) {
            if (_my._values.watermark_design == "1") {
                html = html
                + '<div id="' + _my.playerID + 'play_state_wait" class="play_state_wait1' + cssType + '"></div>';
            } else {
                html = html
                + '<div id="' + _my.playerID + 'play_state_wait" class="play_state_wait' + cssType + '"></div>';
            }
        }
        if (_my._values.loading_use) {
            html = html
                + '<div id="' + _my.playerID + 'play_state_loading" class="play_state_loading"></div>';
        }
        if (_my._values.watermark_use) {
            if (_my._values.watermark_design == "1") {
                html = html
                + '<div id="' + _my.playerID + 'play_state_play" class="play_state_play1' + cssType + '"></div>'
                + '<div id="' + _my.playerID + 'play_state_pause" class="play_state_pause' + cssType + '"></div>';
            } else {
                html = html
                + '<div id="' + _my.playerID + 'play_state_play" class="play_state_play' + cssType + '"></div>'
                + '<div id="' + _my.playerID + 'play_state_pause" class="play_state_pause' + cssType + '"></div>';
            }
        }
        html = html
                + '</div>'	// play_state
                + '</div>'	// play
                + '<div id="' + _my.playerID + 'btn_operation" class="btn_operation"></div>';

        if (_my._values.ctrl_use) {
            html = html
                + '<div id="' + _my.playerID + 'ctrl" class="ctrl">';
            if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
                if (_my._values.seek_use) {
                    html = html + '<div id="' + _my.playerID + 'ctrl_video_seek_wrap">'
                            + '<div id="' + _my.playerID + 'ctrl_video_seek" class="ctrl_video_seek' + cssTypeWidth + '">'
                            + '<div id="' + _my.playerID + 'ctrl_video_seek_cover" class="ctrl_video_seek_cover"></div>'
                            + '<div id="' + _my.playerID + 'ctrl_video_seek_slider"></div>'
                            + '</div>'
                            + '</div>';
                }
                html = html + '<div id="' + _my.playerID + 'ctrl_left_wrap">'
                if (_my._values.play_use) {
                    html = html + '<div id="' + _my.playerID + 'ctrl_play" class="ctrl_play' + cssTypeWidth + '"></div>';
                }

                if (_my._values.time_use) {
                    html = html + '<div id="' + _my.playerID + 'ctrl_video_time" class="ctrl_video_time' + cssTypeWidth + '"><span id="' + _my.playerID + 'video_play_time" >0:00:00</span>/<span id="' + _my.playerID + 'video_total_time">0:00:00</span></div>';
                }
                html = html + '</div>'; //leftwrapper

                html = html + '<div id="' + _my.playerID + 'ctrl_right_wrap">'
                if (_my._values.fullscreen_use) {
                    html = html + '<div id="' + _my.playerID + 'ctrl_full" class="ctrl_full" ></div>';
                }

                if (_my._values.multibitrate_use) {
                    html = html + '<div id="' + _my.playerID + 'ctrl_select" class="ctrl_select' + cssTypeWidth + '" >'
                            + '<div id="' + _my.playerID + 'ctrl_select_now" class="ctrl_select_now"></div>'
                            + '<ul id="' + _my.playerID + 'ctrl_select_list" class="ctrl_select_list">'
                            + '<li id="' + _my.playerID + 'ctrl_select_list_0" class="ctrl_select_default" index="0" style="display:none;">0</li>'
                            + '<li id="' + _my.playerID + 'ctrl_select_list_1" class="ctrl_select_default" index="1" style="display:none;">1</li>'
                            + '<li id="' + _my.playerID + 'ctrl_select_list_2" class="ctrl_select_default" index="2" style="display:none;">2</li>'
                            + '<li id="' + _my.playerID + 'ctrl_select_list_3" class="ctrl_select_default" index="3" style="display:none;">3</li>'
                            + '<li id="' + _my.playerID + 'ctrl_select_list_4" class="ctrl_select_default" index="4" style="display:none;">4</li>'
                            + '<li id="' + _my.playerID + 'ctrl_select_list_5" class="ctrl_select_default" index="5" style="display:none;">5</li>'
                            + '</ul>'
                            + '</div>';
                }
                html = html + '</div>'; //rightwrapper
            } else {
                if (_my._values.play_use) {
                    html = html + '<div id="' + _my.playerID + 'ctrl_play" class="ctrl_play' + cssTypeWidth + '"></div>';
                }

                if (_my._values.time_use) {
                    html = html + '<div id="' + _my.playerID + 'ctrl_video_time" class="ctrl_video_time' + cssTypeWidth + '"><span id="' + _my.playerID + 'video_play_time" >0:00:00</span>/<span id="' + _my.playerID + 'video_total_time">0:00:00</span></div>';
                }
                if (_my._values.seek_use) {
                    html = html + '<div id="' + _my.playerID + 'ctrl_video_seek_wrap">'
                            + '<div id="' + _my.playerID + 'ctrl_video_seek" class="ctrl_video_seek' + cssTypeWidth + '"><div id="' + _my.playerID + 'ctrl_video_seek_cover" class="ctrl_video_seek_cover"></div><div id="' + _my.playerID + 'ctrl_video_seek_slider"></div></div>'
                            + '</div>';
                }
                if (_my._values.fullscreen_use) {
                    html = html + '<div id="' + _my.playerID + 'ctrl_full" class="ctrl_full" ></div>';
                }

                if (_my._values.multibitrate_use) {
                    html = html + '<div id="' + _my.playerID + 'ctrl_select" class="ctrl_select' + cssTypeWidth + '" >'
                            + '<div id="' + _my.playerID + 'ctrl_select_now" class="ctrl_select_now"></div>'
                            + '<ul id="' + _my.playerID + 'ctrl_select_list" class="ctrl_select_list">'
                            + '<li id="' + _my.playerID + 'ctrl_select_list_0" class="ctrl_select_default" index="0" style="display:none;">0</li>'
                            + '<li id="' + _my.playerID + 'ctrl_select_list_1" class="ctrl_select_default" index="1" style="display:none;">1</li>'
                            + '<li id="' + _my.playerID + 'ctrl_select_list_2" class="ctrl_select_default" index="2" style="display:none;">2</li>'
                            + '<li id="' + _my.playerID + 'ctrl_select_list_3" class="ctrl_select_default" index="3" style="display:none;">3</li>'
                            + '<li id="' + _my.playerID + 'ctrl_select_list_4" class="ctrl_select_default" index="4" style="display:none;">4</li>'
                            + '<li id="' + _my.playerID + 'ctrl_select_list_5" class="ctrl_select_default" index="5" style="display:none;">5</li>'
                            + '</ul>'
                            + '</div>';
                }
            }
            
            html = html
                + '</div>';	// ctrl
        };

        html = html
                + '<div id="' + _my.playerID + 'ctrl_cover" class="ctrl_cover"></div>';

        if (_my._values.header_use) {
            html = html
                + '<div id="' + _my.playerID + 'header" class="header' + cssTypeHeight + '">'
                + '<div id="' + _my.playerID + 'video_title" class="video_title' + cssTypeHeight + '">';
            if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
                if (_my._values.title_use) {
                    html = html + '<div id="' + _my.playerID + 'video_title_text_cover" style="width:100%;float:left;">'
                                + '<div id="' + _my.playerID + 'video_title_text" class="video_title_text' + cssTypeHeight + '" style="height:30px;margin-right:80px;float:none;"></div>'
                                + '</div>';
                }
                if (_my._values.replay_use) {
                    if (JMCPlayer.browserLanguage("v3") == "ja") {
                        html = html + '<div id="' + _my.playerID + 'ctrl_replay" style="background: none;" class="ctrl_replay' + cssTypeHeight + '">'
                            + '<div class="ctrl_replay_icon' + cssTypeHeight + '"></div>'
                            + '<div class="ctrl_replay_text' + cssTypeHeight + '">' + _my._languageResource.kinds.Replay + '</div>'
                            + '</div>';
                        //html = html + '<div id="' + _my.playerID + 'ctrl_replay" class="ctrl_replay' + cssTypeHeight + '"></div>';
                    } else {
                        html = html + '<div id="' + _my.playerID + 'ctrl_replay" style="background: none;" class="ctrl_replay' + cssTypeHeight + '">'
                            + '<div class="ctrl_replay_icon' + cssTypeHeight + '"></div>'
                            + '<div class="ctrl_replay_text' + cssTypeHeight + '">' + _my._languageResource.kinds.Replay + '</div>'
                            + '</div>';
                    }
                }
            } else {
                if (_my._values.title_use) {
                    html = html + '<div id="' + _my.playerID + 'video_title_text" class="video_title_text' + cssTypeHeight + '"></div>';
                }
                if (_my._values.replay_use) {
                    if (JMCPlayer.browserLanguage("v3") == "ja") {
                        html = html + '<div id="' + _my.playerID + 'ctrl_replay" style="background: none;" class="ctrl_replay' + cssTypeHeight + '">'
                            + '<div class="ctrl_replay_icon' + cssTypeHeight + '"></div>'
                            + '<div class="ctrl_replay_text' + cssTypeHeight + '">' + _my._languageResource.kinds.Replay + '</div>'
                            + '</div>';
                        //html = html + '<div id="' + _my.playerID + 'ctrl_replay" class="ctrl_replay' + cssTypeHeight + '"></div>';
                    } else {
                        html = html + '<div id="' + _my.playerID + 'ctrl_replay" style="background: none;" class="ctrl_replay' + cssTypeHeight + '">'
                            + '<div class="ctrl_replay_icon' + cssTypeHeight + '"></div>'
                            + '<div class="ctrl_replay_text' + cssTypeHeight + '">' + _my._languageResource.kinds.Replay + '</div>'
                            + '</div>';
                    }
                }
            }
            

            html = html
                + '</div>'	// video_title;
                + '</div>';	// header
        }

        if (_my._values.exlink_use || _my._values.sns_use) {
            html = html + '<div id="' + _my.playerID + 'navi" class="navi' + cssTypeHeight + '">';
            if (_my._values.exlink_use) {
                html = html + '<div id="' + _my.playerID + 'navi_outlink" class="navi_outlink" ></div>';
            }
            if (_my._values.sns_use) {
                html = html + '<div id="' + _my.playerID + 'navi_share" class="navi_share' + cssTypeHeight + '"></div>';
            }
            html = html + '</div>';	// navi;
        }

        html = html
                + '<div id="' + _my.playerID + 'info" class="info">'
                + '<div id="' + _my.playerID + 'info_header" class="info_header' + cssType + '">'
                + '<div id="' + _my.playerID + 'info_icon" class="info_icon_outlink info_icon"></div>'
                + '<div id="' + _my.playerID + 'info_title" class="info_title' + cssType + '"></div>'
                + '<div id="' + _my.playerID + 'info_close" class="info_icon_close info_icon ' + cssType + '"></div>'
                + '</div>'	// info_header
                + '<div id="' + _my.playerID + 'info_main" class="info_main' + cssType + '">';

        if (_my._values.exlink_use) {
            html = html + '<div id="' + _my.playerID + 'info_outlink" class="info_outlink"></div>';
        }
        if (_my._values.sns_use) {
            html = html + '<div id="' + _my.playerID + 'info_share" class="info_share"></div>';
        }
        html = html
                + '</div>'	// info_main
                + '</div>'	// info
        if (_my._values.movie_auth) {
            var size = 30;
            if (cssType == "_ss") {
                size = 10;
            } else if (cssType == "_s") {
                size = 20;
            }
            
            html = html
                + '<div id="' + _my.playerID + 'block_layer"></div>'
                + '<div id="' + _my.playerID + 'login" class="info">'
                + '<div id="' + _my.playerID + 'login_header" class="info_header' + cssType + '">'
                + '<div id="' + _my.playerID + 'login_icon" class="info_icon_outlink info_icon"></div>'
                + '<div id="' + _my.playerID + 'login_title" class="info_title' + cssType + '"></div>'
                //+ '<div id="' + _my.playerID + 'login_close" class="info_icon_close info_icon' + cssType + '"></div>'
                + '</div>'	// info_header
                + '<div id="' + _my.playerID + 'login_main" class="info_main' + cssType + '">'
                + '<div id = "' + _my.playerID + 'loginform" class="info_auth" style="position:relative;">'
                + '<div class="login_text_input' + cssType + '"><input type="text"  align="left" size="' + size + '" id="' + _my.playerID + 'loginID" name="id" value="' + (_my._values.a_id || "") + '" placeholder="' + _my._languageResource.kinds.ID + '"/ ></div>'
                + '<div class="login_text_input' + cssType + '"><input type="password" align="left" size="' + size + '" id="' + _my.playerID + 'loginPASS" name="pass" value="" placeholder="' + _my._languageResource.kinds.PASS + '"/ ></div>'
                + '</div>'  // info_auth
                + '<button id="' + _my.playerID + 'loginButton" class="login_button_input' + cssType + '" >' + _my._languageResource.kinds.PLAY + '</button>'
                + '</div>'	// info_main
                + '</div>';	// info
        }

        html = html
                + '</div>'	// video_operation
                + '</div>';	// video_main

        if (_my._values.footer_use) {
            html = html
                + '<div id="' + _my.playerID + 'footer" class="footer' + cssType + '">'
                + '<div id="' + _my.playerID + 'footer_text" class="footer_text' + cssType + '"></div>'
                + '</div>';	//footer
        }

        return html;
    };

    // サイズ別プレイヤー種別
    _my._getPlayerStyle = function (type) {
        var w = _my._values.movie_w;
        var h = _my._values.movie_h;//- _my._values.footerSize;
        if (_my._values.responsive != "on" && _my._values.responsive != "fit") {
            h -= _my._values.footerSize;
        } else {
            var pEl = document.getElementById(_my._values.jmcPlayer.fieldID);
            var size = pEl.getBoundingClientRect();
            w = size.width;
            h = size.height;
        }

        if (type == "width") {
            h = 999;
        } else if (type == "height") {
            w = 999;
        }

        if ((w < 240) || (h < 180)) return _my.PS_MINIMUM;
        else if ((w < 320) || (h < 240)) return _my.PS_MIDDLE;
        else return _my.PS_NORMAL;
    }

    // サイズ別CSSサフィックス
    _my._get_css_suffix = function (type) {
        var style = _my._getPlayerStyle(type);
        if (style == _my.PS_MINIMUM) return "_ss"
        else if (style == _my.PS_MIDDLE) return "_s"

        return "";
    }

    // 認証画面設定
    _my._set_auth = function () {
        var cssType = _my._get_css_suffix();

        //タイトル設定
        var titleNode = imba_t3.node.one('#' + _my.playerID + 'login_title');
        titleNode.setInner(_my._languageResource.kinds.AUTH);
        //ボタン
        var button_node = imba_t3.node.one('#' + _my.playerID + 'loginButton');
        var pnode = imba_t3.node.one('#' + _my.playerID + 'login_main');
        //pnode.appendChild(button_node);
        button_node.setStyle('width', "90px");
        button_node.setStyle('height', "20px");


        var dom = button_node.DOMNode();
        var idNode = imba_t3.node.one('#' + _my.playerID + 'loginID');
        var passNode = imba_t3.node.one('#' + _my.playerID + 'loginPASS')
        if (cssType == "_s" || cssType == "_ss") {
            var height = "";
            var font_size = "";
            if (_my._values.jmcPlayer.accessor.model.getEnvironmentType() == "mobileStreaming" && _my._values.jmcPlayer.accessor.model.isIframe === true && cssType =="_ss") {
                idNode.set("className", "login_text_input_ss_iOS");
                passNode.set("className", "login_text_input_ss_iOS");
            }
        }
        dom.onclick = (function () {
            _my._set_login_visibled(false);
            var idText = idNode.dom_node.value;
            var passText = passNode.dom_node.value;
            //alert('IDis' + idText + ',PASSis' + passText)
            _my._values.jmcPlayer.accessor.login(idText, passText);
        });
        idNode.dom_node.onkeydown = (function () {
            if (event.keyCode == 13) {
                var idText = idNode.dom_node.value;
                var passText = passNode.dom_node.value;
                //alert('IDis' + idText + ',PASSis' + passText)
                if (idText && passText) {
                    _my._set_login_visibled(false);
                    _my._values.jmcPlayer.accessor.login(idText, passText);
                }
            }
        });
        passNode.dom_node.onkeydown = (function () {
            if (event.keyCode == 13) {
                var idText = idNode.dom_node.value;
                var passText = passNode.dom_node.value;
                //alert('IDis' + idText + ',PASSis' + passText)
                if (idText && passText) {
                    _my._set_login_visibled(false);
                    _my._values.jmcPlayer.accessor.login(idText, passText);
                }
            }
        });
    };


    // 外部リンク設定
    _my._set_outlink = function (index, text, url) {
        _my._values.linkset['exlink' + index] = url;
        var cssType = _my._get_css_suffix();

        var innerHTML = text;
        var outlink_node = imba_t3.node.create('div',
                                    {
                                        className: "outlink_url" + cssType
                                    },
                                    innerHTML);

        outlink_node.setStyle("width", Math.floor(_my._values.info_w * 0.9) + "px");
        if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
            outlink_node.setStyle("margin", "auto");
        }
        var pnode = imba_t3.node.one('#' + _my.playerID + 'info_outlink');
        pnode.appendChild(outlink_node);

        var dom = outlink_node.DOMNode();
        dom.onclick = (function (index) { return function () { _my._link_action("exlink" + index) } })(index);
    };

    // シェア設定
    _my._set_share = function () {
        var i;
        for (i = 0; i < _my._values.share.length; i++) {
            var url = "";
            var share_class = "";
            switch (_my._values.share[i]) {
                case "facebook":
                    share_class = "facebook";
                    url = "http://www.facebook.com/share.php"
                        + "?u=" + _my._values.parent_url;
                    break;
                case "twitter":
                    share_class = "twitter";
                    url = "http://twitter.com/share"
                        + "?text=" + _my._values.movie_title
                        + "&url=" + _my._values.parent_url;
                    //				+ "&via="  + escape("whaison")
                    break;
                case "mixi":
                    share_class = "mixi";
                    var passCode = "071c06559d69bb3a64cfd0b2bba0c96e08c8e28d";
                    url = "http://mixi.jp/share.pl"
                        + "?u=" + _my._values.parent_url
                        + "&k=" + passCode;
                    break;
                case "google":
                    share_class = "google_plus";
                    url = "https://plusone.google.com/share?url=" + _my._values.parent_url;
                    break;
                case "LINE":
                    share_class = "line";
                    query = _my._values.movie_title + " " + _my._values.parent_url;
                    query=encodeURIComponent(query);
                    url = "http://line.me/R/msg/text/?" + query;
                    break;
            }

            if (url.length) {
                _my._values.linkset[_my._values.share[i]] = url;
                _my._create_share_link(_my._values.share[i], url, share_class);
            }
        }
    };

    // シェアノード作成
    _my._create_share_link = function (text, url, share_class) {
        var cssType = _my._get_css_suffix();
        
        var share_node = imba_t3.node.create('div',
                                    {
                                        className: "info_share_link" + cssType
                                    },
                                    '<span class="info_share_link_icon info_share_' + share_class + cssType + '"></span>' + text);

        var pnode = imba_t3.node.one('#' + _my.playerID + 'info_share');

        if (text == "LINE") {
            var share_link = imba_t3.node.create('a',
                                    {
                                        href: url,
                                        target:"_parent"
                                    });
            share_link.appendChild(share_node);
            pnode.appendChild(share_link);
            var dom = share_link.DOMNode();

        } else {
            pnode.appendChild(share_node);
            var dom = share_node.DOMNode();
        }
        dom.onclick = (function (text) { return function () { _my._link_action(text) } })(text);
    };

    // サムネイル画像の設定。
    _my._set_video_thumb = function (filePath) {
        if (filePath && filePath.length > 0)
            _my._nodes.video_main.setStyle('background-image', 'url(' + filePath + ')');
        else
            _my._nodes.video_main.setStyle('background-image', '');
    };

    // タイトルの設定。
    _my._set_video_title = function () {
        if (_my._values.title_use) {
            _my._nodes.video_title_text = imba_t3.node.one('#' + _my.playerID + 'video_title_text');
            _my._nodes.video_title_text.setInner(_my._values.movie_title);
        }

        _my._values.rep_w = 0;
        if (_my._values.replay_use) {
            // リプレイの幅設定
            if (_my._getPlayerStyle("height") == _my.PS_NORMAL) {
                _my._values.rep_w = 85;
            } else {
                _my._values.rep_w = 25;
            }
            
            //_my._nodes.ctrl_replay.setStyle('left', (_my._values.movie_w - _my._values.rep_w) + "px");
            _my._nodes.ctrl_replay.setStyle('right', 10 + "px");
        }

        if (_my._values.title_use) {
            if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
                _my._nodes.video_title_text.setStyle('margin-right', '0px');
            } else {
                _my._nodes.video_title_text.setStyle('max-width', _my._values.movie_w + "px");

            }
        }
     };

    //--------------------------------------------------
    // 各データのロード(読込・設定)
    _my._load_values = function () {
        // 値読取
        var jmcPlayer = _my._values.jmcPlayer;
        // 時間表示とリプレイはデフォルトでON
        _my._values.time_use = true;
        _my._values.replay_use = true;

        if (jmcPlayer.flashVars.seak_use == 'on') _my._values.seek_use = true;
        if (jmcPlayer.flashVars.fullscreen_use == 'on') _my._values.fullscreen_use = true;
        if (jmcPlayer.flashVars.title_use == 'on') _my._values.title_use = true;
        if (jmcPlayer.flashVars.exlink_use == 'on') _my._values.exlink_use = true;
        if (jmcPlayer.flashVars.sns_use == 'on') _my._values.sns_use = true;
        if (jmcPlayer.flashVars.multibitrate_use == 'on') _my._values.multibitrate_use = true;
        if (jmcPlayer.flashVars.play_use == 'on') _my._values.play_use = true;
        if (jmcPlayer.flashVars.footer_use == 'on' && jmcPlayer.flashVars.responsive != "on" && jmcPlayer.flashVars.responsive != "fit") _my._values.footer_use = true;
        if (jmcPlayer.flashVars.ctrlbar_use == 'off' || jmcPlayer.flashVars.controlbar_use == 'off') {
            _my._values.ctrl_use = false;
            _my._values.play_use = false;
            _my._values.time_use = false;
            _my._values.seek_use = false;
            _my._values.fullscreen_use = false;
            _my._values.multibitrate_use = false;
        }
        if (jmcPlayer.flashVars.time_use == 'off') _my._values.time_use = false;
        if (jmcPlayer.flashVars.replay_use == 'off' || jmcPlayer.flashVars.replaybtn_use == 'off') _my._values.replay_use = false;
        if (jmcPlayer.flashVars.watermark_use == 'off') _my._values.watermark_use = false;
        if (jmcPlayer.flashVars.watermark_design == '2') _my._values.watermark_design = "2";
        if (jmcPlayer.flashVars.start_time) _my._values.start_time = jmcPlayer.flashVars.start_time;
        if (jmcPlayer.flashVars.duration) _my._values.duration = jmcPlayer.flashVars.duration;
        if (jmcPlayer.flashVars.auth == '1') {
            _my._values.movie_auth = true;
            if (typeof (jmcPlayer.flashVars.a) == "undefined" || jmcPlayer.flashVars.a.indexOf(':') == -1 || jmcPlayer.flashVars.a.split(":")[1].length < 1) {
                _my._values.auth_input = true;
                if (typeof (jmcPlayer.flashVars.a) != "undefined") {
                    if (jmcPlayer.flashVars.a.indexOf(":") != -1) {
                        jmcPlayer.flashVars.a = jmcPlayer.flashVars.a.split(":")[0];
                    }
                    _my._values.a_id =(jmcPlayer.flashVars.a);
                }
            }
        }
        if (jmcPlayer.flashVars.responsive != "off") _my._values.responsive = jmcPlayer.flashVars.responsive;

        // ライブモード確認
        if (jmcPlayer.flashVars.isLive == true) _my._values.isLive = true;

        // フッタデフォルト値設定
        _my._values.footerSize = 0;
        if (_my._values.footer_use) _my._values.footerSize = 20;

        // 画面表示制御
        _my._setPlayerStyle();

        // 初期フラグ別途保存
        _my._saveDefalutValues();

        // 動画名
        if (_my._values.title_use) {
            _my._values.movie_title = jmcPlayer.flashVars.title;
            if (!_my._values.movie_title) _my._values.movie_title = "";
        }

        // フッター
        if (_my._values.footer_use) {
            _my._values.movie_footer = jmcPlayer.flashVars.footer_text;
            _my._values.footer_align = jmcPlayer.flashVars.footer_align;
            if (!_my._values.movie_footer) _my._values.movie_footer = "";
        }

        // ビデオファイルパス
        _my._values.movie_filepath = jmcPlayer.flashVars.movie_url;

        // サムネイル画像
        _my._values.thumb_filePath = jmcPlayer.flashVars.thumbnail_url;
        if (!_my._values.thumb_filePath) _my._values.thumb_filePath = "";

        // 画質選択
        _my._values.movie_index = 0;
        _my._values.movie_list = jmcPlayer.flashVars.movie_list;
        if (_my._values.multibitrate_use) {
            //_my._values.movie_list = jmcPlayer.flashVars.movie_list;
            if (!_my._values.movie_list || (_my._values.movie_list.length <= 0)) {
                _my._values.multibitrate_use = false;
                _my._values.movie_list = [];
            } else {
                //デフォルト画質ラベル設定
                for (var i = 0; i < _my._values.movie_list.length; i++) {
                    if (_my._values.movie_filepath == _my._values.movie_list[i].url) {
                        _my._values.movie_index = i;
                        break;
                    }
                }
            }
        }

        // 外部リンク
        if (_my._values.exlink_use) {
            _my._values.outlink = jmcPlayer.flashVars.exlink;
            if (!_my._values.outlink || (_my._values.outlink.length <= 0)) {
                _my._values.exlink_use = false;
                _my._values.outlink = [];
            }
        }

        // 共有
        if (_my._values.sns_use) {
            _my._values.share = jmcPlayer.flashVars.sns_id_list;
            if (!_my._values.share || (_my._values.share.length <= 0)) {
                _my._values.sns_use = false;
                _my._values.share = [];
            }
        }

        _my._values.linkset = [];

        _my._values.vid = jmcPlayer.flashVars.contract_id + "-" + jmcPlayer.flashVars.meta_id + "-" + jmcPlayer.flashVars.file_id;
        _my._values.svcid = jmcPlayer.flashVars.contract_id;
        _my._values.mn = "c" + jmcPlayer.flashVars.contract_id + "m" + _my._values.vid;

        _my._values.parent_url = jmcPlayer.flashVars.parent_url;


        // 操作画面表示管理用
        _my._values.operation = [];
        _my._values.operation._view = true;			// コントローラの表示有無
        _my._values.operation._time = Date.now();	// 最終操作時間

        _my._values.progressTimer = null;			// 再生時フレーム処理用
        _my._values.load_currentTime = 0;

        _my._values.movie_status = '';

        // スケーリング設定
        _my._values.seek_scale = 1000;
        // 
        _my._values.play_start = false;
        _my._values.fullscreenTimer = null;

        //レジューム処理
        var resume_time = jstream_t3.utils.Util.GetCookie("EQPlayer_resume_CurrentTime_" + jmcPlayer.flashVars.meta_id + "_" + jmcPlayer.flashVars.contract_id);
        if (_my._values.start_time <= 0 && jmcPlayer.flashVars.resumeEnable == "on" && resume_time != null) _my._values.start_time = resume_time;

    };

    // 表示制御処理
    _my._setPlayerStyle = function () {
        var playerType = _my._values.jmcPlayer.accessor.getEnvironmentType();
        var style = _my._getPlayerStyle();
        var style_width = _my._getPlayerStyle("width");
        var style_height = _my._getPlayerStyle("height");

        if (_my._values.responsive != "on" && _my._values.responsive != "fit") {
            // 画面サイズ別制御
            if (style_width == _my.PS_MIDDLE) {
                _my._values.time_use = false;
            } else if (style_width == _my.PS_MINIMUM) {
                // 最小
                _my._values.play_use = false;
                _my._values.seek_use = false;
                _my._values.multibitrate_use = false;
            } else if(style_height == _my.PS_MINIMUM){
                _my._values.sns_use = false;
                _my._values.title_use = false;
                _my._values.time_use = false;
                _my._values.replay_use = false;
            }
        }

        if (playerType == jstream_t3.EnviromentKind.MOBILE_STREAMING) {
            // iOS
            if (navigator.userAgent.indexOf('iPhone') > 0) {
                // iPhone
                _my._values.is_iphone = true;
                _my._values.play_use = false;
                _my._values.time_use = false;
                _my._values.seek_use = false;
                _my._values.multibitrate_use = false;
                _my._values.fullscreen_use = false;
                _my._values.exlink_use = false;
                _my._values.sns_use = false;
                _my._values.replay_use = false;

                _my._values.ctrl_use = false;
            }
        } else
            if (playerType == jstream_t3.EnviromentKind.MOBILE_PROGRESSIVE) {
                // Android
                _my._values.is_android = true;

                var ua = navigator.userAgent.toLowerCase();
                if (ua.indexOf('chrome') > 0) {
                    // ローディング制御(android/Chromeのみ)
                    _my._values.loading_use = false;
                    _my._values.is_Chrome = true;
                }
                var version = ua.substr(ua.indexOf('android') + 8, 3);
                if (parseFloat(version) <= 4.0) {
                    // Android4.0.x以前
                    _my._values.is_android_40x = true;
                };
            }

        if (_my._values.header_use)
            _my._values.header_use = _my._values.title_use | _my._values.replay_use;

        //if (_my._values.ctrl_use)
            //_my._values.ctrl_use = _my._values.play_use | _my._values.time_use | _my._values.seek_use | _my._values.multibitrate_use | _my._values.fullscreen_use;
    }

    // 初期値保存
    _my._saveDefalutValues = function () {
        _my._defVals.title_use = _my._values.title_use;
        _my._defVals.replay_use = _my._values.replay_use;
        _my._defVals.exlink_use = _my._values.exlink_use;
        _my._defVals.sns_use = _my._values.sns_use;
        _my._defVals.play_use = _my._values.play_use;
        _my._defVals.time_use = _my._values.time_use;
        _my._defVals.seek_use = _my._values.seek_use;
        _my._defVals.multibitrate_use = _my._values.multibitrate_use;
        _my._defVals.fullscreen_use = _my._values.fullscreen_use;
        _my._defVals.footer_use = _my._values.footer_use;

        _my._defVals.header_use = _my._values.header_use;
        _my._defVals.ctrl_use = _my._values.ctrl_use;
        _my._defVals.loading_use = _my._values.loading_use;

        _my._defVals.movie_w = _my._values.movie_w;
        _my._defVals.movie_h = _my._values.movie_h;

    }

    //--------------------------------------------------
    // ノード情報の初期化
    _my._init_nodes = function () {
        // 再生時間設定
        if (_my._values.time_use) {
            _my._nodes.video_total_time = imba_t3.node.one('#' + _my.playerID + 'video_total_time');
            _my._nodes.video_total_time.setInner(_get_timeString(Math.floor(_my._values.duration)));
            _my._nodes.video_play_time = imba_t3.node.one('#' + _my.playerID + 'video_play_time');
        } else {
            _my._nodes.video_total_time = false;
            _my._nodes.video_play_time = false;
        }
        _my._nodes.video_main = imba_t3.node.one('#' + _my.playerID + 'video_main');

        // 画面ボタン
        _my._nodes.btn_operation = imba_t3.node.one('#' + _my.playerID + 'btn_operation');
        _my._nodes.btn_operation.on('click', function (e) { _my._click_button(40); });

        if (_my._values.header_use) {
            _my._nodes.header = imba_t3.node.one('#' + _my.playerID + 'header');
            _my._values.header_h = 30;
            if (!_my._values.title_use) {
                _my._nodes.header.setStyle('display', 'none');
            }
        } else {
            _my._nodes.header = false;
        }

        // リプレイ
        if (_my._values.replay_use) {
            _my._nodes.ctrl_replay = imba_t3.node.one('#' + _my.playerID + 'ctrl_replay');
            _my._nodes.ctrl_replay.on('click', function (e) { _my._click_button(15); });
        } else {
            _my._nodes.ctrl_replay = false;
        }

        if (_my._values.ctrl_use) {
            // コントローラ関連
            _my._nodes.ctrl_cover = imba_t3.node.one('#' + _my.playerID + 'ctrl_cover');
            _my._nodes.ctrl_cover.setStyle('display', 'none');
            _my._nodes.ctrl_cover.on('click', function (e) { _my._click_button(33); });

            // 再生ボタン
            if (_my._values.play_use) {
                _my._nodes.ctrl_play = imba_t3.node.one('#' + _my.playerID + 'ctrl_play');
                _my._nodes.ctrl_play.on('click', function (e) { _my._click_button(11); });
            } else {
                _my._nodes.ctrl_play = false;
            }

            // 画質切替
            if (_my._values.multibitrate_use) {
                _my._nodes.ctrl_select_now = imba_t3.node.one('#' + _my.playerID + 'ctrl_select_now');
            } else {
                _my._nodes.ctrl_select_now = false;
            }
            // フルスクリーン
            if (_my._values.fullscreen_use) {
                _my._nodes.ctrl_full = imba_t3.node.one('#' + _my.playerID + 'ctrl_full');
                _my._nodes.ctrl_full.on('click', function (e) {
                    _my._click_button(13);
                });
            }
            // ビデオコントローラ設定
            if (_my._values.ctrl_use) {
                _my._nodes.ctrl = imba_t3.node.one('#' + _my.playerID + 'ctrl');
            } else {
                _my._nodes.ctrl = false;
            }

            if (_my._values.seek_use) {
                _my._nodes.ctrl_video_seek_slider = imba_t3.node.one('#' + _my.playerID + 'ctrl_video_seek_slider');
                _my._nodes.ctrl_video_seek_cover = imba_t3.node.one('#' + _my.playerID + 'ctrl_video_seek_cover');
            }
        }
        // 認証ウィンドウ用
        _my._nodes.movie_auth = imba_t3.node.one('#' + _my.playerID + 'login');
        // ナビウィンドウコントロール用
        _my._nodes.info = imba_t3.node.one('#' + _my.playerID + 'info');
        _my._nodes.info_icon = imba_t3.node.one('#' + _my.playerID + 'info_icon');
        _my._nodes.info_title = imba_t3.node.one('#' + _my.playerID + 'info_title');

        var info_close = imba_t3.node.one('#' + _my.playerID + 'info_close');
        info_close.on('click', function () { _my._click_button(33); });

        if (_my._values.exlink_use || _my._values.sns_use) {
            _my._nodes.navi = imba_t3.node.one('#' + _my.playerID + 'navi');
            _my._values.info = false;

            if (_my._values.exlink_use) {
                _my._nodes.info_outlink = imba_t3.node.one('#' + _my.playerID + 'info_outlink');
                _my._nodes.navi_outlink = imba_t3.node.one('#' + _my.playerID + 'navi_outlink');
                _my._nodes.navi_outlink.on('click', function (e) { _my._click_button(31); });
            } else {
                _my._nodes.info_outlink = false;
            }

            if (_my._values.sns_use) {
                _my._nodes.info_share = imba_t3.node.one('#' + _my.playerID + 'info_share');
                _my._nodes.navi_share = imba_t3.node.one('#' + _my.playerID + 'navi_share');
                _my._nodes.navi_share.on('click', function () { _my._click_button(32); });
            } else {
                _my._nodes.info_share = false;
            }
        } else {
            _my._nodes.navi = false;
            _my._nodes.info_outlink = false;
            _my._nodes.info_share = false;
        }

    };

    // ビデオ初期化
    _my._init_video = function () {

        _my._nodes.video = imba_t3.node.one('#' + _my.videoID);
        _my._nodes.video.setStyle('opacity', 0);

        _my._nodes.video.on('loadstart', function (e) { _my._set_movie_status('loadstart'); });
        _my._nodes.video.on('progress', function (e) { _my._set_movie_status('progress'); });
        _my._nodes.video.on('loadeddata', function (e) {
            _my._set_movie_status('loadeddata');
            if (_my._values.first_play == true) {
                
            }
        });
        _my._nodes.video.on('canplay', function (e) { _my._set_movie_status('canplay'); });
        _my._nodes.video.on('loadend', function (e) { _my._set_movie_status('loadend'); });
        _my._nodes.video.on('abort', function (e) { _my._set_movie_status('abort'); });
        _my._nodes.video.on('seeking', function (e) { _my._set_movie_status('seeking'); });

        _my._nodes.video.on('loadedmetadata', function (e) {
            //ユーザーエージェントがメディアリソースの長さと寸法を判定した
            _my._set_movie_status('loadedmetadata');
            //初回のみ初期化(イベント多重登録になるため)
            if (!document.getElementById(_my.playerID + "slider-movie-h_rail")) _my._init_video_seek();
            
            _my._ready();
        });
        _my._nodes.video.on('canplaythrough', function (e) {
            //ユーザーエージェントは、今すぐに再生を開始しても、
            //コンテンツのさらなるバッファリングのために停止することなく
            //メディアリソースを現在の再生速度で最後までレンダリングできると予測している
            _my._set_movie_status('canplaythrough');

        });
        _my._nodes.video.on('suspend', function (e) {
            //ユーザーエージェントが意図的にメディアデータのフェッチを現在行っていないが、
            //メディアリソース全体のダウンロードが済んでいるわけでもない
            //画面を消した場合も発生
            _my._set_movie_status('suspend');
            //									_my._stalled();
        });
        _my._nodes.video.on('error', function (e) {
            //メディアデータのフェッチ実行中にエラーが発生
            _my._set_movie_status('error');
            _my._set_info_error();
        });
        _my._nodes.video.on('playing', function (e) {
            //再生が開始された
            // stalledから復帰のplay実行時には発火しないので注意
            _my._set_movie_status('playing');
            _my._play();
        });
        _my._nodes.video.on('waiting', function (e) {
            //次のフレームが利用不可のため再生を停止したが、
            //ユーザーエージェントはそのフレームがやがて利用可能になると想定している
            _my._set_movie_status('waiting');

        });
        _my._nodes.video.on('seeked', function (e) {
            //IDL属性のseekingがfalseに変化した
            _my._set_movie_status('seeked');
            //									if( _my._values.is_play ) _my._set_play_state('loading');
            _my._seeked();
        });
        _my._nodes.video.on('ended', function (e) {
            //メディアリソースの終端に達したので再生が停止した
            _my._set_movie_status('ended');
            _my._end();
        });
        _my._nodes.video.on('durationchange', function (e) {
            //duration属性が更新された
            _my._set_movie_status('durationchange');
            _my._set_duration();

        });
        _my._nodes.video.on('timeupdate', function (e) {
            //現在の再生位置の変化が、通常の再生に伴って、
            //あるいは特に興味深い形(不連続的な変化など)で起こった
            _my._set_movie_status('timeupdate');
        });
        _my._nodes.video.on('play', function (e) {
            //再生が開始された。play()メソッドからの復帰後に発生する
            _my._set_movie_status('play');
        });
        _my._nodes.video.on('pause', function (e) {
            //再生が一時停止された。pauseメソッドからの復帰後に発生する
            _my._set_movie_status('pause');
            _my._pause();

            _my._log("■pause");
        });
        _my._nodes.video.on('stalled', function (e) {
            //ユーザーエージェントがメディアデータのフェッチを試みたが、
            //データがまだ用意されていない
            // 他ビデオ再生時にも発生
            _my._set_movie_status('stalled');
            //									_my._stalled();video_main

        });
    };

    // 読み込んだ情報を反映
    _my._init_video_state = function () {
        _my._values.duration = 0;
        _my._values.currentTime = 0;
        _my._values.stalledTime = 0;

        // サムネイル設定
        _my._set_video_thumb(_my._values.thumb_filePath);

        // タイトル設定(ヘッダ設定)
        _my._set_video_title();

        // ビデオ表示設定
        _my._values.video_w = _my._values.movie_w;
        _my._values.video_h = _my._values.movie_h;
        _my._values.video_x = 0;
        _my._values.video_y = 0;
        //set_nodeStyleBox(node,top,left,width,height)だが内部でtopとleftが逆になっている
        //set_nodeStyleBox(node,left,top,width,height)として扱う
        //meka.set_nodeStyleBox(_my._nodes.video, _my._values.movie_w - 1, _my._values.movie_h - 1, 1, 1);
        _my._nodes.video.setStyle("bottom", "0px");
        _my._nodes.video.setStyle("right", "0px");
        _my._nodes.video.setStyle("width", "1px");
        _my._nodes.video.setStyle("height", "1px");
        _my._nodes.video.setStyle("z-index", "1");

        // VA関連設定
        var elem = document.getElementById(_my.videoID);
        elem.setAttribute("vid", _my._values.vid);
        elem.setAttribute("svcid", _my._values.svcid);
        elem.setAttribute("mn", _my._values.mn);

        var video = _my._nodes.video.DOMNode();
        if (!video) return;

        video.poster = _my._values.thumb_filePath;
        //iOS系でなく、認証を利用しない場合は動画のソースを先にロードしておく
        if (!(_my._values.jmcPlayer.accessor.model.getEnvironmentType() == "mobileStreaming" && _my._values.movie_auth && !_my._values.authed && _my._values.jmcPlayer.accessor.model.isAuthEnable())) {
            //video.src = _my._values.movie_filepath;
            //video.load();
            //video.pause();	// 念の為
        }
        //サムネイル領域
        if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
            _my._nodes.btn_operation.setStyle("left", "0px");
            _my._nodes.btn_operation.setStyle("top", "0px");
            _my._nodes.btn_operation.setStyle("width", "100%");
            _my._nodes.btn_operation.setStyle("height", "100%");
        } else {
            meka.set_nodeStyleBox(_my._nodes.btn_operation, 0, 0, _my._values.movie_w, _my._values.movie_h - _my._values.footerSize);
        }
        if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
            _my._nodes.video_main.setStyle("width", _my._values.width);
            _my._nodes.video_main.setStyle("height", _my._values.height);
            _my._nodes.video_main.setStyle("position", "absolute");
        } else {
            meka.set_nodeStyleSize(_my._nodes.video_main, _my._values.movie_w, _my._values.movie_h - _my._values.footerSize);
        }
        

        // フッター設定
        if (_my._values.movie_footer && (_my._values.movie_footer.length > 0) && (_my._values.responsive != "on" && _my._values.responsive != "fit")) {
            var footer_text = imba_t3.node.one('#' + _my.playerID + 'footer_text');
            footer_text.setInner(_my._values.movie_footer);
            footer_text.setStyle("text-align", _my._values.footer_align);
            footer_text.setStyle("max-width", _my._values.movie_w + "px");
        }

        if (_my._values.multibitrate_use) _my._init_movie_select();

        // コントローラは画面下部へ(フッターの上):SI/SO用に位置保存[30:ctrl_h]
        if (_my._values.ctrl_use) {
            if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
                _my._nodes.ctrl.setStyle("left", "0px");
                _my._nodes.ctrl.setStyle("width", "100%");
                _my._nodes.ctrl.setStyle("bottom", "0px");
            } else {
                meka.set_nodeStyleBox(_my._nodes.ctrl, 0, _my._values.movie_h - _my._values.footerSize - 30, _my._values.movie_w, 32);
            }
        }
        _my._values.ctrl_y = _my._values.movie_h - _my._values.footerSize - 30;

        //----------------------------------
        // 各情報ウィンドウサイズ[h=H30/F20]
        _my._values.info_w = Math.max(_my._values.movie_w * 0.8, 150);
        _my._values.info_h = Math.max((_my._values.movie_h - _my._values.footerSize - 50) * 0.8, 136 - 30)
        var info_x = (_my._values.movie_w - _my._values.info_w) / 2;
        var info_y = (_my._values.movie_h - _my._values.footerSize - _my._values.info_h) / 2;

        // outlink流し込み
        var i;
        if (_my._values.exlink_use && _my._values.outlink) {
            for (i = 0; i < _my._values.outlink.length; i++)
                if (_my._values.outlink[i]) _my._set_outlink((i + 1), _my._values.outlink[i].text, _my._values.outlink[i].url);
        }
        //認証
        if (_my._values.movie_auth) {
            _my._set_auth();
            var auth_h = _my._get_css_suffix() == _my.PS_MINIMUM ? _my._values.movie_h : _my._values.info_h;
            var auth_y = _my._get_css_suffix() == _my.PS_MINIMUM ? 0 : info_y;
            var login = imba_t3.node.one('#' + _my.playerID + 'login');
            var login_main = imba_t3.node.one('#' + _my.playerID + 'login_main');
            if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
                meka.set_nodeStyleBox(login, info_x, info_y, _my._values.info_w, _my._values.info_h);
                login.setStyle("width", "80%");
                login.setStyle("height", "65%");
                login.setStyle("left", "10%");
                login.setStyle("top", "14%");
                // infoウィンドウ-ヘッダサイズ:30px
                meka.set_nodeStyleSize(login_main, _my._values.info_w, _my._values.info_h - 30);
                login_main.setStyle("width", "100%");
                login_main.setStyle("height", "100%");
                login_main.setStyle("margin", "14% 0 0 0");
                login_main.setStyle("display", "block");
            } else {
                meka.set_nodeStyleBox(login, info_x, auth_y, _my._values.info_w, auth_h);
                meka.set_nodeStyleBox(login_main, info_x, auth_y, _my._values.info_w, auth_h - 30);
            }
        }

        //if(_my._values.info_w>=320){
        //    var right=(_my._values.info_w-320)/2+25;
        //    var login_input = imba.node.one('#' + _my.playerID + 'loginform');
        //    login_input.setStyle("right", right);
        //}

        // シェア流し込み
        if (_my._values.sns_use) _my._set_share();

        var info = imba_t3.node.one('#' + _my.playerID + 'info');
        var info_main = imba_t3.node.one('#' + _my.playerID + 'info_main');
        if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
            meka.set_nodeStyleBox(info, info_x, info_y, _my._values.info_w, _my._values.info_h);
            info.setStyle("width", "80%");
            info.setStyle("height", "65%");
            info.setStyle("left", "10%");
            info.setStyle("top", "14%");
            // infoウィンドウ-ヘッダサイズ:30px
            meka.set_nodeStyleSize(info_main, _my._values.info_w, _my._values.info_h - 30);
            info_main.setStyle("width", "100%");
            info_main.setStyle("height", "100%");
            //info_main.setStyle("margin", "18% 0 0 0");
            info_main.setStyle("display", "block");
        } else {
            meka.set_nodeStyleBox(info, info_x, info_y, _my._values.info_w, _my._values.info_h);
            // infoウィンドウ-ヘッダサイズ:30px
            meka.set_nodeStyleSize(info_main, _my._values.info_w, _my._values.info_h - 30);
        }
        

        _my._init_status_icon();
        _my._init_ctrl_video_seek();

        _my._nodes.video_main.setStyle('display', 'block');
    };

    // ボタンイベント。
    _my._click_button = function (index) {
        if (_my._values.animation) return;
        if (_my._values.movie_status == 'error') return;

        if (((index != 31) && (index != 32) && (index != 33) && (index != 15)) && _my._values.info) return;

        if (_my._values.fullscreenTimer) {
            _my._values.fullscreen = false;
            _my._update_fullscreen();
        }
        _my._log("[click idx]" + index);
        switch (index) {
            case 11:	// play/pause/stop
                _my._video_change_ctrl();
                break;

            case 13:	// full
                //認証ありで認証通過前のフルスクリーン操作は再生と同じ
                if (_my._values.movie_auth && !_my._values.authed && _my._values.jmcPlayer.accessor.model.isAuthEnable()) {
                    if (_my._values.auth_input) {
                        _my._set_login_visibled(true);
                    } else {
                        _my._values.jmcPlayer.accessor.login(null, null);
                    }
                    return;
                }
                _my._fullscreen();
                break;

            case 15:	// replay
                _my._replay();
                break;

            case 31:	// outlink
                if (!_my._values.info) {
                    _my._values.info_type = 31;
                    _my._set_info_outlink();
                    _my._set_info_visibled(true);
                } else {
                    if (_my._values.info_type == 31) {
                        _my._set_info_visibled(false);
                    } else {
                        _my._values.info_type = 31;
                        _my._set_info_outlink();
                    }
                }
                break;
            case 32:	// share
                if (!_my._values.info) {
                    _my._values.info_type = 32;
                    _my._set_info_share();
                    _my._set_info_visibled(true);
                } else {
                    if (_my._values.info_type == 32) {
                        _my._set_info_visibled(false);
                    } else {
                        _my._values.info_type = 32;
                        _my._set_info_share();
                    }
                }
                break;
            case 33:// infoウィンドウ閉じる
                _my._set_info_visibled(false);
                break;

            case 40:	// 画面全体
                // コントローラ・タイトルを表示
                if (_my._values.info) return;

                if (!_my._values.operation._view) _my._set_navi_visibled(true);
                else _my._video_change_ctrl();

                break;
        }

        _my._setOperationTime();

    };

    // フルスクリーン処理
    _my._fullscreen = function () {
        var video = _my._nodes.video.DOMNode();
        if (!video) return;
        
        if (_my._values.fullscreenTimer) {
            _my._values.fullscreen = false;
            _my._update_fullscreen();
        }

        _my._values.fullscreen = true;

        if (!_my._values.loadedmetadata) {
            video.load();
            return;
        }

        if (video.requestFullScreen != null) { video.requestFullScreen(); }
        else if (video.mozRequestFullScreen != null) { video.mozRequestFullScreen(); }
        else if (video.webkitRequestFullScreen != null) { video.webkitRequestFullScreen(); }
        else if (video.webkitEnterFullScreen != null) {
            video.webkitEnterFullScreen();
            _my._values.fullscreen = false;
        }

        _my._values.fullscreenTimer = setInterval(_my._update_fullscreen, 1000 / 10);
    }

    _my._update_fullscreen = function (isVisible) {
        _my._update_time();

        var video = _my._nodes.video.DOMNode();
        if (!video) return;

        if (!_my._values.fullscreen) {
            clearInterval(_my._values.fullscreenTimer);
            _my._values.fullscreenTimer = null;
        }
    }

    // ナビ(ヘッダ+コントローラ)アニメーション処理(スライドイン・スライドアウト)
    _my._set_navi_visibled = function (isVisible) {
        if (_my._values.operation._view == isVisible) return;
        clearTimeout(_my._values.navitimer);

        var ani_ms = 500;

        if (isVisible) {
            // スライドイン
            _my._values.animation = true;
            if (_my._values.header_use ) {
                _my._nodes.header.setStyle('-webkit-animation-duration', ani_ms + 'ms');
                _my._nodes.header.setStyle('-webkit-animation-name', 'h5p_header-slide_in');
                _my._nodes.header.setStyle('opacity', '1');
                //			_my._nodes.header.setStyle('display','table');
            }

            if (_my._values.ctrl_use) {
                _my._nodes.ctrl.setStyle('-webkit-animation-duration', ani_ms + 'ms');
                _my._nodes.ctrl.setStyle('-webkit-animation-name', 'h5p_ctrl-slide_in');
                _my._nodes.ctrl.setStyle('opacity', '1');
                //			_my._nodes.ctrl.setStyle  ('display','block');
            }

            if (_my._nodes.navi) {
                _my._nodes.navi.setStyle('-webkit-animation-duration', ani_ms + 'ms');
                _my._nodes.navi.setStyle('-webkit-animation-name', 'h5p_fade_in');
                _my._nodes.navi.setStyle('opacity', '1');
                //			_my._nodes.navi.setStyle  ('display','block');
            }

            _my._set_videoseek_slider();
            _my._values.navitimer = setTimeout(_my._set_navi_visibled_in, ani_ms);


        } else {
            // スライドアウト
            if ((_my._values.duration - _my._values.currentTime) <= 1) {
                // 現在の再生位置が残り1秒未満なら処理しない
            } else {
                _my._values.animation = true;
                _my._set_ctrl_select_list_visibled(false);

                if (_my._values.header_use) {
                    _my._nodes.header.setStyle('-webkit-animation-duration', ani_ms + 'ms');
                    _my._nodes.header.setStyle('-webkit-animation-name', 'h5p_header-slide_out');
                }

                if (_my._values.ctrl_use) {
                    _my._nodes.ctrl.setStyle('-webkit-animation-duration', ani_ms + 'ms');
                    _my._nodes.ctrl.setStyle('-webkit-animation-name', 'h5p_ctrl-slide_out');
                }

                if (_my._nodes.navi) {
                    _my._nodes.navi.setStyle('-webkit-animation-duration', ani_ms + 'ms');
                    _my._nodes.navi.setStyle('-webkit-animation-name', 'h5p_fade_out');
                }

                _my._values.navitimer = setTimeout(_my._set_navi_visibled_out, ani_ms);
            }

        }
    };

    // スライドイン完了
    _my._set_navi_visibled_in = function () {
        _my._values.animation = false;
        _my._values.operation._view = true;
        _my._values.navitimer = 0;
        _my._setOperationTime();
    };

    // スライドアウト完了
    _my._set_navi_visibled_out = function () {
        //	if(_my._values.header_use) _my._nodes.header.setStyle('display','none'); 
        //	if(_my._values.ctrl_use  ) _my._nodes.ctrl.setStyle  ('display','none'); 
        //	if(_my._nodes.navi       ) _my._nodes.navi.setStyle  ('display','none');
        if (_my._values.header_use) _my._nodes.header.setStyle('opacity', '0');
        if (_my._values.ctrl_use) _my._nodes.ctrl.setStyle('opacity', '0');
        if (_my._nodes.navi) _my._nodes.navi.setStyle('opacity', '0');

        _my._values.animation = false;
        _my._values.operation._view = false;
        _my._values.navitimer = 0;
    };

    // 画質変更
    _my._click_movie_select = function (index) {
        //console.log("/////startmovieselect/////")
        if (_my._values.movie_status == 'error') return;
        // 選択項目切替
        var i;
        if (_my._values.multibitrate_use) {
            for (i = 0; i < _my._values.movie_list.length; i++) {
                var list = imba_t3.node.one('#' + _my.playerID + 'ctrl_select_list_' + i);
                if (i == index) list.set('className', 'ctrl_select_selected');
                else list.set('className', 'ctrl_select_default');
            }
        }
        

         if (_my._values.progressTimer) {
                clearInterval(_my._values.progressTimer);

                _my._values.progressTimer = null;
                _my._values.is_play = true;	// 「再生」状態保持
            } else {
                _my._values.is_play = false;
            }

            // 再生位置設定
            var video = _my._nodes.video.DOMNode();
            if (!video) return;
            if (_my._values.multibitrate_use) {
                var val = _my._get_movie_list_val(_my._values.movie_list[index].text);
                _my._nodes.ctrl_select_now.setInner(_my._set_movie_list_text(val));
                //_my._nodes.ctrl_select_now.setInner(_my._values.movie_list[index].text);
            }
            if (_my._values.first_play == false) {
                if ((_my._values.movie_status == "ended") || (_my._values.currentTime >= _my._values.duration)) {
                    _my._values.is_play = false;
                    _my.setCurrentTime(0);
                    _my._values.currentTime = 0;
                    _my._values.load_currentTime = 0;
                } else {
                    if (_my._values.isLive) {
                        // Liveモード中は何もしない
                        _my._values.load_currentTime = 0;
                        _my._values.currentTime = 0;
                        video.currentTime = 0;
                        _my.videoseek_update_callback(0);
                    } else {
                        // 最後まで再生されていない
                        if (_my._values.load_currentTime <= 0)
                            _my._values.load_currentTime = video.currentTime;
                    }
                }
            }

            _my._values.movie_filepath = _my._values.movie_list[index].url;
            video.src = _my._values.movie_list[index].url;
            var loadeddata = function (e) {
                //console.log("loadeddata:"+ "@click_movie_select");
                _my._set_movie_status('loadeddata');
                video.removeEventListener("loadeddata", loadeddata);
                
                if (/iP(hone|od|ad)/.test(navigator.platform)) {
                    video.addEventListener("timeupdate", timeupdate);
                    video.currentTime = _my._values.load_currentTime;
                } else {
                    video.currentTime = _my._values.load_currentTime;
                    if (_my._values.is_play) {
                        _my.play();
                        //console.log("play:" + "@click_movie_select");
                    }
                }
                
                
            }
            var timeupdate = function (e) {
                //console.log(Math.floor(video.currentTime)+ "<=" + Math.floor(_my._values.load_currentTime)+ "@click_movie_select");
                if (Math.ceil(video.currentTime) >= Math.ceil(_my._values.load_currentTime)) {
                    video.removeEventListener("timeupdate", timeupdate);
                    //console.log("timeupdate:" + "@click_movie_select");
                    if (_my._values.is_play) {
                        _my.play();
                        //console.log("play:" + "@click_movie_select");
                    }
                }
            }
            
        
        video.addEventListener("loadeddata", loadeddata);
        video.load();
        _my._set_ctrl_select_list_visibled(false);

        _my._set_videoseek_slider();
        if (_my._values.is_play) {
            //console.log("load:"+"@click_movie_select");
            _my._set_play_state('loading');
        }
    };


    // 画質選択ウィンドウ表示切替
    _my._set_ctrl_select_list_visibled = function (isVisible) {
        if (!_my._values.ctrl_use ||!_my._values.multibitrate_use) return;
        if (_my._values.movie_status == 'error') return;
        if (_my._values.info) return;

        if (isVisible) _my._nodes.ctrl_select_list.setStyle('display', 'block');
        else _my._nodes.ctrl_select_list.setStyle('display', 'none');

        _my._values.isSelected = isVisible;
        _my._setOperationTime();
    };

    // 関連ページウィンドウ設定
    _my._set_info_outlink = function () {
        _my._set_ctrl_select_list_visibled(false);

        _my._nodes.info_icon.set('className', 'info_icon_outlink info_icon' + _my._get_css_suffix());
        _my._nodes.info_title.setInner(_my._languageResource.kinds.LINKS);
        _my._nodes.navi_outlink.set('className', 'navi_outlink_selected');
        _my._nodes.info_outlink.setStyle('display', 'table');
        if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
            _my._nodes.info_outlink.setStyle("position", "absolute");
            _my._nodes.info_outlink.setStyle("top", "0px");
            _my._nodes.info_outlink.setStyle("left", "0px");
            _my._nodes.info_outlink.setStyle("right", "0px");
            _my._nodes.info_outlink.setStyle("bottom", "0px");
            _my._nodes.info_outlink.setStyle("width", "100%");
        }

        if (_my._values.sns_use) {
            _my._nodes.info_share.setStyle('display', 'none');
            _my._nodes.navi_share.set('className', 'navi_share' + _my._get_css_suffix("height"));
        }
    }

    // 共有ウィンドウ設定
    _my._set_info_share = function () {
        _my._set_ctrl_select_list_visibled(false);

        _my._nodes.info_icon.set('className', 'info_icon_share info_icon' + _my._get_css_suffix());
        _my._nodes.info_title.setInner(_my._languageResource.kinds.SHARE_MOVIE);

        _my._nodes.navi_share.set('className', 'navi_share_selected' + _my._get_css_suffix("height"));
        _my._nodes.info_share.setStyle('display', 'table');
        if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
            _my._nodes.info_share.setStyle("position", "absolute");
            _my._nodes.info_share.setStyle("top", "0px");
            _my._nodes.info_share.setStyle("left", "0px");
            _my._nodes.info_share.setStyle("right", "0px");
            _my._nodes.info_share.setStyle("bottom", "0px");
            _my._nodes.info_share.setStyle("width", "100%");
        }
        if (_my._values.exlink_use) {
            _my._nodes.info_outlink.setStyle('display', 'none');
            _my._nodes.navi_outlink.set('className', 'navi_outlink');
        }
    }



    // エラー表示設定
    _my._set_info_error = function () {
        _my._nodes.info_icon.set('className', 'info_icon_alert info_icon' + _my._get_css_suffix());
        _my._nodes.info_title.setInner(_my._languageResource.kinds.ERROR_TITLE);

        if (!_my.info_main) _my.info_main = imba_t3.node.one('#' + _my.playerID + 'info_main');

        if (_my._values.isLive)
            _my.info_main.setInner(_my._languageResource.kinds.ERROR_LIVE_RELOAD);
        else
            _my.info_main.setInner(_my._languageResource.kinds.ERROR_MOVIE_NOT_FOUND);

        _my.info_main.setStyle('margin', '5px');

        if (_my._nodes.navi) _my._nodes.navi.setStyle('display', 'none');

        if (_my._values.progressTimer) _my._pause();

        _my._set_info_visibled(true);
        _my._values.is_play = false;
    }

    // ステータスアイコン(画面中央大アイコン)表示処理
    _my._set_play_state = function (state) {
        if (_my._values.play_status == state) return;
        _my._values.play_status = state;
        if (_my._values.watermark_use == false) return;
        _my._nodes.play_state_wait.setStyle('display', 'none');
        _my._nodes.play_state_play.setStyle('display', 'none');
        _my._nodes.play_state_pause.setStyle('display', 'none');

        if (_my._values.loading_use) _my._nodes.play_state_loading.setStyle('display', 'none');
        //if (!window.eqplayerlog) {
        //    window.eqplayerlog = new Array();
        //    window.eqplayerobj = new Array();
        //    window.eqplayerobj["wait"] = _my._nodes.play_state_wait;
        //    window.eqplayerobj["play"] = _my._nodes.play_state_play;
        //}
        switch (state) {
            case 'loading':
                if (_my._values.loading_use) {
                    _my._nodes.play_state_loading.setStyle('display', 'block');
                    _my._nodes.play_state_loading.setStyle('opacity', '1');
                    //window.eqplayerlog["status_icon"] = "loading";
                }
                break;
            case 'play':
                _my._nodes.play_state_play.setStyle('display', 'block');
                _my._nodes.play_state_play.setStyle('-webkit-animation-name', 'h5p_play_state-out');
                //window.eqplayerlog["status_icon"] = "play";
                //window.eqplayerlog["status_icon_wait_visible"] = _my._nodes.play_state_wait.getStyle("display");
                //window.eqplayerlog["status_icon_play_visible"] = _my._nodes.play_state_play.getStyle("display");
                break;
            case 'pause':
                _my._nodes.play_state_pause.setStyle('display', 'block');
                _my._nodes.play_state_pause.setStyle('-webkit-animation-name', 'h5p_play_state-out');
                //window.eqplayerlog["status_icon"] = "pause";
                break;
            case 'wait':
                _my._nodes.play_state_wait.setStyle('display', 'block');
                //window.eqplayerlog["status_icon"] = "wait";
                //window.eqplayerlog["status_icon_wait_visible"] = _my._nodes.play_state_wait.getStyle("display");
                //window.eqplayerlog["status_icon_play_visible"] = _my._nodes.play_state_play.getStyle("display");
                break;
        }
    }

    // 操作経過時間管理用。
    _my._setOperationTime = function () {
        _my._values.operation._time = Date.now();	// 最終操作時間
    };

    // オペレーション画面表示切替処理
    // 最終操作から5秒経過:FO&SO
    _my._set_operation = function () {
        _my._values.operation._time = 0;

        // オペレーション画面非表示中は処理を行わない。
        if (!_my._values.operation._view) return;

        var video = _my._nodes.video.DOMNode();
        if (!video) return;
        if (video.paused || video.ended) return;

        // タイトル・コントローラをOFFに
        _my._set_navi_visibled(false);
    };

    // 再生・停止処理
    _my._video_change_ctrl = function () {
        var video = _my._nodes.video.DOMNode();
        if (!video) return;

        _my._values.fullscreen = false;

        if (video.ended) {
            _my._replay();
            return;
        }

        if (!_my._values.progressTimer) {
            if (_my._values.movie_auth && !_my._values.authed && _my._values.jmcPlayer.accessor.model.isAuthEnable()) {
                if (_my._values.auth_input) {
                    _my._set_login_visibled(true);
                } else {
                    _my._values.jmcPlayer.accessor.login(null, null);
                }

            } else {
				
                _my.play();
                _my._set_play_state('loading');

                // stalledからの復帰:playイベント未発火対策
                if (_my._values.movie_status == 'stalled') {
                    _my._play();
                }
                // 再生開始時間保存
                //		_my._values.play_start = Date.now();
                _my._values.play_start = true;
            }
        }
        else {
            _my.pause();
        }
    };

    // 画質選択初期化
    _my._init_movie_select = function () {
        if (!_my._defVals.multibitrate_use) return;

        var mcNode = imba_t3.node.one('#' + _my.playerID + 'ctrl_select');
        if (!_my._values.multibitrate_use) {
            // 表示オフ
            mcNode.setStyle('display', 'none');
            return;
        }

        if (!_my._nodes.ctrl_select_now) return;

        mcNode.setStyle('display', 'table');

        _my._nodes.ctrl_select_list = imba_t3.node.one('#' + _my.playerID + 'ctrl_select_list');
        _my._nodes.ctrl_select_list.setStyle('display', 'none');

        var msnode;
        var i;
        for (i = 0; i < _my._values.movie_list.length; i++) {
            msnode = imba_t3.node.one('#' + _my.playerID + 'ctrl_select_list_' + i);
            var val = _my._get_movie_list_val(_my._values.movie_list[i].text);
            msnode.setInner(_my._set_movie_list_text(val));
            //msnode.setInner(_my._values.movie_list[i].text);
            msnode.setStyle("display", "block");
        }

        // 不要分の表示オフ
        for (; i < 4; i++) {
            msnode = imba_t3.node.one('#' + _my.playerID + 'ctrl_select_list_' + i);
            msnode.setInner(i);
            msnode.setStyle("display", "none");
        }

        // 現在選択中の画質表示用
        _my._values.movie_list = _my._values.jmcPlayer.flashVars.movie_list;
        var val = _my._get_movie_list_val(_my._values.movie_list[_my._values.movie_index].text);
        _my._nodes.ctrl_select_now.setInner(_my._set_movie_list_text(val));
        //_my._nodes.ctrl_select_now.setInner(_my._values.movie_list[_my._values.movie_index].text);
        _my._nodes.ctrl_select_now.on('click', function () { _my._set_ctrl_select_list_visibled(!_my._values.isSelected); });
        _my._nodes.ctrl_select_now.setData('index', _my._values.movie_index);

        for (i = 0; i < _my._values.movie_list.length; i++) {
            var list = imba_t3.node.one('#' + _my.playerID + 'ctrl_select_list_' + i);

            var dom = list.DOMNode();
            dom.onclick = (function (i) { return function () { _my._click_movie_select(i) } })(i);
            if (i == _my._values.movie_index)
                list.set('className', 'ctrl_select_selected');
            else
                list.set('className', 'ctrl_select_default');
        }

        _my._values.isSelected = false;

    };

    _my._set_movie_list_text = function (index) {
        var text = "";
        switch (index) {
            case 0:
                text = _my._languageResource.kinds.Label_Auto;
                break;
            case 1:
                text = _my._languageResource.kinds.Label_Low;
                break;
            case 2:
                text = _my._languageResource.kinds.Label_Standard;
                break;
            case 3:
                text = _my._languageResource.kinds.Label_High;
                break;
            case 4:
                text = _my._languageResource.kinds.Label_HD;
                break;
            case 5:
                text = _my._languageResource.kinds.Label_FullHD;
                break;
            case 6:
                text = _my._languageResource.kinds.Label_4K;
                break;
            default:
                break;
        }
        return text;
    }
    _my._get_movie_list_val = function (text) {
        var val = 0;
        switch (text) {
            case ("自動"):
            case ("AUTO"):
            case (_my._languageResource.kinds.Label_Auto):
                val = 0;
                break;
            case ("低画質"):
            case ("Low"):
            case(_my._languageResource.kinds.Label_Low):
                val = 1;
                break;
            case ("標準画質"):
            case ("Standard"):
            case(_my._languageResource.kinds.Label_Standard):
                val = 2;
                break;
            case ("高画質"):
            case ("High"):
            case (_my._languageResource.kinds.Label_High):
                val = 3;
                break;
            case ("HD画質"):
            case ("HD"):
            case (_my._languageResource.kinds.Label_HD):
                val = 4;
                break;
            case ("フルHD画質"):
            case ("FullHD"):
            case (_my._languageResource.kinds.Label_FullHD):
                val = 5;
                break;
            case ("4K画質"):
            case ("4K"):
            case (_my._languageResource.kinds.Label_4K):
                val = 6;
                break;
            default:
                break;
        }
        return val;
    }
    
    _my._convert_movie_url_to_movie_val = function (url,list) {
        var val = 0;
        for (var i = 0; i < list.length; i++) {
            if (list[i].url == url) {
                val = _my._get_movie_list_val(list[i].text);
                break;
            }
        }
        return val;
    }

    // 動画スライダーの値を設定
    _my._set_videoseek_slider = function () {
        if (!_my._values.seek_use) return;
        if (!_my._nodes.ctrl_video_seek_slider) return;
        if (!_my._values.movie_slider_obj) return;

        _my._values.movie_slider_obj.setValue(Math.floor(_my._values.currentTime * _my._values.seek_scale), false, false);

    };

    // 動画スライダーの値が更新された
    _my.videoseek_update_callback = function (value) {
        var video = _my._nodes.video.DOMNode();
        if (!video) return;

        var currentTime = value / _my._values.seek_scale;

        if (_my._values.time_use)
            _my._nodes.video_play_time.setInner(_get_timeString(Math.floor(currentTime)));
        //alert("セット前\n" + "video.currentTime:" + video.currentTime + "currentTime:" + currentTime);
        video.currentTime = currentTime;
        _my._setOperationTime();
        //alert("セット後\n" + "video.currentTime:" + video.currentTime + "currentTime:" + currentTime);
    }

    // ステータスアイコンセット初期化
    _my._init_status_icon = function () {
        // 画面中央の再生状態アイコン(大)
        // アニメーションの関係上、各独立。
        _my._nodes.play_state_wait = imba_t3.node.one('#' + _my.playerID + 'play_state_wait');
        _my._nodes.play_state_play = imba_t3.node.one('#' + _my.playerID + 'play_state_play');
        _my._nodes.play_state_pause = imba_t3.node.one('#' + _my.playerID + 'play_state_pause');

        if (_my._values.loading_use)
            _my._nodes.play_state_loading = imba_t3.node.one('#' + _my.playerID + 'play_state_loading');

        _my._set_play_state('wait');
    };

    _my._init_ctrl_video_seek = function () {
        if (!_my._values.ctrl_use || !_my._values.seek_use) return;
        var ctrl_video_seek = imba_t3.node.one('#' + _my.playerID + 'ctrl_video_seek');
        // シーク幅
        if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
            var rightElem = 0;
            var leftElem = 0;
            _my._values.seekWidth = 0;// - ( 30 + 14 );	// 「再生」+「つまみ」
            if (_my._values.multibitrate_use) rightElem += 70;		// 画質選択
            if (_my._values.play_use) leftElem += 28;		// 再生/一時停止
            if (_my._values.fullscreen_use) rightElem += 30;		// フルスクリーン
            if (_my._values.time_use) leftElem += 100;		// 再生時間(ノーマル時のみ)
            _my._values.seekWidth = rightElem + leftElem;
            //ctrl_video_seek.setStyle("width", "-webkit-calc(100% - " + _my._values.seekWidth + "px)");
            //seekバー領域のスタイル
            var ctrl_seek = imba_t3.node.one('#' + _my.playerID + 'ctrl_video_seek_wrap');
            ctrl_seek.setStyle("float", "left");
            ctrl_seek.setStyle("width", "100%");
            ctrl_seek.setStyle("height","30px");
            //seekバーのスタイルセット
            ctrl_video_seek.setStyle("margin-left", leftElem + "px");
            ctrl_video_seek.setStyle("margin-right", rightElem + "px");
            ctrl_video_seek.setStyle('height', "30px");
            ctrl_video_seek.setStyle('float', 'none');
            //左側の要素
            var ctrl_left = imba_t3.node.one('#' + _my.playerID + 'ctrl_left_wrap');
            ctrl_left.setStyle("float", "left");
            ctrl_left.setStyle("margin-left", "-100%");
            ctrl_left.setStyle("width", leftElem + "px");
            //右側の要素
            var ctrl_right = imba_t3.node.one('#' + _my.playerID + 'ctrl_right_wrap');
            ctrl_right.setStyle("float", "left");
            ctrl_right.setStyle("margin-left", "-" + rightElem + "px");
            ctrl_right.setStyle("width", rightElem + "px");
        } else {
            _my._values.seekWidth = _my._values.movie_w - 14;// - ( 30 + 14 );	// 「再生」+「つまみ」
            if (_my._values.multibitrate_use) _my._values.seekWidth -= 70;		// 画質選択
            if (_my._values.play_use) _my._values.seekWidth -= 28;		// 再生/一時停止
            if (_my._values.fullscreen_use) _my._values.seekWidth -= 30;		// フルスクリーン
            if (_my._values.time_use) _my._values.seekWidth -= 100;		// 再生時間(ノーマル時のみ)
            ctrl_video_seek.setStyle('width', _my._values.seekWidth + "px");
            ctrl_video_seek.setStyle('height', "30px");
        }
    };

    // SNS/リンクウィンドウ表示切替処理
    _my._set_info_visibled = function (isVisible) {
        if (isVisible == _my._values.info) return;

        _my._values.info = isVisible;

        var ani_ms = 100; //ms
        if (isVisible) {
            // スライドイン	
            _my._nodes.info.setStyle("display", "block");
            _my._nodes.info.setStyle('-webkit-animation-name', 'h5p_fade_in,h5p_scale_in');
            _my._nodes.info.setStyle('-webkit-animation-duration', ani_ms + 'ms');

            // 再生中か否かを保存
            if (_my._values.progressTimer) _my._values.is_play = true;
            else _my._values.is_play = false;

            // 動画を一時停止
            if (_my._values.is_play)
                _my.pause();
            if(_my._values.ctrl_use)
                _my._nodes.ctrl_cover.setStyle('display', 'block');
        } else {
            // スライドアウト
            _my._nodes.info.setStyle('-webkit-animation-name', 'h5p_fade_out,h5p_scale_out');
            _my._nodes.info.setStyle('-webkit-animation-duration', ani_ms + 'ms');

            setTimeout(function () {
                _my._nodes.info.setStyle("display", "none");
            }, ani_ms);

            if (_my._values.sns_use) _my._nodes.navi_share.set('className', 'navi_share' + _my._get_css_suffix("height"));
            if (_my._values.exlink_use) _my._nodes.navi_outlink.set('className', 'navi_outlink');

            // 表示時にプレイ中だったなら再生再開
            if (_my._values.is_play) {
                _my.play();
                _my._set_play_state('loading');
            }
            if (_my._values.ctrl_use)
                _my._nodes.ctrl_cover.setStyle('display', 'none');
        }

    };

    //認証ウィンドウ表示切替
    _my._set_login_visibled = function (isVisible) {
        //if (isVisible == _my._values.movie_auth) return;

        //_my._values.movie_auth = isVisible;

        if (isVisible) {
            _my._nodes.movie_auth.setStyle("display", "block");
            document.getElementById(_my.playerID + "block_layer").style.display = "block";
            document.getElementById(_my.playerID +'loginID').focus();
        } else {
            _my._nodes.movie_auth.setStyle("display", "none");
            document.getElementById(_my.playerID + "block_layer").style.display = "none";
            document.getElementById(_my.playerID + 'loginID').blur();
            document.getElementById(_my.playerID + 'loginPASS').blur();
        }

    }

    // 総再生時間設定
    _my._set_duration = function () {
        var video = _my._nodes.video.DOMNode();
        if (!video) return;
        if (video.duration <= 1) return;

        // 総再生時間
        _my._values.duration = video.duration;

        if (_my._values.movie_slider_obj)
            _my._values.movie_slider_obj.setLimitValue(0, _my._values.duration * _my._values.seek_scale);


        // Android/標準ブラウザ
        if (!_my._values.is_Chrome)
            if (_my._loadReserveCT(true)) _my._values.load_currentTime = 0;

        // サイズ設定
        var asp = video.videoHeight / (_my._values.movie_h - _my._values.footerSize);
        _my._values.video_w = _my._values.movie_w;
        _my._values.video_h = _my._values.movie_h - _my._values.footerSize;
        _my._values.video_x = 0;
        _my._values.video_y = 0;

        if (asp < (video.videoWidth / _my._values.movie_w)) {
            // 横基準
            asp = video.videoWidth / _my._values.movie_w;
            _my._values.video_h = Math.floor(video.videoHeight / asp);
            _my._values.video_y = (_my._values.movie_h - _my._values.footerSize - _my._values.video_h) / 2.0;
        } else {
            // 縦基準
            _my._values.video_w = Math.floor(video.videoWidth / asp);
            _my._values.video_x = (_my._values.movie_w - _my._values.video_w) / 2.0;
        }

        if (_my._values.progressTimer) {
            if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
                _my._nodes.video.setStyle("top", "0px");
                _my._nodes.video.setStyle("left", "0px");
                _my._nodes.video.setStyle("width", "100%");
                var appVersion = window.navigator.appVersion.toLowerCase();
                var iosVersion = null;
                if (/iP(hone|od|ad)/.test(navigator.platform)) {
                    var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
                    iosVersion = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt((v[3] || "0"), 10)];
                }
                if (iosVersion == null) {
                    _my._nodes.video.setStyle("height", "100%");
                } else if (iosVersion[0] < 8) {
                    _my._nodes.video.setStyle("height", "100%");
                } else {
                    _my._nodes.video.setStyle("height", null);
                    _my._nodes.video.setStyle("margin", "auto");
                }
                
            } else {
                meka.set_nodeStyleBox(_my._nodes.video, _my._values.video_x, _my._values.video_y, _my._values.video_w, _my._values.video_h);
            }
        }

        _my._set_videoseek_slider();

    };

    // 再生時間・シークバーの更新
    _my._update_time = function () {

        var video = _my._nodes.video.DOMNode();
        if (!video) return;

        if (_my._values.load_currentTime > 0) {
            if (_my._loadReserveCT(false)) _my._values.load_currentTime = 0;
        }

        // 再生情報読取
        var time = video.currentTime;
        if (time > _my._values.duration) time = _my._values.duration;
        if (time <= 1.0) return;

        _my._values.currentTime = time;
        // 再生時間設定
        if (_my._values.ctrl_use && _my._values.time_use) {
            _my._nodes.video_play_time.setInner(_get_timeString(Math.floor(_my._values.currentTime)));
            _my._nodes.video_total_time.setInner(_get_timeString(Math.floor(_my._values.duration)));
        }

        // シークバーの値更新
        _my._set_videoseek_slider();

    }

    // ステータス更新処理
    _my._update_status = function () {

        _my._update_time();

        // コントローラ調整
        if (_my._values.operation._time) {
            var time = Date.now();
            if ((time - _my._values.operation._time) > 5000) {
                _my._set_operation();
            }
        }

        // 再生開始までの時間確認(loading表示)
        if (_my._values.play_start) {
            _my._values.play_start = false;
            _my._set_play_state('play');
        }
    };

    // 動画スライダーの初期化
    _my._init_video_seek = function () {
        if (!_my._values.ctrl_use || !_my._values.seek_use) return;
        if (document.getElementById(_my.playerID + "slider-movie-h_rail")) return;

        var totalTime = Math.round(_my._values.duration * _my._values.seek_scale);
        if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
            _my._values.movie_slider_obj = new meka.range({
                skin: 'movie',
                parent: document.getElementById(_my.playerID + 'ctrl_video_seek_slider'),
                dir: 'horizontal',
                width: "100%",
                ninValue: 0,
                maxValue: totalTime,
                init_value: 0,
                prefix: _my.playerID
            });
            _my._values.movie_slider_obj.setUpdateCallback(_my.videoseek_update_callback);

            // スライダー制御用カバー
            if (_my._nodes.ctrl_video_seek_cover) {
                _my._nodes.ctrl_video_seek_cover.setStyle('width', "100%");
            }
        } else {
            _my._values.movie_slider_obj = new meka.range({
                skin: 'movie',
                parent: document.getElementById(_my.playerID + 'ctrl_video_seek_slider'),
                dir: 'horizontal',
                width: _my._values.seekWidth + 'px',
                ninValue: 0,
                maxValue: totalTime,
                init_value: 0,
                prefix: _my.playerID
            });
            _my._values.movie_slider_obj.setUpdateCallback(_my.videoseek_update_callback);

            // スライダー制御用カバー
            if (_my._nodes.ctrl_video_seek_cover) {
                _my._nodes.ctrl_video_seek_cover.setStyle('max-width', (_my._values.seekWidth) + "px");
                _my._nodes.ctrl_video_seek_cover.setStyle('width', (_my._values.seekWidth) + "px");
            }
        }
        
    };

    // リンクアクション(ビーコン発射用)
    _my._link_action = function (tag) {

        if (_my._values.linkset[tag] && tag != "LINE") {
            var w = window.open();
            w.location.href = _my._values.linkset[tag];
        }

        if (tag == "google_plus") tag = "google";
        if (tag == "LINE") tag = "line";

        // ビーコン発射
        _my._values.jmcPlayer.accessor.sendClickBeacon(tag);
    };

    // 動画ステータス管理用
    // 常に最後のステータスを保持
    _my._set_movie_status = function (state) {
        if (_my._values.movie_status != state) {
            _my._log(state + "::" + _my._values.currentTime + "(" + _my._values.load_currentTime + ") / " + _my._values.duration);
        }
        _my._values.movie_status = state;
        

    };

    // 再生終了。
    _my._end = function () {
        var video = _my._nodes.video.DOMNode();
        if (!video) return;

        if (_my._values.isLive) {
            // ライブモード
            _my._set_info_error();
            return;
        }

        // 以下通常モード
        var style_height = _my._getPlayerStyle("height");
        if (_my._values.replay_use && !(style_height == _my.PS_MINIMUM && !_my._values.fullscreen)) {
            // 「リプレイ」表示
            _my._nodes.header.setStyle('display', 'block');
            _my._nodes.ctrl_replay.setStyle('display', 'block');
            if (_my._values.title_use && _my._values.replay_use) {
                if ((_my._values.responsive == "on" || _my._values.responsive == "fit")) {
                    if (_my._getPlayerStyle("height") == _my.PS_NORMAL) {
                        _my._nodes.video_title_text.setStyle('margin-right', '90px');
                    } else {
                        _my._nodes.video_title_text.setStyle('margin-right', '20px');
                    }
                    
                    //_my._nodes.video_title_text.setStyle('max-width', "85%");
                    //_my._nodes.video_title_text.setStyle('width', "-webkit-calc(100% - " + (_my._values.rep_w + 5 + 10) + "px)");
                } else {
                    _my._nodes.video_title_text.setStyle('max-width', (_my._values.movie_w - _my._values.rep_w - 15) + "px");
                    _my._nodes.video_title_text.setStyle('width', (_my._values.movie_w - _my._values.rep_w - 15) + "px");
                }
                _my._values.header_use = true;
            }
            
            
        }
        var cssTypeWidth = _my._get_css_suffix("width");
        // 「停止」状態に
        if (_my._nodes.play_use) _my._nodes.ctrl_play.set('className', 'ctrl_play' + cssTypeWidth);
        _my._set_navi_visibled(true);
        clearInterval(_my._values.progressTimer);
        _my._values.progressTimer = null;

        _my._values.currentTime = _my._values.duration;
        _my._values.load_currentTime = 0;
        _my._values.is_play = false;

        // 再生時間設定
        if (_my._values.time_use)
            _my._nodes.video_play_time.setInner(_get_timeString(Math.floor(_my._values.currentTime)));

        // シークバーの値更新
        _my._set_videoseek_slider();
        if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
            var rail = imba_t3.node.one("#" + _my.playerID + "slider-movie-h_rail");
            var dist = imba_t3.node.one("#" + _my.playerID + "slider-movie-h_dist");
            var thumb = imba_t3.node.one("#" + _my.playerID + "slider-movie-h_thumb");
            if (rail != null) rail.setStyle("width", "100%");
            if (dist != null) dist.setStyle("width", "100%");
            if (thumb != null) thumb.setStyle("left", "98%");
        }

        // 関連ページor共有ウィンドウ表示
        
        if (_my._values.exlink_use) {
            // 関連ページ
            _my._set_info_outlink();
            _my._set_info_visibled(true);
        } else
             if (!(style_height == _my.PS_MINIMUM)) {
                if (_my._values.sns_use) {
                    // 共有
                    _my._set_info_share();
                    _my._set_info_visibled(true);
                }
            }
        

        // サムネイル表示
        //meka.set_nodeStyleBox(_my._nodes.video, _my._values.movie_w - 1, _my._values.movie_h - 1, 1, 1);
        _my._nodes.video.setStyle("bottom", "0px");
        _my._nodes.video.setStyle("right", "0px");
        _my._nodes.video.setStyle("top", null);
        _my._nodes.video.setStyle("left", null);
        _my._nodes.video.setStyle("width", "1px");
        _my._nodes.video.setStyle("height", "1px");
        _my._nodes.video.setStyle("opacity", "0");
        _my._nodes.video.setStyle("z-index", "1");
        _my._set_video_thumb(_my._values.thumb_filePath);

        _my._set_play_state('wait');

        _my.cb_ended();
    };

    // 「ロード」
    _my._loading = function () {
        var cssTypeWidth = _my._get_css_suffix("width");
        if (_my._nodes.play_use) _my._nodes.ctrl_play.set('className', 'ctrl_play' + cssTypeWidth);
        _my.set_play_state('loading');
    }

    // リプレイ
    _my._replay = function () {
        _my._link_action("replay");

        var video = _my._nodes.video.DOMNode();
        if (!video) return;
        video.currentTime = 0;
        //タイトルoffでリプレイボタンonの時ヘッダーを隠す
        if (!_my._values.title_use && _my._values.replay_use) {
            _my._nodes.header.setStyle('display', 'none');
        }
        _my.cb_replay();

        _my.play();
        _my._set_play_state('loading');
    }
    // コンテンツ未取得
    _my._stalled = function () {
        if (!_my._values.progressTimer) return;
    }

    function _get_timeString(sec) {
        // 整数化
        if (!sec) sec = 0;
        var s = sec % 60;		// 秒
        var m = Math.round((sec - s) / 60) % 60;		// 分
        var t = Math.round((sec - (m * 60 + s)) / (60 * 60)) % 60;		// 時

        var setStr = "";
        setStr = String(t) + ":";
        setStr += ("0" + String(m)).slice(-2) + ":";
        setStr += ("0" + String(s)).slice(-2);

        return setStr;
    }

    _my._checkPlayable = function () {
        var video = _my._nodes.video.DOMNode();
        if (!video) return;
        if (_my._values.movie_auth && !_my._values.authed && _my._values.jmcPlayer.accessor.model.isAuthEnable()) {
            if (_my._values.auth_input) {
                _my._set_login_visibled(true);
            } else {
                _my._values.jmcPlayer.accessor.login(null, null);
            }

        } else {
            if (_my._values.first_play == true) {
                video.src = _my._values.movie_filepath;
                video.load();
                
                var setCurrentTime = function () {
                    if (_my._values.first_play == true) {
                        
                        //video.removeEventListener("playing", setCurrentTime)
                        //if (!(/iP(hone|od|ad)/.test(navigator.platform))) {
                            //video.removeEventListener("pause", setCurrentTime);
                            video.addEventListener("timeupdate", seeked);
                            //console.log("*****setCurrentTime******");
                        //}
                        var r = _my._setCurrentTime(_my._values.start_time);
                        
                    }
                }
                var preSeek = function () {
                    if (_my._values.first_play == true) {
                        //video.removeEventListener("playing", preSeek);
                        video.addEventListener("pause", setCurrentTime);
                        video.pause();
                        //console.log("*****preSeek******");
                    }
                   
                }
                var seeked = function () {
                    if (_my._values.first_play == true) {
                        //video.removeEventListener("pause", setCurrentTime);
                        //video.removeEventListener("seeked", seeked);
                        //if (!(/iP(hone|od|ad)/.test(navigator.platform))) {
                        if (true) {
                            if (Math.floor(video.currentTime) >= Math.floor(_my._values.start_time)) {
                                //video.removeEventListener("timeupdate", seeked);
                                _my._values.first_play = false;
                                video.play();
                                //console.log("*****seeked******");
                            }
                        } else {
                            _my._values.first_play = false;
                            video.play();
                            //console.log("*****seeked******")
                        }
                       // console.log("*****seeking******")
                    }
                    
                    
                }
                if (!_my._values.start_time || _my._values.start_time <= 0) {
                    _my._values.first_play = false;
                    video.play();
                } else if (/iP(hone|od|ad)/.test(navigator.platform)) {
                    _my._values.jmcPlayer.accessor.model.isFirstPlay = true;
                    video.addEventListener("playing", preSeek);
                    video.addEventListener("pause", setCurrentTime);
                    video.addEventListener("timeupdate", seeked);
                    //video.addEventListener("seeked", seeked);
                    video.play();
                }else {
                    //video.addEventListener("playing", setCurrentTime);
                    //var r = _my._setCurrentTime(_my._values.start_time);
                    //video.play();
                    video.addEventListener("playing", preSeek);
                    video.play();
                }
            } else {
                video.play();
            }
            
            
        }
    }

    // デバッグ用
    _my._log = function (msg) {
        //	console.log("["+ _my.playerID+"]" + msg); 
    };

    //--------------------------------------------------
    //	再生開始完了処理。
    _my._play = function () {
        var video = _my._nodes.video.DOMNode();
        if (!video) return;
        _my._set_info_visibled(false);
        var cssTypeWidth = _my._get_css_suffix("width");
        if (_my._values.ctrl_use) {
            _my._set_ctrl_select_list_visibled(false);

            if (_my._values.play_use)
                _my._nodes.ctrl_play.set('className', 'ctrl_pause' + cssTypeWidth);
        }
        if (_my._values.header_use) {
            if (_my._values.replay_use) {
                _my._nodes.ctrl_replay.setStyle('display', 'none');
                if (_my._values.title_use) {
                    if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
                        _my._nodes.video_title_text.setStyle('margin-right', '0px');
                    } else {
                        _my._nodes.video_title_text.setStyle('max-width', _my._values.movie_w + "px");

                    }
                }
            }
        }

        if (_my._values.header_use && !_my._values.title_use) {
            _my._nodes.header.setStyle('display', 'none');
            _my._values.header_use = false;
        }

        if (_my._values.responsive == "on" || _my._values.responsive == "fit") {
            _my._nodes.video.setStyle("top", "0px");
            _my._nodes.video.setStyle("left", "0px");
            _my._nodes.video.setStyle("width", "100%");
            var appVersion = window.navigator.appVersion.toLowerCase();
            var iosVersion = null;
            if (/iP(hone|od|ad)/.test(navigator.platform)) {
                var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
                iosVersion = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt((v[3] || "0"), 10)];
            }
            if (iosVersion == null) {
                _my._nodes.video.setStyle("height", "100%");
            } else if (iosVersion[0] < 8) {
                _my._nodes.video.setStyle("height", "100%");
            } else {
                _my._nodes.video.setStyle("height", null);
                _my._nodes.video.setStyle("margin", "auto");
            }
        } else {
            meka.set_nodeStyleBox(_my._nodes.video, _my._values.video_x, _my._values.video_y, _my._values.video_w, _my._values.video_h);
        }
        _my._nodes.video.setStyle("opacity", "1");
        _my._nodes.video.setStyle("z-index", "10");
        _my._set_video_thumb("");

        _my._set_play_state('play');
        // 操作画面表示管理用:最終操作時間
        _my._setOperationTime();

        if (_my._nodes.ctrl_video_seek_cover) _my._nodes.ctrl_video_seek_cover.setStyle('display', 'none');

        if ((_my._values.load_currentTime > 0) && (video.currentTime > 1)) {
            if (_my._loadReserveCT(false))
                _my._values.load_currentTime = 0;
        }

        if (_my._values.progressTimer) return;

        _my._values.progressTimer = setInterval(_my._progress, 1000 / 20);

        if (!_my._values.is_android) {
            // iOSのみ
            _my._set_duration();
        }

        // 再生時間設定
        if (_my._values.time_use) {
            _my._nodes.video_play_time.setInner(_get_timeString(Math.floor(_my._values.currentTime)));
            _my._nodes.video_total_time.setInner(_get_timeString(Math.floor(_my._values.duration)));
        }

        _my.cb_playing();
    };

    //	一時停止。
    _my._pause = function () {
        var cssTypeWidth = _my._get_css_suffix("width");
        if (_my._values.play_use) _my._nodes.ctrl_play.set('className', 'ctrl_play' + cssTypeWidth);

        _my._set_navi_visibled(true);
        if (_my._values.progressTimer) {
            clearInterval(_my._values.progressTimer);
            _my._values.progressTimer = null;
        }

        if (_my._values.currentTime < _my._values.duration)
            _my._set_play_state('pause');

        // 再生時間設定
        _my._update_time();

        _my.cb_pause();
    };

    // 予約時間適用
    _my._loadReserveCT = function (isStarted) {

        var video = _my._nodes.video.DOMNode();
        if (!video) return false;

        if (_my._values.load_currentTime <= 0) return true;
        if (_my._values.duration <= 1) return true;
        if (isStarted && (video.currentTime <= 0)) return false;

        video.currentTime = _my._values.load_currentTime;
        if (Math.floor(video.currentTime) == Math.floor(_my._values.load_currentTime))
            return true;

        return false;
    }

    // 再生時間指定
    // 指定できた場合指定した時間/失敗時は0/エラー時は-1
    _my._setCurrentTime = function (time) {
        var video = _my._nodes.video.DOMNode();
        if (!video) return false;

        if (_my._values.movie_status == 'error') return -1;

        if (_my._values.duration > 0) {
            // duration以上を指定された場合はduration値に置換
            if (time > _my._values.duration) time = _my._values.duration - 1;
        }
        //再生前はパラメーターに反映させるだけ
        _my._values.start_time = time;

        _my._values.currentTime = time;
        _my._values.load_currentTime = time;

        //if (_my._loadReserveCT(true))
        //    _my._values.load_currentTime = 0;

        // 時間設定(再生時間反映)
        _my.videoseek_update_callback(_my._values.currentTime * _my._values.seek_scale);

        // スライダー設定
        _my._set_videoseek_slider();

        return time;
    };

    // 再生時定期コール関数
    _my._progress = function () {
        if (_my._values.movie_status == 'error') return;
        _my._update_status();

    };

    // シーク完了
    _my._seeked = function () {
        _my.cb_seeked();
    }

    // loadmetadata発生
    _my._ready = function () {
        _my._values.loadedmetadata = true;
        if (_my._values.fullscreen) _my._fullscreen();

        _my.cb_ready();
    }

    //ページから離れるとき
    _my._leaving = function()
    {
        //var name = "EQPlayer_resume_CurrentTime_" + _my._values.jmcPlayer.flashVars.meta_id;
        //var value = _my._values.currentTime;
        //var path = '/';
        //var period = 7;
        //jstream_t3.utils.Util.SetCookie(name, value, path, period);
    }


    //---------------------------------------------------------------//
    var h5p = _my;
    h5p.prefix = "h5p_pd_";

    // 最後に発生したムービーのステータスを取得します。
    h5p.getStatus = function () { return _my._values.movie_status; };

    // 設定されているプレイヤーIDを取得します。
    h5p.getPlayerID = function () { return _my.playerID; };

    // 設定されているビデオIDを取得します。
    h5p.getVideoID = function () { return _my.videoID; };

    // ビデオステータスが「loadedmetadata」になった時に呼び出されます。
    // (loadedmetadataはビデオのメタ情報の読込が完了した時点で発生するイベントです。)
    h5p.ready = function () { };	// 廃止予定
    h5p.cb_ready = function () { return _my.ready(); };

    // ビデオのシーク完了時に呼び出されます。
    h5p.seeked = function () { };	// 廃止予定
    h5p.cb_seeked = function () { return _my.seeked(); };

    // pauseイベント発生時に呼び出されます。
    h5p.cb_pause = function () { };

    // playingイベント発生時に呼び出されます。
    h5p.cb_playing = function () { };

    // endedイベント発生時に呼び出されます。
    h5p.cb_ended = function () { };

    // replay時に呼び出されます。
    h5p.cb_replay = function () { };

    // ビデオの現在の再生時間を設定します。
    // @param	time	再生を開始する時間(秒)
    // @return	指定できた場合、指定した時間(time)/失敗時は0/エラー時は-1
    h5p.setCurrentTime = function (time) { return _my._setCurrentTime(time); };

    // 現在の再生時間を取得します。
    // @return 再生時間(秒)
    h5p.getCurrentTime = function () { return _my._values.currentTime; };

    // 再生中のムービーを一時停止します。
    h5p.pause = function () {
        if (_my._values.movie_status == 'error') return;
        var video = _my._nodes.video.DOMNode();
        if (!video) return;
        video.pause();
    };

    // 設定されているムービーを再生します。
    h5p.play = function () {
        if (_my._values.movie_status == 'error') return;
        
        _my._checkPlayable();
        //
    };


    h5p.reloadMovie = function () {
        //・タイトル・シーク・時間・画質切り替えの情報更新
        //・動画の読み込み込
        //・サムネイルの読み直し
        //0に戻る
        _my._pause();

        // タイトル設定
        if (_my._values.title_use) {
            _my._values.movie_title = jmcPlayer.flashVars.title;
            _my._nodes.video_title_text.setInner(_my._values.movie_title);
        }

        // 	各種時間
        _my._values.duration = 0;
        _my._values.currentTime = 0;
        _my._values.stalledTime = 0;

        // ビデオファイルパス
        _my._values.movie_filepath = jmcPlayer.flashVars.movie_url;

        // サムネイル設定
        _my._set_video_thumb(_my._values.thumb_filePath);

        var video = _my._nodes.video.DOMNode();
        if (!video) return;
        video.poster = _my._values.thumb_filePath;
        //iOS系でなく、認証を利用しない場合は動画のソースを先にロードしておく
        if (!(_my._values.jmcPlayer.accessor.model.getEnvironmentType() == "mobileStreaming" && _my._values.movie_auth && !_my._values.authed && _my._values.jmcPlayer.accessor.model.isAuthEnable())) {
            video.src = _my._values.movie_filepath;
            video.pause();	// 念の為
        }
        // 画質選択設定
        if (_my._defVals.multibitrate_use) {
            _my._values.movie_index = 0;
            _my._values.movie_list = jmcPlayer.flashVars.movie_list;
            if (!_my._values.movie_list || (_my._values.movie_list.length <= 0)) {
                _my._values.multibitrate_use = false;
                _my._values.movie_list = [
                    {
                        "url": _my._values.movie_filepath,
                        "text": ""
                    }
                ];
            } else {
                _my._values.multibitrate_use = true;
                //デフォルト画質ラベル設定
                for (var i = 0; i < _my._values.movie_list.length; i++) {
                    if (_my._values.movie_filepath == _my._values.movie_list[i].url) {
                        _my._values.movie_index = i;
                        break;
                    }
                }
            }
            _my._init_movie_select();
        }

        _my._set_navi_visibled(true);

        // info閉
        _my._set_info_visibled(false);
        _my._nodes.ctrl_replay.setStyle('display', 'none');

        // duration設定
        if (_my._values.time_use) {
            _my._nodes.video_play_time.setInner(_get_timeString(Math.floor(0)));
            _my._nodes.video_total_time.setInner(_get_timeString(Math.floor(0)));
        }
    };

    h5p.changeQuality = function (movieURL) {
        // URLからindex調査
        var idx = -1;

        var i;
        for (i = 0; i < _my._values.movie_list.length; i++) {
            if (_my._values.movie_list[i].url == movieURL) {
                idx = i;
                break;
            }
        }

        if (idx < 0) return false;
        _my._click_movie_select(idx);

        return true;
    };
    h5p.getCurrentMovieURL = function () {
        return _my._values.movie_filepath;
    }
    h5p.authResult = function (isAuthed) {
        _my._values.authed = isAuthed;
        if (!isAuthed) {
            //メッセージ追加
            if (_my._values.auth_input) {

            } else {
                _my._values.auth_input = true;
            }
            var titleNode = imba_t3.node.one('#' + _my.playerID + 'login_title');
            titleNode.setInner(_my._languageResource.kinds.ERROR_AUTH);
            titleNode.setStyle("color", "#FF7474")
            _my._video_change_ctrl();
        } else {
            
        }
        
    }

    h5p.authResult_native = function (isAuthed) {
        _my._values.authed = isAuthed;
        //動画情報を更新する
        this._values.movie_filepath = JMCPlayer.instance.flashVars.movie_url_mobile;
        _my._init_video();
        var video = _my._nodes.video.DOMNode();
        if (!video) return;

        video.poster = _my._values.thumb_filePath;
        video.src = _my._values.movie_filepath;
        video.load();
        video.pause();	// 念の為
        
    }

    h5p.updateVideoURL = function (movie_url_mobile,isAuthed) {
        //動画情報を更新する
        _my._values.authed = isAuthed;
        if (isAuthed) {
            this._values.movie_filepath = movie_url_mobile;
            _my._init_video();
            var video = _my._nodes.video.DOMNode();
            if (!video) return;

            video.poster = _my._values.thumb_filePath;
            video.src = _my._values.movie_filepath;
            video.load();
            video.pause();	// 念の為
            //video.play();
        } else {
            var titleNode = imba_t3.node.one('#' + _my.playerID + 'login_title');
            titleNode.setInner(_my._languageResource.kinds.ERROR_AUTH);
            titleNode.setStyle("color", "#FF7474")
            _my._set_login_visibled(true);
        }
        
    }

    h5p.setAuthVisible = function (visiblity) {
        _my._set_login_visibled(visiblity);
    }


};var jstream_t3;
(function (jstream_t3) {
    var PlayerManger = (function () {
        function PlayerManger() {
        }
        PlayerManger.addPlayerAPI = function (player) {
            var jstream_t3 = window["jstream_t3"];
            var players = jstream_t3.PlayerManger_players;
            if (jstream_t3.PlayerManger_players == null) {
                jstream_t3.PlayerManger_players = {};
            }
            jstream_t3.PlayerManger_players[player.objectID] = player;
        };

        PlayerManger.removePlayerAPI = function (objectID) {
            var api = PlayerManger.getPlayer(objectID);
            if (api) {
                PlayerManger.getPlayer(objectID).destroy();
                delete window["jstream_t3"].PlayerManger_players[objectID];
            }
        };

        PlayerManger.getPlayer = function (objectID) {
            var jstream_t3 = window["jstream_t3"];
            var players = jstream_t3.PlayerManger_players;
            if (jstream_t3.PlayerManger_players == null) {
                jstream_t3.PlayerManger_players = {};
            }
            return jstream_t3.PlayerManger_players[objectID];
        };

        PlayerManger.getFlashVars = function (objectID) {
            return PlayerManger.getPlayer(objectID).eqPlayer.getFlashVars().createVarsParam();
        };

        PlayerManger.getFlashVarsLength = function (objectID) {
            return PlayerManger.getPlayer(objectID).eqPlayer.getFlashVarsLength();
        };

        PlayerManger.getFlashVarsAt = function (objectID, index) {
            return PlayerManger.getPlayer(objectID).eqPlayer.getFlashVarsAt(index);
        };

        PlayerManger.dispatchEvent = function (objectID, type) {
            PlayerManger.getPlayer(objectID).dispatchEvent(type);
        };

        PlayerManger.setState = function (objectID, state) {
            PlayerManger.getPlayer(objectID).setState(state);
        };

        PlayerManger.sendClickBeacon = function (objectID, state) {
            PlayerManger.getPlayer(objectID).sendClickBeacon(state);
        };
        return PlayerManger;
    })();
    jstream_t3.PlayerManger = PlayerManger;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (utils) {
        var Util = (function () {
            function Util() {
            }
            Util.getCanonical = function () {
                var linkList = document.getElementsByTagName("link");
                for (var i = 0; i < linkList.length; i++) {
                    if (linkList[i].rel == "canonical") {
                        var aaa = "aaa";
                        return linkList[i].href;
                    }
                }
                return null;
            };

            Util.getAPIServerURL = function (url) {
                return url + "/apiservice/";
            };

            Util.parse_uri = function (uri) {
                var reg = /^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/;
                var m = uri.match(reg);
                if (m) {
                    return { "scheme": m[1], "authority": m[2], "path": m[3], "query": m[4], "fragment": m[5] };
                } else {
                    return null;
                }
            };

            Util.encode = function (value) {
                if (value == null)
                    return value;
                return value.split("&").join("__and__");
            };

            Util.decode = function (value) {
                if (value == null)
                    return value;
                return value.split("__and__").join("&");
            };

            Util.decodeHTMLEncode = function (src) {
                if (src == null)
                    return src;

                return src.split("&lt;").join("<").split("&gt;").join(">").split("&amp;").join("&").split("&quot;").join("\"").split("&nbsp;").join(" ");
            };

            Util.encodeHTMLEncode = function (str) {
                if (str == null)
                    return str;
                str = str.replace(/&/g, '&amp;');
                str = str.replace(/\"/g, '&quot;');
                str = str.replace(/\'/g, '&#039;');
                str = str.replace(/</g, '&lt;');
                str = str.replace(/>/g, '&gt;');
                return str;
            };

            Util.isFlash = function () {
                return jstream_t3.utils.EmbedSwf.detectFlashVer(10, 1, 0);
            };

            Util.browserLanguage = function () {
                if (Util.isMobileList().Android2) {
                    return navigator.appVersion.indexOf("ja-jp") >= 0 ? "ja" : "en";
                }
                if (document.all) {
                    return navigator.browserLanguage.split("-")[0];
                }
                var language = window.navigator.userLanguage || window.navigator.language || window.navigator.browserLanguage;
                return language.split("-")[0];
            };

            Util.getUserAgent = function () {
                var ua = window.navigator.userAgent.toLowerCase();
                var appVersion = window.navigator.appVersion.toLowerCase();
                if (ua.indexOf("msie") > -1) {
                    if (appVersion.indexOf("msie 6.") != -1) {
                        return 'ie6';
                    } else if (appVersion.indexOf("msie 7.") != -1) {
                        return 'ie7';
                    } else if (appVersion.indexOf("msie 8.") != -1) {
                        return 'ie8';
                    } else if (appVersion.indexOf("msie 9.") != -1) {
                        return 'ie9';
                    } else if (appVersion.indexOf("msie 10.") != -1) {
                        return 'ie10';
                    }
                    return "IE";
                } else if (ua.indexOf("firefox") > -1) {
                    return "Firefox";
                } else if (ua.indexOf("opera") > -1) {
                    return "opera";
                } else if (ua.indexOf("netscape") > -1) {
                    return "netscape";
                } else if (ua.indexOf("chrome") > -1) {
                    return "Chrome";
                } else {
                    return "Unknown";
                }
            };

            Util.isMobileList = function (userAgent) {
                if (typeof userAgent === "undefined") { userAgent = null; }
                if (Util["isMobile"] == null) {
                    Util["isMobile"] = new MobileAgentList(userAgent);
                }
                return Util["isMobile"];
            };

            Util.deleteNullItem = function (myArray) {
                var i, len, _results;
                if (!myArray) {
                    return;
                }
                len = myArray.length - 1;
                i = len;
                _results = [];
                while (i >= 0) {
                    if (!myArray[i]) {
                        myArray.splice(i, 1);
                    }
                    _results.push(i--);
                }
                return _results;
            };

            Util.isFunction = function (value) {
                return typeof value == "function";
            };

            Util.isObject = function (value) {
                return typeof value == "object";
            };

            Util.escapeObject = function (value) {
                if (value == null || typeof value == "function")
                    return null;
                if (typeof value == "string") {
                    return window["escape"](value);
                }

                if (typeof value == "number" || typeof value == "boolean") {
                    return value;
                }

                var result;
                if (value instanceof Array) {
                    result = [];
                } else {
                    result = {};
                }

                for (var prop in value) {
                    result[prop] = Util.escapeObject(value[prop]);
                }

                return result;
            };

            Util.changeParamName = function (params) {
                params.base = params.b;
                params.contract_id = params.c;
                params.meta_id = params.m;
                params.start_time = params.t;
                params.plugins = params.p;
                params.va_url = params.v;

                params.width = params.s.wp;
                params.height = params.s.hp;
                if (!isNaN(parseFloat(params.s.wt)))
                    params.s.wt = parseFloat(params.s.wt);
                params.thumb_width = params.s.wt;
                if (!isNaN(parseFloat(params.s.ht)))
                    params.s.ht = parseFloat(params.s.ht);
                params.thumb_height = params.s.ht;

                params.responsive = params.s.rp;
                params.default_quality = params.s.dq || 2;
                params.auth = params.a;

                return params;
            };

            Util.unObfuscate = function (str) {
                str = decodeURIComponent(str);
                str = this.base64decode(str).toString();
                return str;
            };

            Util.obfuscate = function (str) {
                str = this.base64encode(str);
                str = encodeURIComponent(str);
                return str;
            };

            Util.base64encode = function (s) {
                var t = '';
                var p = -6;
                var a = 0;
                var i = 0;
                var v = 0;
                var c;
                var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

                while ((i < s.length) || (p > -6)) {
                    if (p < 0) {
                        if (i < s.length) {
                            c = s.charCodeAt(i++);
                            v += 8;
                        } else {
                            c = 0;
                        }
                        a = ((a & 255) << 8) | (c & 255);
                        p += 8;
                    }
                    t += BASE64_CHARS.charAt((v > 0) ? (a >> p) & 63 : 64);
                    p -= 6;
                    v -= 6;
                }
                return t;
            };

            Util.base64decode = function (s) {
                var t = '';
                var p = -8;
                var a = 0;
                var c;
                var d;
                var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

                for (var i = 0; i < s.length; i++) {
                    if ((c = BASE64_CHARS.indexOf(s.charAt(i))) < 0)
                        continue;
                    a = (a << 6) | (c & 63);
                    if ((p += 6) >= 0) {
                        d = (a >> p) & 255;
                        if (c != 64)
                            t += String.fromCharCode(d);
                        a &= 63;
                        p -= 8;
                    }
                }
                return t;
            };

            Util.toJSON = function (obj) {
                var buff = [];

                var read = function (o) {
                    if (typeof (o) == "function") {
                        return;
                    } else if (typeof (o) == "string" || o instanceof String) {
                        return '"' + o + '"';
                    } else if (typeof (o) == "number" || o instanceof Number) {
                        return o;
                    } else if (o instanceof Array) {
                        if (o) {
                            buff.push('[');
                            for (var idx in o) {
                                buff.push(read(o[idx]));
                                buff.push(', ');
                            }
                            if (o.length > 0)
                                delete buff[buff.length - 1];
                            buff.push(']');
                        }
                    } else if (o instanceof Object) {
                        if (o) {
                            buff.push('{');
                            for (var key in o) {
                                buff.push(key + ': ');
                                buff.push(read(o[key]));
                                buff.push(',');
                            }
                            delete buff[buff.length - 1];
                            buff.push('}');
                        }
                    }
                };
                read(obj);
                return buff.join('');
            };
            Util.toJSONforCustomVA = function (obj) {
                var buff = [];

                var read = function (o) {
                    if (typeof (o) == "function") {
                        return;
                    } else if (typeof (o) == "string" || o instanceof String) {
                        return '"' + o + '"';
                    } else if (typeof (o) == "number" || o instanceof Number) {
                        return o;
                    } else if (o instanceof Array) {
                        if (o) {
                            buff.push('[');
                            for (var idx in o) {
                                buff.push(read(o[idx]));
                                buff.push(', ');
                            }
                            if (o.length > 0)
                                delete buff[buff.length - 1];
                            buff.push(']');
                        }
                    } else if (o instanceof Object) {
                        if (o) {
                            buff.push('{');
                            for (var key in o) {
                                buff.push('"' + key + '": ');
                                buff.push(read(o[key]));
                                buff.push(',');
                            }
                            delete buff[buff.length - 1];
                            buff.push('}');
                        }
                    }
                };
                read(obj);
                return buff.join('');
            };
            Util.toQuery = function (obj) {
                var buff = [];

                var read = function (o) {
                    if (typeof (o) == "function") {
                        return;
                    } else if (typeof (o) == "string" || o instanceof String) {
                        return o;
                    } else if (typeof (o) == "number" || o instanceof Number) {
                        return o;
                    } else if (o instanceof Array) {
                        if (o) {
                            buff.push('[');
                            for (var idx in o) {
                                buff.push(read(o[idx]));
                                buff.push(', ');
                            }
                            if (o.length > 0)
                                delete buff[buff.length - 1];
                            buff.push(']');
                        }
                    } else if (o instanceof Object) {
                        if (o) {
                            buff.push('{');
                            for (var key in o) {
                                buff.push(key + ': ');
                                buff.push(read(o[key]));
                                buff.push(',');
                            }
                            delete buff[buff.length - 1];
                            buff.push('}');
                        }
                    }
                };
                read(obj);
                return buff.join('');
            };
            Util.GetCookie = function (name) {
                var result = null;

                var cookieName = name + '=';
                var allcookies = window.document.cookie;

                var position = allcookies.indexOf(cookieName);
                if (position != -1) {
                    var startIndex = position + cookieName.length;

                    var endIndex = allcookies.indexOf(';', startIndex);
                    if (endIndex == -1) {
                        endIndex = allcookies.length;
                    }

                    result = decodeURIComponent(allcookies.substring(startIndex, endIndex));
                }

                return result;
            };
            Util.SetCookie = function (name, value, path, period, domain) {
                if (typeof period === "undefined") { period = null; }
                if (typeof domain === "undefined") { domain = null; }
                if (domain == null) {
                    domain == "";
                } else {
                    domain = "domain=" + domain + ";";
                }
                if (period != null) {
                    var nowtime = new Date().getTime();
                    var clear_time = new Date(nowtime + (60 * 60 * 24 * 1000 * (period)));
                    var expires = clear_time.toDateString();
                    var max_age = 60 * 60 * 24 * period;

                    window.document.cookie = name + "=" + encodeURIComponent(value) + ";path=/;" + domain + "max-age=" + max_age;
                } else {
                    window.document.cookie = name + "=" + encodeURIComponent(value) + ";path=/;" + domain;
                }
            };

            Util.CheckOverCookie = function (key, name, max) {
                var cookies = window.document.cookie.split(";");

                if (window.document.cookie.indexOf(name) != -1) {
                    return null;
                }
                var firstCookie = null;
                var cookieCount = 0;
                for (var i = 0; i < cookies.length; i++) {
                    if (cookies[i].indexOf(key) != -1) {
                        if (firstCookie == null) {
                            firstCookie = cookies[i].split("=")[0];
                        }
                        cookieCount++;
                    }
                }

                return cookieCount >= max ? firstCookie : null;
            };
            Util.DeleteCookie = function (name, domain) {
                if (typeof domain === "undefined") { domain = null; }
                if (domain == null) {
                    domain == "";
                } else {
                    domain = "domain=" + domain + ";";
                }

                var date1 = new Date();

                date1.setTime(0);

                window.document.cookie = name + "=;path=/;" + domain;
                +" expires=" + date1.toDateString();
            };

            Util.ReplaceHtmltagWithString = function (originString, htmlTagName, newString) {
                var pattern = "/<" + htmlTagName + "[^>]+?\/>|<" + htmlTagName + "(.|\s)*?\/" + htmlTagName + ">/gi";
                return originString.replace(pattern, newString);
            };
            return Util;
        })();
        utils.Util = Util;

        var MobileAgentList = (function () {
            function MobileAgentList(userAgent) {
                if (typeof userAgent === "undefined") { userAgent = null; }
                this.iOSP = false;
                this.iOST = false;
                this.Android1 = false;
                this.Android2 = false;
                this.Android3 = false;
                this.Android4 = false;
                this.BlackBerry = false;
                this.Windows = false;
                this.WindowsPC = false;
                this.Firefox = false;
                var agent = userAgent || navigator.userAgent;
                var navMatch = function (exp) {
                    return agent.match(exp) ? true : false;
                };
                this.iOSP = navMatch(/iPhone|iPod/i);
                this.iOST = navMatch(/iPad/i);
                this.Android1 = navMatch(/Android 1/i);
                this.Android2 = navMatch(/Android 2/i);
                this.Android3 = navMatch(/Android 3/i);
                this.Android4 = (navMatch(/Android [4-9]/i)) || (navMatch(/Silk/i));
                this.BlackBerry = navMatch(/BlackBerry/i);
                this.Windows = navMatch(/Windows Phone/i);
                this.WindowsPC = navMatch(/Windows NT/i);
                this.Firefox = navMatch(/Firefox/i) && navMatch(/Mobile|Tablet/i);
            }
            return MobileAgentList;
        })();
        utils.MobileAgentList = MobileAgentList;

        var Trace = (function () {
            function Trace() {
            }
            Trace.write = function (str) {
                var targetElement = "debug";

                var el = document.getElementById(targetElement);
                if (el) {
                    var dt = new Date();
                    var HHMMSS = String(dt.getHours() + 100).substr(1) + ":" + String(dt.getMinutes() + 100).substr(1) + ":" + String(dt.getSeconds() + 100).substr(1) + "." + String(dt.getMilliseconds() + 1000).substr(1);

                    var tmpStr = el.innerText;
                    el.innerText = HHMMSS + " " + str + "\n" + tmpStr;
                }

                return;
            };
            return Trace;
        })();
        utils.Trace = Trace;

        var EmbedSwf = (function () {
            function EmbedSwf() {
            }
            EmbedSwf.embed = function (id, path, width, height, thumb) {
                if (typeof thumb === "undefined") { thumb = null; }
                var params = {
                    quality: "high",
                    bgcolor: "#000000",
                    play: "true",
                    loop: "false",
                    wmode: "opaque",
                    scale: "noScale",
                    menu: "false",
                    devicefont: "false",
                    salign: "TL",
                    allowscriptaccess: "always",
                    allowfullscreen: "true"
                };

                var target = document.getElementById(id);

                var win = window;

                if (win.ActiveXObject) {
                    var objectTag = "";
                    var paramTags = "";

                    for (var key in params) {
                        paramTags += '<param name="' + key + '" value="' + params[key] + '" />';
                    }
                    paramTags += '<param name="movie" value="' + path + '" />';

                    objectTag = '<object id="' + id + '" name="' + id + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + String(width) + '" height="' + String(height) + '">' + paramTags + '</object>';
                    target.outerHTML = objectTag;
                    var object = document.getElementById(id);
                } else {
                    var parent = target.parentElement;
                    parent.removeChild(target);

                    var object = document.createElement("object");
                    object.id = id;

                    object.setAttribute("name", id);
                    object.setAttribute("type", "application/x-shockwave-flash");
                    object.setAttribute("width", String(width));
                    object.setAttribute("height", String(height));
                    object.setAttribute("data", path);

                    for (var key in params) {
                        var param = document.createElement("param");
                        param.setAttribute("name", key);
                        param.setAttribute("value", params[key]);
                        object.appendChild(param);
                    }
                    var w = -1;
                    var h = -1;
                    if (width != null) {
                        if (width == "100%") {
                            w = parent.clientWidth;
                        } else {
                            w = parseInt(width);
                        }
                    }
                    if (height != null) {
                        if (height == "100%") {
                            h = parent.clientHeight;
                        } else {
                            h = parseInt(height);
                        }
                    }
                    if (thumb != null && (w < 398 || h < 298)) {
                        var img = document.createElement("param");
                        img.setAttribute("name", "poster");
                        img.setAttribute("value", thumb);
                        object.appendChild(img);
                    }
                    parent.appendChild(object);
                }
            };

            EmbedSwf.getFpVer = function () {
                var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
                var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
                var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

                var flashVer = "-1";

                if (navigator.plugins != null && navigator.plugins.length > 0) {
                    if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
                        var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
                        var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
                        var descArray = flashDescription.split(" ");
                        var tempArrayMajor = descArray[2].split(".");
                        var versionMajor = tempArrayMajor[0];
                        var versionMinor = tempArrayMajor[1];
                        var versionRevision = descArray[3];
                        if (versionRevision == "") {
                            versionRevision = descArray[4];
                        }
                        if (versionRevision[0] == "d") {
                            versionRevision = versionRevision.substring(1);
                        } else if (versionRevision[0] == "r") {
                            versionRevision = versionRevision.substring(1);
                            if (versionRevision.indexOf("d") > 0) {
                                versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
                            }
                        }
                        var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
                    }
                } else if (isIE && isWin && !isOpera) {
                    flashVer = this.controlVersion();
                }
                return flashVer;
            };

            EmbedSwf.controlVersion = function () {
                var version;
                var axo;
                var e;

                try  {
                    axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
                    version = axo.GetVariable("$version");
                } catch (e) {
                }

                if (!version) {
                    try  {
                        axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");

                        version = "WIN 6,0,21,0";

                        axo.AllowScriptAccess = "always";

                        version = axo.GetVariable("$version");
                    } catch (e) {
                        version = -1;
                    }
                }

                return version;
            };

            EmbedSwf.detectFlashVer = function (reqMajorVer, reqMinorVer, reqRevision) {
                var versionStr = this.getFpVer();
                if (versionStr == "-1") {
                    return false;
                } else if (versionStr != "0") {
                    if (versionStr.match(/ /)) {
                        var tmpArray = versionStr.split(" ");
                        versionStr = String(tmpArray[1]);
                    }

                    var versionArray = versionStr.replace(/,/g, ".").split(".");

                    var versionMajor = versionArray[0];
                    var versionMinor = versionArray[1];
                    var versionRevision = versionArray[2];

                    if (versionMajor > parseFloat(reqMajorVer)) {
                        return true;
                    } else if (versionMajor == parseFloat(reqMajorVer)) {
                        if (versionMinor > parseFloat(reqMinorVer))
                            return true;
else if (versionMinor == parseFloat(reqMinorVer)) {
                            if (versionRevision >= parseFloat(reqRevision))
                                return true;
                        }
                    }
                    return false;
                }
            };
            return EmbedSwf;
        })();
        utils.EmbedSwf = EmbedSwf;
    })(jstream_t3.utils || (jstream_t3.utils = {}));
    var utils = jstream_t3.utils;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (events) {
        var Event = (function () {
            function Event(type, data) {
                if (typeof type === "undefined") { type = null; }
                if (typeof data === "undefined") { data = null; }
                this.type = type;
                this.data = data;
            }
            Event.LOADED = "loaded";
            Event.ERROR = "error";
            return Event;
        })();
        events.Event = Event;
    })(jstream_t3.events || (jstream_t3.events = {}));
    var events = jstream_t3.events;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (events) {
        var EventDispatcher = (function () {
            function EventDispatcher() {
                this.listeners = {};
            }
            EventDispatcher.prototype.dispatchEvent = function (event) {
                var e;
                var type;
                if (event instanceof events.Event) {
                    type = event.type;
                    e = event;
                } else {
                    type = event;
                    e = new events.Event(type);
                }

                if (this.listeners[type] != null) {
                    e.currentTarget = this;
                    for (var i = 0; i < this.listeners[type].length; i++) {
                        var listener = this.listeners[type][i];
                        try  {
                            listener.handler(e);
                        } catch (error) {
                            if (window.console) {
                                console.error(error.stack);
                            }
                        }
                    }
                }
            };

            EventDispatcher.prototype.addEventListener = function (type, callback, priolity) {
                if (typeof priolity === "undefined") { priolity = 0; }
                if (this.listeners[type] == null) {
                    this.listeners[type] = [];
                }

                this.listeners[type].push(new EventListener(type, callback, priolity));
                this.listeners[type].sort(function (listerner1, listener2) {
                    return listener2.priolity - listerner1.priolity;
                });
            };

            EventDispatcher.prototype.removeEventListener = function (type, callback) {
                if (this.hasEventListener(type, callback)) {
                    for (var i = 0; i < this.listeners[type].length; i++) {
                        var listener = this.listeners[type][i];
                        if (listener.equalCurrentListener(type, callback)) {
                            listener.handler = null;
                            this.listeners[type].splice(i, 1);
                            return;
                        }
                    }
                }
            };

            EventDispatcher.prototype.clearEventListener = function () {
                this.listeners = {};
            };

            EventDispatcher.prototype.containEventListener = function (type) {
                if (this.listeners[type] == null)
                    return false;
                return this.listeners[type].length > 0;
            };

            EventDispatcher.prototype.hasEventListener = function (type, callback) {
                if (this.listeners[type] == null)
                    return false;
                for (var i = 0; i < this.listeners[type].length; i++) {
                    var listener = this.listeners[type][i];
                    if (listener.equalCurrentListener(type, callback)) {
                        return true;
                    }
                }
                return false;
            };
            return EventDispatcher;
        })();
        events.EventDispatcher = EventDispatcher;

        var EventListener = (function () {
            function EventListener(type, handler, priolity) {
                if (typeof type === "undefined") { type = null; }
                if (typeof handler === "undefined") { handler = null; }
                if (typeof priolity === "undefined") { priolity = 0; }
                this.type = type;
                this.handler = handler;
                this.priolity = priolity;
            }
            EventListener.prototype.equalCurrentListener = function (type, handler) {
                if (this.type == type && this.handler == handler) {
                    return true;
                }
                return false;
            };
            return EventListener;
        })();
    })(jstream_t3.events || (jstream_t3.events = {}));
    var events = jstream_t3.events;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (resource) {
        var LanguageKinds = (function () {
            function LanguageKinds() {
            }
            return LanguageKinds;
        })();
        resource.LanguageKinds = LanguageKinds;

        var LanguageResource = (function () {
            function LanguageResource(languageResouce) {
                if (typeof languageResouce === "undefined") { languageResouce = null; }
                this.kinds = new LanguageKinds();
                this.setUp();
                if (languageResouce != null) {
                    this.setUpResource(languageResouce);
                }
            }
            LanguageResource.kinds = function () {
                if (jstream_t3.resource["LanguageResource_kinds"] == null) {
                    var language = new LanguageResource();
                    jstream_t3.resource["LanguageResource_kinds"] = language.kinds;
                }
                return jstream_t3.resource["LanguageResource_kinds"];
            };

            LanguageResource.prototype.getMessage = function (type) {
                return this.kinds[type];
            };
            LanguageResource.prototype.setUp = function () {
                if (jstream_t3.utils.Util.browserLanguage() == "ja") {
                    this.kinds.ERROR_LIMIT = "現在、非公開です。";
                    this.kinds.ERROR_LIMIT_MESSAGE = "この動画は現在公開されておりません(P5001)";
                    this.kinds.ERROR_LIMIT_PRE_TITLE = "公開期間前です。";
                    this.kinds.ERROR_LIMIT_PRE_MESSAGE = "この動画はまだ公開されておりません(P5002)";
                    this.kinds.ERROR_LIMIT_OVER_TITLE = "公開が終了しています。";
                    this.kinds.ERROR_LIMIT_OVER_MESSAGE = "この動画の公開は終了しました(P5003)";
                    this.kinds.ERROR_META_DATA_TITLE = "動画情報の読み込みに失敗しました。";
                    this.kinds.ERROR_META_DATA_MESSAGE = "この動画は配信者によって削除された可能性があります。(P1001)";
                    this.kinds.ERROR_SETTING_TITLE = "プレイヤー設定情報の読み込みに失敗しました";
                    this.kinds.ERROR_SETTING_DELETE = "このプレイヤーは配信者によって削除された可能性があります。(P0501)";
                    this.kinds.ERROR_ENV_TITLE = "再生が許可されていません。";
                    this.kinds.ERROR_ENV_MESSAGE = "この動画は、再生が許可されていません。(P5101:_STATUS_)";
                    this.kinds.SHARE_MOVIE = "この動画を共有";
                    this.kinds.LINKS = "関連ページ";
                    this.kinds.AUTH = "入力してください";
                    this.kinds.ERROR_AUTH = "認証に失敗しました";
                    this.kinds.ID = "ID";
                    this.kinds.PASS = "パスワード";
                    this.kinds.PLAY = "PLAY";
                    this.kinds.Replay = "もう一度見る";
                    this.kinds.Label_Low = "低画質";
                    this.kinds.Label_Standard = "標準画質";
                    this.kinds.Label_High = "高画質";
                    this.kinds.Label_HD = "HD";
                    this.kinds.Label_FullHD = "フルHD";
                    this.kinds.Label_4K = "4K";
                    this.kinds.Label_Auto = "自動";
                    this.kinds.ERROR_TITLE = "エラー";
                    this.kinds.ERROR_MOVIE_NOT_FOUND = "動画ファイルが見つかりません。(P7011)";
                    this.kinds.ERROR_NO_FLASH_TITLE = "FlashPlayerがみつかりません。";
                    this.kinds.ERROR_NO_FLASH_MESSAGE = '<span style="color:#fff">動画の再生にはFlash Playerが必要です。<br /><a target="_blank" href="//www.adobe.com/go/getflashplayer" style="color:#ff0;" >Flash Playerをインストールしてください。</a>(P0102)</span>';
                    this.kinds.ERROR_NO_FLASH_ANDROID_TITLE = "FlashPlayerがみつかりません。";
                    this.kinds.ERROR_NO_FLASH_ANDROID_MESSAGE = "お使いの端末ではFlash Playerがサポートされていないため、動画を視聴することができません。(P0103)";
                    this.kinds.ERROR_SERVICE_TITLE = "サービス設定情報の読み込みに失敗しました";
                    this.kinds.ERROR_SERVICE_DELETE = "サービス設定情報の読み込みに失敗しました(P2001)";
                    this.kinds.ERROR_LIVE_RELOAD = "ライブが中断されました。<br />しばらくしてからリロードをお試し下さい。(P7101)";
                    this.kinds.P1201T = "ライブ情報の読み込みに失敗しました。";
                    this.kinds.P1201M = "このライブ配信はキャンセルされた可能性があります。(P1201)";
                    this.kinds.P3001T = "ライブ状態の読み込みに失敗しました。";
                    this.kinds.P3001M = "ページのリロードをお試しください。(P3001)";
                    this.kinds.P3501T = "ライブ状態の読み込みに失敗しました。";
                    this.kinds.P3501M = "ページのリロードをお試しください。(P3501)";
                    return;
                } else {
                    this.kinds.ERROR_LIMIT = "Content Not Available";
                    this.kinds.ERROR_LIMIT_MESSAGE = "This content is not currently available.<br />This content is only available for a limited term.(P5001)";
                    this.kinds.ERROR_LIMIT_PRE_TITLE = "Content Not Available";
                    this.kinds.ERROR_LIMIT_PRE_MESSAGE = "This content is not in public yet.<br />This content will be available in the near future.(P5002)";
                    this.kinds.ERROR_LIMIT_OVER_TITLE = "Content Not Available";
                    this.kinds.ERROR_LIMIT_OVER_MESSAGE = "This content has been expired.<br />This content was only available for a limited term(P5003)";
                    this.kinds.ERROR_META_DATA_TITLE = "Player failed to load this content information";
                    this.kinds.ERROR_SETTING_TITLE = "Failed to load configuration files of this player";
                    this.kinds.ERROR_SETTING_DELETE = "This player configuration may have been deleted by the publisher.(P0501)";
                    this.kinds.ERROR_ENV_TITLE = "Unauthorized content.";
                    this.kinds.ERROR_ENV_MESSAGE = "Unauthorized content.(P5101:_STATUS_)";
                    this.kinds.SHARE_MOVIE = "Share This Content";
                    this.kinds.ERROR_META_DATA_MESSAGE = "This content may have been deleted by the publisher.(P1001)";
                    this.kinds.LINKS = "Related Link";
                    this.kinds.AUTH = "Enter ID/PW";
                    this.kinds.ERROR_AUTH = "Invalid ID or PW";
                    this.kinds.ID = "ID";
                    this.kinds.PASS = "PASSWORD";
                    this.kinds.PLAY = "PLAY";
                    this.kinds.Label_Low = "Low";
                    this.kinds.Label_Standard = "Standard";
                    this.kinds.Label_High = "High";
                    this.kinds.Label_HD = "HD";
                    this.kinds.Label_FullHD = "FullHD";
                    this.kinds.Label_4K = "4K";
                    this.kinds.Label_Auto = "AUTO";
                    this.kinds.Replay = "Replay";
                    this.kinds.ERROR_TITLE = "Error";
                    this.kinds.ERROR_MOVIE_NOT_FOUND = "Movie not found(P7011)";
                    this.kinds.ERROR_NO_FLASH_TITLE = "flashPlayer not found";
                    this.kinds.ERROR_NO_FLASH_MESSAGE = '<span style="color:#fff">Require "Flash Player" to play this content. Please<br /><a target="_blank" href="//www.adobe.com/go/getflashplayer" style="color:#ff0">install the Flash Player.</a>(P0102)</span>';
                    this.kinds.ERROR_NO_FLASH_ANDROID_TITLE = "flashPlayer not found";
                    this.kinds.ERROR_NO_FLASH_ANDROID_MESSAGE = "This content is unavailable to you because your device doesn't support Flash Player.(P0103)";
                    this.kinds.ERROR_SERVICE_TITLE = "Failed to load configuration files of this serivce";
                    this.kinds.ERROR_SERVICE_DELETE = "This service configuration may have been deleted by the publisher.(P2001)";
                    this.kinds.ERROR_LIVE_RELOAD = "Live broadcast is interrupted.<br />Please try reload this page.(P7101)";
                    this.kinds.P1201T = "Player failed to load this live information";
                    this.kinds.P1201M = "This live may be canceled.(P1201)";
                    this.kinds.P3001T = "Player failed to load live status.";
                    this.kinds.P3001M = "Please try reload this page.(P3001)";
                    this.kinds.P3501T = "Player failed to load live status.";
                    this.kinds.P3501M = "Please try reload this page.(P3501)";
                }
            };
            LanguageResource.prototype.setUpResource = function (languageResouce) {
                this.kinds.ERROR_LIMIT = (languageResouce["title_P5001"] != null) ? languageResouce["title_P5001"] : this.kinds.ERROR_LIMIT;
                this.kinds.ERROR_LIMIT_MESSAGE = (languageResouce["info_P5001"] != null) ? languageResouce["info_P5001"] : this.kinds.ERROR_LIMIT_MESSAGE;
                this.kinds.ERROR_LIMIT_PRE_TITLE = (languageResouce["title_P5002"] != null) ? languageResouce["title_P5002"] : this.kinds.ERROR_LIMIT_PRE_TITLE;
                this.kinds.ERROR_LIMIT_PRE_MESSAGE = (languageResouce["info_P5002"] != null) ? languageResouce["info_P5002"] : this.kinds.ERROR_LIMIT_PRE_MESSAGE;
                this.kinds.ERROR_LIMIT_OVER_TITLE = (languageResouce["title_P5003"] != null) ? languageResouce["title_P5003"] : this.kinds.ERROR_LIMIT_OVER_TITLE;
                this.kinds.ERROR_LIMIT_OVER_MESSAGE = (languageResouce["info_P5003"] != null) ? languageResouce["info_P5003"] : this.kinds.ERROR_LIMIT_OVER_MESSAGE;
                this.kinds.ERROR_META_DATA_TITLE = (languageResouce["title_P1001"] != null) ? languageResouce["title_P1001"] : this.kinds.ERROR_META_DATA_TITLE;
                this.kinds.ERROR_META_DATA_MESSAGE = (languageResouce["info_P1001"] != null) ? languageResouce["info_P1001"] : this.kinds.ERROR_META_DATA_MESSAGE;
                this.kinds.ERROR_SETTING_TITLE = (languageResouce["title_P0501"] != null) ? languageResouce["title_P0501"] : this.kinds.ERROR_SETTING_TITLE;
                this.kinds.ERROR_SETTING_DELETE = (languageResouce["info_P0501"] != null) ? languageResouce["info_P0501"] : this.kinds.ERROR_SETTING_DELETE;
                this.kinds.ERROR_ENV_TITLE = (languageResouce["title_P5101"] != null) ? languageResouce["title_P5101"] : this.kinds.ERROR_ENV_TITLE;
                this.kinds.ERROR_ENV_MESSAGE = (languageResouce["info_P5101"] != null) ? languageResouce["info_P5101"] : this.kinds.ERROR_ENV_MESSAGE;
                this.kinds.SHARE_MOVIE = (languageResouce["title_share_movie"] != null) ? languageResouce["title_share_movie"] : this.kinds.ERROR_LIMIT;
                this.kinds.LINKS = (languageResouce["title_links"] != null) ? languageResouce["title_links"] : this.kinds.LINKS;
                this.kinds.AUTH = (languageResouce["title_auth"] != null) ? languageResouce["title_auth"] : this.kinds.AUTH;
                this.kinds.ERROR_AUTH = (languageResouce["title_auth_error"] != null) ? languageResouce["title_auth_error"] : this.kinds.ERROR_AUTH;
                this.kinds.ID = (languageResouce["hint_id"] != null) ? languageResouce["hint_id"] : this.kinds.ID;
                this.kinds.PASS = (languageResouce["hint_pass"] != null) ? languageResouce["hint_pass"] : this.kinds.PASS;
                this.kinds.PLAY = (languageResouce["btn_play"] != null) ? languageResouce["btn_play"] : this.kinds.PLAY;
                this.kinds.Label_Low = (languageResouce["label_Low"] != null) ? languageResouce["label_Low"] : this.kinds.Label_Low;
                this.kinds.Label_Standard = (languageResouce["label_Standard"] != null) ? languageResouce["label_Standard"] : this.kinds.Label_Standard;
                this.kinds.Label_High = (languageResouce["label_High"] != null) ? languageResouce["label_High"] : this.kinds.Label_High;
                this.kinds.Label_HD = (languageResouce["label_HD"] != null) ? languageResouce["label_HD"] : this.kinds.Label_HD;
                this.kinds.Label_FullHD = (languageResouce["label_FullHD"] != null) ? languageResouce["label_FullHD"] : this.kinds.Label_FullHD;
                this.kinds.Label_4K = (languageResouce["label_4K"] != null) ? languageResouce["label_4K"] : this.kinds.Label_4K;
                this.kinds.Label_4K = (languageResouce["label_Auto"] != null) ? languageResouce["label_Auto"] : this.kinds.Label_Auto;
                this.kinds.Replay = (languageResouce["label_replay"] != null) ? languageResouce["label_replay"] : this.kinds.Replay;
                this.kinds.ERROR_TITLE = (languageResouce["title_P7011"] != null) ? languageResouce["title_P7011"] : this.kinds.ERROR_TITLE;
                this.kinds.ERROR_MOVIE_NOT_FOUND = (languageResouce["info_P7011"] != null) ? languageResouce["info_P7011"] : this.kinds.ERROR_MOVIE_NOT_FOUND;
                this.kinds.ERROR_NO_FLASH_TITLE = (languageResouce["title_P0102"] != null) ? languageResouce["title_P0102"] : this.kinds.ERROR_NO_FLASH_TITLE;
                this.kinds.ERROR_NO_FLASH_MESSAGE = (languageResouce["info_P0102"] != null) ? languageResouce["info_P0102"] : this.kinds.ERROR_NO_FLASH_MESSAGE;
                this.kinds.ERROR_NO_FLASH_ANDROID_TITLE = (languageResouce["title_P0103"] != null) ? languageResouce["title_P0103"] : this.kinds.ERROR_NO_FLASH_ANDROID_TITLE;
                this.kinds.ERROR_NO_FLASH_ANDROID_MESSAGE = (languageResouce["info_P0103"] != null) ? languageResouce["info_P0103"] : this.kinds.ERROR_NO_FLASH_ANDROID_MESSAGE;
                this.kinds.ERROR_SERVICE_TITLE = (languageResouce["title_P2001"] != null) ? languageResouce["title_P2001"] : this.kinds.ERROR_SERVICE_TITLE;
                this.kinds.ERROR_SERVICE_DELETE = (languageResouce["info_P2001"] != null) ? languageResouce["info_P2001"] : this.kinds.ERROR_SERVICE_DELETE;
                this.kinds.ERROR_LIVE_RELOAD = (languageResouce["info_P7101"] != null) ? languageResouce["info_P7101"] : this.kinds.ERROR_LIVE_RELOAD;
                this.kinds.P1201T = (languageResouce["title_P1201"] != null) ? languageResouce["title_P1201"] : this.kinds.P1201T;
                this.kinds.P1201M = (languageResouce["info_P1201"] != null) ? languageResouce["info_P1201"] : this.kinds.P1201M;
                this.kinds.P3501T = (languageResouce["title_P3501"] != null) ? languageResouce["title_P3501"] : this.kinds.P3501T;
                this.kinds.P3501M = (languageResouce["info_P3501"] != null) ? languageResouce["info_P3501"] : this.kinds.P3501M;
                return;
            };
            return LanguageResource;
        })();
        resource.LanguageResource = LanguageResource;
    })(jstream_t3.resource || (jstream_t3.resource = {}));
    var resource = jstream_t3.resource;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (utils) {
        var PlayerSetting = (function () {
            function PlayerSetting() {
            }
            PlayerSetting.setPlayerPreSetting = function (plyerId, params) {
                var setting;

                switch (plyerId.toString()) {
                    case "1":
                        setting = {
                            "name": "Syndication01",
                            "movie_width": "640",
                            "movie_height": "360",
                            "movie_aspect": "16:9",
                            "movie_protocol": "rtmp",
                            "play_use": "on",
                            "volume_use": "on",
                            "seak_use": "on",
                            "fullscreen_use": "on",
                            "footer_use": "off",
                            "title_use": "on",
                            "init_sound": "on",
                            "init_play": "off",
                            "embed_width": "640",
                            "embed_height": "360",
                            "va_use": "on",
                            "exlink_use": "on",
                            "tag_use": "off",
                            "multibitrate_use": "on",
                            "sns_use": "off"
                        };
                        break;
                    case "2":
                        setting = {
                            "name": "Syndication02",
                            "movie_width": "640",
                            "movie_height": "360",
                            "movie_aspect": "16:9",
                            "movie_protocol": "rtmp",
                            "play_use": "on",
                            "volume_use": "on",
                            "seak_use": "on",
                            "fullscreen_use": "on",
                            "footer_use": "off",
                            "title_use": "on",
                            "init_sound": "on",
                            "init_play": "off",
                            "embed_width": "640",
                            "embed_height": "360",
                            "va_use": "on",
                            "exlink_use": "on",
                            "tag_use": "off",
                            "multibitrate_use": "on",
                            "sns_use": "on",
                            "sns_id_list": ["facebook", "twitter", "line", "google"]
                        };
                        break;
                    case "3":
                        setting = {
                            "name": "Syndication03",
                            "movie_width": "640",
                            "movie_height": "360",
                            "movie_aspect": "16:9",
                            "movie_protocol": "rtmp",
                            "play_use": "on",
                            "volume_use": "on",
                            "seak_use": "on",
                            "fullscreen_use": "on",
                            "footer_use": "off",
                            "title_use": "on",
                            "init_sound": "on",
                            "init_play": "off",
                            "embed_width": "640",
                            "embed_height": "360",
                            "va_use": "on",
                            "exlink_use": "on",
                            "tag_use": "off",
                            "multibitrate_use": "on",
                            "sns_use": "off"
                        };
                        break;
                    case "4":
                        setting = {
                            "name": "Syndication04",
                            "movie_width": "640",
                            "movie_height": "360",
                            "movie_aspect": "16:9",
                            "movie_protocol": "rtmp",
                            "play_use": "on",
                            "volume_use": "on",
                            "seak_use": "on",
                            "fullscreen_use": "on",
                            "footer_use": "off",
                            "title_use": "on",
                            "init_sound": "on",
                            "init_play": "off",
                            "embed_width": "640",
                            "embed_height": "360",
                            "va_use": "on",
                            "exlink_use": "off",
                            "tag_use": "off",
                            "multibitrate_use": "on",
                            "sns_use": "on",
                            "sns_id_list": ["facebook", "twitter", "line", "google"]
                        };
                        break;
                    case "5":
                        setting = {
                            "name": "Syndication05",
                            "movie_width": "640",
                            "movie_height": "360",
                            "movie_aspect": "16:9",
                            "movie_protocol": "rtmp",
                            "play_use": "on",
                            "volume_use": "on",
                            "seak_use": "on",
                            "fullscreen_use": "on",
                            "footer_use": "off",
                            "title_use": "on",
                            "init_sound": "on",
                            "init_play": "off",
                            "embed_width": "640",
                            "embed_height": "360",
                            "va_use": "on",
                            "exlink_use": "off",
                            "tag_use": "off",
                            "multibitrate_use": "on",
                            "sns_use": "off"
                        };
                        break;
                    case "101":
                        setting = {
                            "name": "Syndication101",
                            "movie_width": "640",
                            "movie_height": "360",
                            "movie_aspect": "16:9",
                            "movie_protocol": "rtmp",
                            "play_use": "on",
                            "volume_use": "on",
                            "seak_use": "on",
                            "fullscreen_use": "on",
                            "footer_use": "off",
                            "title_use": "on",
                            "init_sound": "on",
                            "init_play": "on",
                            "embed_width": "640",
                            "embed_height": "360",
                            "va_use": "on",
                            "exlink_use": "on",
                            "tag_use": "off",
                            "multibitrate_use": "on",
                            "sns_use": "off"
                        };
                        break;
                    case "102":
                        setting = {
                            "name": "Syndication102",
                            "movie_width": "640",
                            "movie_height": "360",
                            "movie_aspect": "16:9",
                            "movie_protocol": "rtmp",
                            "play_use": "on",
                            "volume_use": "on",
                            "seak_use": "on",
                            "fullscreen_use": "on",
                            "footer_use": "off",
                            "title_use": "on",
                            "init_sound": "on",
                            "init_play": "on",
                            "embed_width": "640",
                            "embed_height": "360",
                            "va_use": "on",
                            "exlink_use": "on",
                            "tag_use": "off",
                            "multibitrate_use": "on",
                            "sns_use": "on",
                            "sns_id_list": ["facebook", "twitter", "line", "google"]
                        };
                        break;
                    case "103":
                        setting = {
                            "name": "Syndication103",
                            "movie_width": "640",
                            "movie_height": "360",
                            "movie_aspect": "16:9",
                            "movie_protocol": "rtmp",
                            "play_use": "on",
                            "volume_use": "on",
                            "seak_use": "on",
                            "fullscreen_use": "on",
                            "footer_use": "off",
                            "title_use": "on",
                            "init_sound": "on",
                            "init_play": "on",
                            "embed_width": "640",
                            "embed_height": "360",
                            "va_use": "on",
                            "exlink_use": "on",
                            "tag_use": "off",
                            "multibitrate_use": "on",
                            "sns_use": "off"
                        };
                        break;
                    case "104":
                        setting = {
                            "name": "Syndication104",
                            "movie_width": "640",
                            "movie_height": "360",
                            "movie_aspect": "16:9",
                            "movie_protocol": "rtmp",
                            "play_use": "on",
                            "volume_use": "on",
                            "seak_use": "on",
                            "fullscreen_use": "on",
                            "footer_use": "off",
                            "title_use": "on",
                            "init_sound": "on",
                            "init_play": "on",
                            "embed_width": "640",
                            "embed_height": "360",
                            "va_use": "on",
                            "exlink_use": "off",
                            "tag_use": "off",
                            "multibitrate_use": "on",
                            "sns_use": "on",
                            "sns_id_list": ["facebook", "twitter", "line", "google"]
                        };
                        break;
                    case "105":
                        setting = {
                            "name": "Syndication105",
                            "movie_width": "640",
                            "movie_height": "360",
                            "movie_aspect": "16:9",
                            "movie_protocol": "rtmp",
                            "play_use": "on",
                            "volume_use": "on",
                            "seak_use": "on",
                            "fullscreen_use": "on",
                            "footer_use": "off",
                            "title_use": "on",
                            "init_sound": "on",
                            "init_play": "on",
                            "embed_width": "640",
                            "embed_height": "360",
                            "va_use": "on",
                            "exlink_use": "off",
                            "tag_use": "off",
                            "multibitrate_use": "on",
                            "sns_use": "off"
                        };
                        break;
                }

                for (var key in setting) {
                    params[key] = setting[key];
                }
            };
            return PlayerSetting;
        })();
        utils.PlayerSetting = PlayerSetting;
    })(jstream_t3.utils || (jstream_t3.utils = {}));
    var utils = jstream_t3.utils;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (model) {
        var NetServiceModel = (function () {
            function NetServiceModel() {
            }
            return NetServiceModel;
        })();
        model.NetServiceModel = NetServiceModel;
    })(jstream_t3.model || (jstream_t3.model = {}));
    var model = jstream_t3.model;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (view) {
        var AlertView = (function () {
            function AlertView() {
            }
            AlertView.show = function (message, title, parentElementId, cssDir) {
                if (typeof title === "undefined") { title = ""; }
                if (typeof parentElementId === "undefined") { parentElementId = null; }
                if (typeof cssDir === "undefined") { cssDir = ""; }
                var errorAlert = '<div class="errorDialog" style="top:0px;left:0px;right:0px;bottom:0px;margin:auto;height:134px"><div class="errorDialogHeader"><div class="hl"><img src="' + cssDir + 'e_ico.png"" style="margin-right:10px;" />#head</div><div class="hr"></div></div><div class="errorContent"><div class="bl"><p id="jsterrormessage">#message</p></div><div class="br"></div></div></div>';
                errorAlert = errorAlert.split("#head").join(title);
                errorAlert = errorAlert.split("#message").join(message);
                var targetElement = !parentElementId ? document.body : document.getElementById(parentElementId);
                targetElement.innerHTML = errorAlert;
                var bl = targetElement.getElementsByTagName("p")[0];
                bl.style.top = ((84 - bl.clientHeight) / 2).toString() + 'px';
            };
            return AlertView;
        })();
        view.AlertView = AlertView;
    })(jstream_t3.view || (jstream_t3.view = {}));
    var view = jstream_t3.view;
})(jstream_t3 || (jstream_t3 = {}));
var __extends = this.__extends || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    __.prototype = b.prototype;
    d.prototype = new __();
};
var jstream_t3;
(function (jstream_t3) {
    (function (parser) {
        var EmbedTagBuilder = (function () {
            function EmbedTagBuilder() {
            }
            EmbedTagBuilder.create = function (params) {
                var Class;
                if (params.tagType == "player_1_0_0") {
                    if (params.stype == null) {
                        Class = Onetag10;
                    } else {
                        Class = Syn10;
                    }
                } else {
                    if (params.stype == null) {
                        Class = Onetag16;
                    } else {
                        Class = Syn16;
                    }
                }
                var result = new Class();
                result.createTag(params);
                return result;
            };
            return EmbedTagBuilder;
        })();
        parser.EmbedTagBuilder = EmbedTagBuilder;

        var TagBase = (function () {
            function TagBase() {
            }
            TagBase.prototype.getTag = function () {
                return this.tag;
            };
            return TagBase;
        })();
        parser.TagBase = TagBase;

        var Onetag10 = (function (_super) {
            __extends(Onetag10, _super);
            function Onetag10() {
                _super.apply(this, arguments);
            }
            Onetag10.prototype.createTag = function (params) {
                var list, source, url;
                list = window.location.href.split("/");
                url = "http://" + list[4] + "." + "webcdn.stream.ne.jp/" + list.slice(3).join("/").split("?")[0];
                source = "<script language=\"javascript\">document.write('<iframe frameborder=\"0\" src=\"" + url + "?c=#contract_id&m=#meta_id&s=#setting##start_time##plugins##va_url#&file_id=#file_id&parent_url='+encodeURIComponent(window.location.href) +'&ref=' + encodeURIComponent(document.referrer) + '\" width=\"" + params.width + "\" height=\"" + params.height + "\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden;\" allowtransparency=\"true\"></iframe>');</script>";
                source = source.split("#contract_id").join(jstream_t3.utils.Util.obfuscate(params.contract_id)).split("#meta_id").join(jstream_t3.utils.Util.obfuscate(params.meta_id)).split("#file_id").join(params.file_id);

                var settings = "";
                if (params.s) {
                    if (params.s.ft) {
                        params.s.ft = decodeURIComponent(params.s.ft);
                    }
                    settings = jstream_t3.utils.Util.toJSON(params.s);
                    settings = encodeURIComponent(settings);
                }
                source = source.split("#setting#").join(settings);

                if (params.start_time) {
                    source = source.split("#start_time#").join(", t: " + params.start_time);
                } else {
                    source = source.split("#start_time#").join("");
                }
                if (params.plugins) {
                    source = source.split("#plugins#").join(", p: \"" + params.plugins + "\"");
                } else {
                    source = source.split("#plugins#").join("");
                }

                if (params.va_url) {
                    source = source.split("#va_url#").join(", v: \"" + params.va_url + "\"");
                } else {
                    source = source.split("#va_url#").join("");
                }

                this.tag = source;
            };

            Onetag10.prototype.getTag = function () {
                return this.tag;
            };
            return Onetag10;
        })(TagBase);
        parser.Onetag10 = Onetag10;

        var Onetag16 = (function (_super) {
            __extends(Onetag16, _super);
            function Onetag16() {
                _super.apply(this, arguments);
            }
            Onetag16.prototype.createTag = function (params) {
                var source = '<script type="text/javascript" src="https://ssl-cache.stream.ne.jp/#playerDir#t3/#type_exp#.js" charset="UTF-8"></script><script type="text/javascript">jstream_t3.PlayerFactory#type#.create({b: "#playerURI#",c: "#contract_id#",m: "#meta_id#",s: #setting##start_time##plugins##va_url##object#});</script>';
                if (params.isIframe) {
                    source = source.split("#type_exp#").join("if");
                    source = source.split("#type#").join("IF");
                } else {
                    source = source.split("#type_exp#").join("obj");
                    source = source.split("#type#").join("OBJ");
                }

                source = source.split("#playerDir#").join(params.base.split("://")[1].split("/").slice(1).join("/"));
                source = source.split("#playerURI#").join(params.base.split("://")[1]);
                source = source.split("#contract_id#").join(jstream_t3.utils.Util.base64encode(params.contract_id));
                source = source.split("#meta_id#").join(jstream_t3.utils.Util.base64encode(params.meta_id));

                var settings = "";
                if (params.s) {
                    if (params.s.ft) {
                        params.s.ft = decodeURIComponent(params.s.ft);
                    }
                    if (params.s.rp == "on" || params.s.rp == "fit") {
                        params.s.rp = "off";
                        params.s.hp = 270;
                        params.s.wp = 480;
                    }
                    settings = jstream_t3.utils.Util.toJSON(params.s);
                }
                source = source.split("#setting#").join(settings);

                if (params.start_time) {
                    source = source.split("#start_time#").join(", t: " + params.start_time);
                } else {
                    source = source.split("#start_time#").join("");
                }
                if (params.plugins) {
                    source = source.split("#plugins#").join(", p: \"" + params.plugins + "\"");
                } else {
                    source = source.split("#plugins#").join("");
                }

                if (params.va_url) {
                    source = source.split("#va_url#").join(", v: \"" + params.va_url + "\"");
                } else {
                    source = source.split("#va_url#").join("");
                }

                var objects = "";
                if (params.o) {
                    objects = jstream_t3.utils.Util.toJSONforCustomVA(params.o);
                    source = source.split("#object#").join(", o: " + objects);
                } else {
                    source = source.split("#object#").join("");
                }
                if (params.useInboundLink()) {
                    source += '<br><a href="' + params.inbound_link["url"] + '">' + params.inbound_link["link"] + '</a>';
                }

                this.tag = source;
            };
            return Onetag16;
        })(TagBase);
        parser.Onetag16 = Onetag16;

        var Syn10 = (function (_super) {
            __extends(Syn10, _super);
            function Syn10() {
                _super.apply(this, arguments);
            }
            Syn10.prototype.createTag = function (params) {
                this.tag = "";
            };
            return Syn10;
        })(TagBase);
        parser.Syn10 = Syn10;

        var Syn16 = (function (_super) {
            __extends(Syn16, _super);
            function Syn16() {
                _super.apply(this, arguments);
            }
            Syn16.prototype.createTag = function (params) {
                this.tag = "";
            };
            return Syn16;
        })(TagBase);
        parser.Syn16 = Syn16;
    })(jstream_t3.parser || (jstream_t3.parser = {}));
    var parser = jstream_t3.parser;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (events) {
        var ErrorEvent = (function (_super) {
            __extends(ErrorEvent, _super);
            function ErrorEvent(code, message, subject) {
                if (typeof message === "undefined") { message = ""; }
                if (typeof subject === "undefined") { subject = ""; }
                _super.call(this, "error");
                this.code = code;
                this.message = message;
                this.subject = subject;
            }
            ErrorEvent.METAINFO_LOAD_ERROR = "MetaInfo.LoadError";
            ErrorEvent.SETTINGS_LOAD_ERROR = "PlayerSettings.LoadError";
            ErrorEvent.SERVICE_SETTING_ERROR = "ServiceSettings.LoadError";
            ErrorEvent.VIEWLIMIT_DISABLED = "ViewLimit.Disabled";
            ErrorEvent.SERVER_MEDIA_ERROR = "Server.MediaError";
            ErrorEvent.FLASHPLAYER_VERSION_ERROR = "FlashPlayer.VersionError";
            ErrorEvent.LIVELIMIT_LOAD_ERROR = "LiveLimit.LoadError";
            ErrorEvent.LIDSETTINGS_LOAD_ERROR = "LidSettings.LoadError";
            ErrorEvent.AUTHENTICATION_FAILED = "Authentication.Failed";
            return ErrorEvent;
        })(jstream_t3.events.Event);
        events.ErrorEvent = ErrorEvent;
    })(jstream_t3.events || (jstream_t3.events = {}));
    var events = jstream_t3.events;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (model) {
        var EQPlayerModel = (function () {
            function EQPlayerModel(params) {
                if (typeof params === "undefined") { params = null; }
                this.pd_enable = "0";
                this.ssl_url = "https://ssl-cache.stream.ne.jp";
                this.time_use = "on";
                this.isLive = false;
                this.auth = "0";
                this.a = "";
                this.auth_mode = "and";
                this.hostCheckResult = "none";
                this.isAuthPassed = false;
                this.api_url = "api01-platform.stream.co.jp";
                this.syndicationapi_url = "syndication-api.stream.co.jp/ec/";
                this.isThumbnail = false;
                this.vc = null;
                this.resumeEnable = "off";
                this.resumeVolumeEnable = "on";
                this.inCookieCurrentTime = "0";
                this.inCookieVolume = "100";
                this._thumbnailURL = null;
                var prop;
                for (prop in params) {
                    if (prop == "isAuthPassed") {
                        var authPassedParam = jstream_t3.utils.Util.base64decode(params[prop]);
                        var date = new Date();
                        var toDay = date.getFullYear().toString() + (date.getMonth() + 1).toString() + date.getDate().toString();
                        var passedKey = "true" + toDay;
                        if (authPassedParam == passedKey) {
                            this[prop] = true;
                        } else {
                            this[prop] = false;
                        }
                    } else {
                        this[prop] = params[prop];
                    }
                }
            }
            EQPlayerModel.prototype.getSSLDomain = function () {
                var p = jstream_t3.utils.Util.parse_uri(this.ssl_url);
                return p.authority;
            };

            EQPlayerModel.prototype.useInboundLink = function () {
                return (this.inboundlink_use == "on" && this.inbound_link && this.inbound_link["link"] != null && this.inbound_link["url"] != null);
            };

            EQPlayerModel.prototype.isPDPlayerEnable = function () {
                return this.pd_enable == "1";
            };

            EQPlayerModel.prototype.isAuthEnable = function () {
                if (this.auth == "1" && !this.isAuthPassed) {
                    if (!((this.auth_mode == "or" && this.hostCheckResult == "ok") || (this.auth_mode == "and" && this.hostCheckResult == "ng")))
                        return true;
                }
                return false;
            };

            EQPlayerModel.prototype.isMobilePlayer = function () {
                return this.getEnvironmentType() == jstream_t3.EnviromentKind.MOBILE_STREAMING || this.getEnvironmentType() == jstream_t3.EnviromentKind.MOBILE_PROGRESSIVE || this.getEnvironmentType() == jstream_t3.EnviromentKind.MOBILE_NATIVE;
            };

            EQPlayerModel.prototype.createServiceModel = function () {
                return new model.EQPlayerServiceModel(this);
            };

            EQPlayerModel.prototype.clone = function () {
                var result = new EQPlayerModel();
                var prop;
                for (prop in this) {
                    if (typeof this[prop] == "function") {
                        continue;
                    }

                    result[prop] = this[prop];
                }
                return result;
            };

            EQPlayerModel.prototype.onError = function (code, title, message) {
            };

            EQPlayerModel.prototype.parce = function () {
                var lang = "ja";
                if (jstream_t3.utils.Util.browserLanguage() != "ja") {
                    lang = "en";
                }
                var messages = new jstream_t3.resource.LanguageResource(this["language_resource_" + lang]);
                if (this.enable !== "1") {
                    this.onError(jstream_t3.events.ErrorEvent.VIEWLIMIT_DISABLED, messages.kinds.ERROR_LIMIT, messages.kinds.ERROR_LIMIT_MESSAGE);
                    return false;
                }

                if (this.parent_url == null || this.parent_url.indexOf("file") == 0 || this.parent_url.indexOf("http://localhost") == 0) {
                    this.va_use = "off";
                }

                if (typeof this.start_time == "string") {
                    this.start_time = parseInt(this.start_time);
                    if (isNaN(this.start_time)) {
                        this.start_time = 0;
                    }
                }

                if (this.start_time > parseInt(this.duration)) {
                    this.start_time = 0;
                }

                this.thumbnail_url = this.getThumbnailURL();
                this.convertMP4Path();
                jstream_t3.utils.Util.deleteNullItem(this.exlink);
                jstream_t3.utils.Util.deleteNullItem(this.multibitrate_list);
                this.tag_text = this.createTagText();

                this.setFooterAlign();

                this.setDefaultMovie();
                if (!this.isAuthPassed) {
                    this.setMovieMobileURL();
                }
                if (this.isAuthPassed) {
                    this.setMovieMobileURL_AfterAuth();
                }
                this.setQualityLabel();
                this.encodeText();

                return true;
            };

            EQPlayerModel.prototype.setFooterAlign = function () {
                switch (this.footer_align) {
                    case "L":
                        this.footer_align = "left";
                        break;
                    case "C":
                        this.footer_align = "center";
                        break;
                    case "R":
                        this.footer_align = "right";
                }
            };

            EQPlayerModel.prototype.getListFormat = function () {
                var result = [];
                for (var prop in this) {
                    if (typeof this[prop] != "function") {
                        var item = {};
                        item[prop] = this[prop];
                        result.push(item);
                    }
                }

                return result;
            };

            EQPlayerModel.prototype.getThumbnailURL = function () {
                if (!this.thumbnail_url) {
                    return "";
                }

                if (this._thumbnailURL == null) {
                    if (this.thumbnail_url.indexOf("http") === -1) {
                        this._thumbnailURL = "../../jmc_thumb/" + this.thumbnail_url;
                    } else if (window.location.protocol === "https:" && this.thumbnail_url.indexOf("https:") != 0) {
                        var list = this.thumbnail_url.split("http").join("https").split("/");
                        list[2] = this.getSSLDomain();
                        this._thumbnailURL = list.join("/");
                    } else {
                        this._thumbnailURL = this.thumbnail_url;
                    }
                }
                return this._thumbnailURL;
            };

            EQPlayerModel.prototype.getEnvironmentType = function () {
                if (jstream_t3.utils.Util.isMobileList().iOSP || jstream_t3.utils.Util.isMobileList().iOST) {
                    return jstream_t3.EnviromentKind.MOBILE_STREAMING;
                } else if ((jstream_t3.utils.Util.isMobileList().Android4 || jstream_t3.utils.Util.isMobileList().Firefox) && !jstream_t3.utils.Util.isFlash()) {
                    if (this.isPDPlayerEnable()) {
                        return jstream_t3.EnviromentKind.MOBILE_PROGRESSIVE;
                    } else {
                        return jstream_t3.EnviromentKind.MOBILE_NATIVE;
                    }
                } else if (!jstream_t3.utils.Util.isFlash()) {
                    return jstream_t3.EnviromentKind.NO_FLASH;
                } else {
                    return jstream_t3.EnviromentKind.PC_STREAMING;
                }
            };

            EQPlayerModel.prototype.encodeText = function () {
                if (this.isMobilePlayer()) {
                    this.title = jstream_t3.utils.Util.encodeHTMLEncode(this.title);
                }
                this.footer_text = jstream_t3.utils.Util.encodeHTMLEncode(this.footer_text);
            };

            EQPlayerModel.prototype.convertMP4Path = function () {
                var convert, i, _results;
                convert = function (src) {
                    var list;
                    if (src && src.indexOf("mp4:") > -1) {
                        return src;
                    }
                    if (src && src.indexOf("rtmp") > -1 && src.indexOf(".mp4") > -1) {
                        list = src.split("_definst_/");
                        list[1] = "mp4:" + list[1];
                        src = list.join("_definst_/");
                    }
                    return src;
                };
                this.movie_url = convert(this.movie_url);
                if (!this.movie_list) {
                    return;
                }
                i = 0;
                _results = [];
                while (i < this.movie_list.length) {
                    this.movie_list[i].url = convert(this.movie_list[i].url);
                    _results.push(i++);
                }
                return _results;
            };

            EQPlayerModel.prototype.createTagText = function () {
                var tagCreator = jstream_t3.parser.EmbedTagBuilder.create(this);
                return tagCreator.getTag();
            };

            EQPlayerModel.prototype.setDefaultMovie = function () {
                var qualityList = ["自動", "低画質", "標準画質", "高画質", "HD画質", "フルHD画質", "4K画質"];
                function getQualityURL(list, key) {
                    if (typeof (list) == "undefined")
                        return null;
                    for (var i = 0; i < list.length; i++) {
                        if (list[i].text == key) {
                            return list[i].url;
                        }
                    }
                    return null;
                }

                if (this.default_quality == null || parseInt(this.default_quality) == -1 || parseInt(this.default_quality) > 6) {
                    if (jstream_t3.utils.Util.isMobileList().iOSP) {
                        var qualityURL_mobile = getQualityURL(this.movie_list_mobile, qualityList[2]);
                        if (qualityURL_mobile) {
                            this.movie_url_mobile = qualityURL_mobile;
                        }
                    }
                    return;
                }

                var qualityKey = qualityList[this.default_quality];
                var qualityURL = getQualityURL(this.movie_list, qualityKey);
                if (qualityURL == null) {
                    var i = 0;
                    while (qualityURL == null && i < 7) {
                        qualityURL = getQualityURL(this.movie_list, qualityList[i]);

                        qualityKey = qualityList[this.default_quality];
                        i++;
                    }
                }
                if (qualityURL) {
                    this.movie_url = qualityURL;
                }

                var qualityURL_mobile = getQualityURL(this.movie_list_mobile, qualityList[this.default_quality]);

                if (qualityURL_mobile == null) {
                    var i = 0;
                    while (qualityURL_mobile == null && i < 7) {
                        qualityURL_mobile = getQualityURL(this.movie_list_mobile, qualityList[i]);

                        qualityKey = qualityList[this.default_quality];
                        i++;
                    }
                }
                if (qualityURL_mobile) {
                    this.movie_url_mobile = qualityURL_mobile;
                }
                if (this.movie_url_pd != null) {
                    var qualityURL_pd = getQualityURL(this.movie_list_pd, qualityList[this.default_quality]);
                    if (qualityURL_pd) {
                        var i = 0;
                        while (qualityURL_pd == null && i < 7) {
                            qualityURL_pd = getQualityURL(this.movie_list_mobile, qualityList[i]);

                            qualityKey = qualityList[this.default_quality];
                            i++;
                        }
                        this.movie_url_pd = qualityURL_pd;
                    }
                }
            };

            EQPlayerModel.prototype.setQualityLabel = function () {
                if (jstream_t3.utils.Util.browserLanguage() == "ja") {
                    return;
                }
                var changeQualityLabel = function (item) {
                    switch (item.text) {
                        case "4K画質":
                            item.text = "4K";
                            break;
                        case "フルHD画質":
                            item.text = "FullHD";
                            break;
                        case "HD画質":
                            item.text = "HD";
                            break;
                        case "高画質":
                            item.text = "High";
                            break;
                        case "標準画質":
                            item.text = "Standard";
                            break;
                        case "低画質":
                            item.text = "Low";
                            break;
                        case "自動":
                            item.text = "AUTO";
                            break;
                    }
                };

                var i = 0;
                var movie_list = this.movie_list;
                var movie_list_mobile = this.movie_list_mobile;
                var movie_list_pd = this.movie_list_pd;
                for (i = 0; i < movie_list.length; i++) {
                    changeQualityLabel(movie_list[i]);
                }
                if (movie_list_mobile)
                    for (i = 0; i < movie_list_mobile.length; i++) {
                        changeQualityLabel(movie_list_mobile[i]);
                    }
                if (movie_list_pd)
                    for (i = 0; i < movie_list_pd.length; i++) {
                        changeQualityLabel(movie_list_pd[i]);
                    }
            };

            EQPlayerModel.prototype.setMovieMobileURL = function () {
                if ((this.getEnvironmentType() != jstream_t3.EnviromentKind.MOBILE_STREAMING && this.getEnvironmentType() != jstream_t3.EnviromentKind.MOBILE_NATIVE) || !this.tk || (this.tk && this.viewlimit_flg != "1") || this.tk == "_NG_" || (this.tk && this.auth_mode == "and" && this.auth == "1")) {
                    this.changeMovieMobileURLforiOS();
                    return;
                }

                var changeMovieMobileURL = function (item, api, cid, mid, tk, dq) {
                    var url = item;
                    var quality;
                    if (dq == "自動" || dq == "AUTO") {
                        quality = "0";
                    } else {
                        quality = item.split("/").pop().split("_").pop().split(".", 1);
                    }
                    if (item.split("/")[4])
                        url = "http://" + api.split("/").slice(0, 2).join("/") + "/getPlayList/" + cid + "/" + mid + "/" + quality + "/" + tk + ".m3u8";
                    return url;
                };
                var default_quality;
                var movie_url_mobile = this.movie_url_mobile;
                var movie_list_mobile = this.movie_list_mobile;
                var cid = this.contract_id || this.maker_id;
                for (var i = 0; i < movie_list_mobile.length; i++) {
                    if (movie_url_mobile == movie_list_mobile[i].url) {
                        default_quality = movie_list_mobile[i].text;
                    }
                }
                this.movie_url_mobile = changeMovieMobileURL(movie_url_mobile, jstream_t3.utils.Util.getAPIServerURL(this.api_url), cid, this.meta_id, this.tk, default_quality);

                for (var i = 0; i < movie_list_mobile.length; i++) {
                    this.movie_list_mobile[i].url = changeMovieMobileURL(movie_list_mobile[i].url, jstream_t3.utils.Util.getAPIServerURL(this.api_url), cid, this.meta_id, this.tk, movie_list_mobile[i].text);
                }
                this.changeMovieMobileURLforiOS();
            };
            EQPlayerModel.prototype.setMovieMobileURL_AfterAuth = function () {
                if ((this.getEnvironmentType() != jstream_t3.EnviromentKind.MOBILE_STREAMING && this.getEnvironmentType() != jstream_t3.EnviromentKind.MOBILE_NATIVE) || !this.tk) {
                    return;
                }

                var changeMovieMobileURL = function (item, api, cid, mid, tk, dq) {
                    var url = item;
                    var quality;
                    if (dq == "自動" || dq == "AUTO") {
                        quality = "0";
                    } else {
                        quality = item.split("/").pop().split("_").pop().split(".", 1);
                    }
                    url = "http://" + api.split("/").slice(0, 2).join("/") + "/getPlayList/" + cid + "/" + mid + "/" + quality + "/" + tk + ".m3u8";
                    return url;
                };
                var default_quality;
                var movie_url_mobile = this.movie_url_mobile;
                var movie_list_mobile = this.movie_list_mobile;
                var cid = this.contract_id || this.maker_id;
                for (var i = 0; i < movie_list_mobile.length; i++) {
                    if (movie_url_mobile == movie_list_mobile[i].url) {
                        default_quality = movie_list_mobile[i].text;
                    }
                }
                this.movie_url_mobile = changeMovieMobileURL(movie_url_mobile, jstream_t3.utils.Util.getAPIServerURL(this.api_url), cid, this.meta_id, this.tk, default_quality);

                for (var i = 0; i < movie_list_mobile.length; i++) {
                    this.movie_list_mobile[i].url = changeMovieMobileURL(movie_list_mobile[i].url, jstream_t3.utils.Util.getAPIServerURL(this.api_url), cid, this.meta_id, this.tk, movie_list_mobile[i].text);
                }
                this.changeMovieMobileURLforiOS();
            };
            EQPlayerModel.prototype.changeMovieMobileURLforiOS = function () {
                if (/iP(hone|od|ad)/.test(navigator.userAgent) && window.location.protocol === "https:") {
                    for (var i = 0; i < this.movie_list_mobile.length; i++) {
                        this.movie_list_mobile[i].url = this.replaceToSSL(this.movie_list_mobile[i].url);
                    }
                    this.movie_url_mobile = this.replaceToSSL(this.movie_url_mobile);
                }
            };
            EQPlayerModel.prototype.replaceToSSL = function (url) {
                var replacedUrl;
                var reg = /^http:/;
                replacedUrl = url.replace(reg, "https:");
                return replacedUrl;
            };

            EQPlayerModel.prototype.isFooder = function () {
                return this.footer_use === "on" && (this.footer_text != null) && this.footer_text !== "";
            };

            EQPlayerModel.prototype.isVa = function () {
                if (this.tagType == "player_1_0_0" && this.isMobilePlayer()) {
                    return false;
                }
                return (this.va_use == "on" && (window.location.protocol.indexOf("file") != 0));
            };

            EQPlayerModel.prototype.createVarsParam = function () {
                return jstream_t3.utils.Util.escapeObject(this);
            };

            EQPlayerModel.prototype.setTagSize = function (fieldID) {
                var movieWidth = this.movie_width || 150;
                var movieHeight = this.movie_height || 136;
                var divTagID = fieldID;
                var divTag = document.getElementById(divTagID);
                var divTagMaxWidth;
                var divTagMaxHeight;
                var divTagWidth = divTag.clientWidth;
                var divTagHeight = divTag.clientHeight;

                var setW = this.width;
                var setH = this.height;

                var ftHeight = (this.footer_use === 'on') ? 20 : 0;
                if (setW == "eq-auto" || setH == "eq-auto") {
                    if (divTagWidth <= 0 || divTagWidth == null) {
                        divTagMaxWidth = Number(movieWidth);
                        divTagMaxHeight = Number(movieHeight) + ftHeight;
                    } else if (divTagHeight <= 24 || divTagHeight == null) {
                        divTagMaxWidth = Number(divTagWidth);
                        divTagMaxHeight = Math.ceil((movieHeight / movieWidth) * divTagWidth) + ftHeight;
                    } else {
                        divTagMaxWidth = Number(divTagWidth);
                        divTagMaxHeight = Number(divTagHeight);
                    }
                } else if (!isNaN(parseInt(setW)) && !isNaN(parseInt(setH))) {
                    setW = parseInt(setW);
                    setH = parseInt(setH);
                    if (setW > divTagWidth && divTagWidth > 150) {
                        divTagMaxWidth = Number(divTagWidth);
                        divTagMaxHeight = Math.ceil((movieHeight / movieWidth) * divTagWidth) + ftHeight;
                    } else {
                        divTagMaxWidth = Number(setW);
                        divTagMaxHeight = Number(setH);
                    }
                } else {
                    divTagMaxWidth = Number(movieWidth);
                    divTagMaxHeight = Number(movieHeight) + ftHeight;
                }
                divTag.style.width = divTagMaxWidth.toString() + 'px';
                divTag.style.height = divTagMaxHeight.toString() + 'px';
                this.width = divTagMaxWidth;
                this.height = divTagMaxHeight;
            };

            EQPlayerModel.prototype.destroy = function () {
                for (var prop in this) {
                    this[prop] = null;
                }
            };
            return EQPlayerModel;
        })();
        model.EQPlayerModel = EQPlayerModel;
    })(jstream_t3.model || (jstream_t3.model = {}));
    var model = jstream_t3.model;
})(jstream_t3 || (jstream_t3 = {}));

var jstream_t3;
(function (jstream_t3) {
    var EnviromentKind = (function () {
        function EnviromentKind() {
        }
        EnviromentKind.PC_STREAMING = "pcStreaming";
        EnviromentKind.MOBILE_STREAMING = "mobileStreaming";
        EnviromentKind.MOBILE_PROGRESSIVE = "mobileProgressive";
        EnviromentKind.MOBILE_NATIVE = "mobileNative";
        EnviromentKind.NO_FLASH = "noFlash";
        return EnviromentKind;
    })();
    jstream_t3.EnviromentKind = EnviromentKind;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    var jstream_player_version = "player_1_18_0";

    var version = (function () {
        function version() {
        }
        version.getVersion = function () {
            return "player_1_18_0";
        };
        version.getAsemVersion = function () {
            return "1.18.0r2015081101";
        };
        return version;
    })();
    jstream_t3.version = version;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (model) {
        var EQPlayerLiveModel = (function (_super) {
            __extends(EQPlayerLiveModel, _super);
            function EQPlayerLiveModel(params) {
                if (typeof params === "undefined") { params = null; }
                _super.call(this, params);
                this.isLive = true;
                this.interval = 0;
                this._liveLidURL = null;
            }
            EQPlayerLiveModel.prototype.parseLive = function () {
                this.seak_use = "off";
                this.time_use = "off";
                this.title_use = "off";
                this.va_use = "off";
                this.sns_use = "off";
                this.tag_use = "off";
                this.init_play = "on";

                if (this.start_time) {
                    this.start_time = 0;
                }

                this.setFooterAlign();
                this.setDefaultQuality();
                this.setLiveList();
                this.setLiveHTML5List();
                this.setLiveHLSUrl();
                this.setLivePreviewList();

                return true;
            };

            EQPlayerLiveModel.prototype.createLiveServiceModel = function () {
                return new model.EQPlayerLiveServiceModel(this);
            };

            EQPlayerLiveModel.prototype.getPlayerVersion = function () {
                return jstream_t3.version.getVersion();
                ;
            };

            EQPlayerLiveModel.prototype.setDefaultQuality = function () {
                var def_quality;

                if (this.default_quality != null && (parseInt(this.default_quality) > 0 && parseInt(this.default_quality) <= 3)) {
                    def_quality = this.default_quality;
                } else if (jstream_t3.utils.Util.isMobileList().iOSP || (this.getEnvironmentType() == jstream_t3.EnviromentKind.MOBILE_NATIVE)) {
                    def_quality = '1';
                } else {
                    def_quality = '2';
                }

                var len = this.getPropertyNum(this.quality);
                for (var i = def_quality; i > 0; i--) {
                    if (this.quality.hasOwnProperty(i)) {
                        this.default_quality = i;
                        return;
                    }
                }
                for (var i = def_quality; i < 4; i++) {
                    if (this.quality.hasOwnProperty(i)) {
                        this.default_quality = i;
                        return;
                    }
                }
            };

            EQPlayerLiveModel.prototype.setLiveList = function () {
                var i, prop;
                var liveListAll = [];
                var codec = "hds";

                var qualityLen = this.getPropertyNum(this.quality);

                var streamIndex = 0;
                while (streamIndex < 2) {
                    var liveList = [];
                    i = 1;
                    for (prop in this.quality) {
                        var liveURLSetting = {};
                        liveURLSetting = {
                            "quality": prop,
                            "url": this.list[codec][prop][streamIndex],
                            "text": this.quality[prop].ja,
                            "text_en": this.quality[prop].en
                        };
                        liveList[qualityLen - i] = liveURLSetting;
                        i++;
                    }
                    liveListAll[streamIndex] = liveList;
                    streamIndex++;
                }
                this.movie_list = liveListAll;
            };

            EQPlayerLiveModel.prototype.setLiveHTML5List = function () {
                if (this.getEnvironmentType() != jstream_t3.EnviromentKind.MOBILE_STREAMING) {
                    return;
                }

                var i, prop;
                var codec = "nested_hls";
                var qualityLen = this.getPropertyNum(this.quality);

                this.movie_url_mobile = this.list[codec][this.default_quality][0];

                var movieListMobileAll = [];
                i = 1;
                for (prop in this.quality) {
                    var liveMobileURLSetting = {};
                    liveMobileURLSetting = {
                        "url": this.list[codec][prop][0],
                        "text": this.quality[prop].ja
                    };
                    movieListMobileAll[qualityLen - i] = liveMobileURLSetting;
                    i++;
                }
                this.movie_list_mobile = movieListMobileAll;
            };

            EQPlayerLiveModel.prototype.setLiveHLSUrl = function () {
                if (this.getEnvironmentType() != jstream_t3.EnviromentKind.MOBILE_NATIVE) {
                    return;
                }

                var codec = "hls";
                var streamIndex = 0;

                if (this.list[codec][this.default_quality].length > 1) {
                    var streamNum = this.list[codec][this.default_quality].length;
                    var round = Math.floor(Math.random() * 100) % streamNum;
                    this.movie_url_mobile = this.list[codec][this.default_quality][round];
                } else {
                    this.movie_url_mobile = this.list[codec][this.default_quality][streamIndex];
                }
            };

            EQPlayerLiveModel.prototype.getLiveLidURL = function () {
                if (!this.img) {
                    return "";
                }
                if (this.img.indexOf("http") === -1) {
                    this._liveLidURL = "../../jmc_thumb/" + this.img;
                } else if (window.location.protocol === "https:" && this.img.indexOf("https:") != 0) {
                    var list = this.img.split("http").join("https").split("/");
                    list[2] = this.getSSLDomain();
                    this._liveLidURL = list.join("/");
                } else {
                    this._liveLidURL = this.img;
                }
                return this._liveLidURL;
            };

            EQPlayerLiveModel.prototype.setLivePreviewList = function () {
                if (this.line !== 1 && this.line !== 2) {
                    return;
                }

                var i, prop, streamIndex, previewStreamIndex;
                var liveListAll = [];
                var codec = "hds";
                var qualityLen = this.getPropertyNum(this.quality);

                if (this.line === 1) {
                    previewStreamIndex = 0;
                } else if (this.line === 2) {
                    previewStreamIndex = 1;
                }

                streamIndex = 0;
                while (streamIndex < 2) {
                    var liveList = [];
                    i = 1;
                    for (prop in this.quality) {
                        var liveURLSetting = {};
                        liveURLSetting = {
                            "quality": prop,
                            "url": this.list[codec][prop][previewStreamIndex],
                            "text": this.quality[prop].ja,
                            "text_en": this.quality[prop].en
                        };
                        liveList[qualityLen - i] = liveURLSetting;
                        i++;
                    }
                    liveListAll[streamIndex] = liveList;
                    streamIndex++;
                }

                this.movie_list = liveListAll;
            };

            EQPlayerLiveModel.prototype.getPropertyNum = function (obj) {
                var len = 0;
                for (var key in obj) {
                    ++len;
                }
                return len;
            };

            EQPlayerLiveModel.prototype.getPreviewMode = function () {
                if (this.line !== 1 && this.line !== 2) {
                    return false;
                } else {
                    return true;
                }
            };
            return EQPlayerLiveModel;
        })(model.EQPlayerModel);
        model.EQPlayerLiveModel = EQPlayerLiveModel;
    })(jstream_t3.model || (jstream_t3.model = {}));
    var model = jstream_t3.model;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (model) {
        var EQPlayerServiceModel = (function (_super) {
            __extends(EQPlayerServiceModel, _super);
            function EQPlayerServiceModel(value) {
                _super.call(this);
                value = value || {};
                this.stype = value.stype || "";
                this.playerDir = value.playerDir || "";
                this.contract_id = value.contract_id || "";
                this.player_id = value.player_id || "";
                this.meta_id = value.meta_id || "";
                this.partner_id = value.partner_id || "";
                this.maker_id = value.maker_id || "";
                this.product_id = value.product_id || "";
                this.type = value.type || "";
                this.viewlimit_flg = value.viewlimit_flg || "";
                this.viewlimit_url = value.viewlimit_url || "";
                if (value.isIframe) {
                    this.domain = value.domain || value.parent_url;
                } else {
                    this.domain = location.href;
                }
                this.auth = value.auth || "";
                this.a = value.a || "";
                this.auth_mode = value.auth_mode || "and";
                this.resultObject = value;
            }
            return EQPlayerServiceModel;
        })(model.NetServiceModel);
        model.EQPlayerServiceModel = EQPlayerServiceModel;

        var EQPlayerLiveServiceModel = (function (_super) {
            __extends(EQPlayerLiveServiceModel, _super);
            function EQPlayerLiveServiceModel(value) {
                _super.call(this);
                value = value || {};
                this.playerDir = value.playerDir || "";
                this.contract_id = value.contract_id || "";
                this.player_id = value.player_id || "";
                this.type = value.type || "";
                this.viewlimit_flg = value.viewlimit_flg || "";
                this.viewlimit_url = value.viewlimit_url || "";
                if (value.isIframe) {
                    this.domain = value.domain || value.parent_url;
                } else {
                    this.domain = location.href;
                }

                this.lpid = value.lpid || "";
                this.isLive = value.isLive || "";

                this.resultObject = value;
            }
            return EQPlayerLiveServiceModel;
        })(model.NetServiceModel);
        model.EQPlayerLiveServiceModel = EQPlayerLiveServiceModel;
    })(jstream_t3.model || (jstream_t3.model = {}));
    var model = jstream_t3.model;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (view) {
        var LoginFormView = (function () {
            function LoginFormView() {
            }
            LoginFormView.show = function (accesser, parentElementId, cssDir, errorMessage) {
                if (typeof parentElementId === "undefined") { parentElementId = null; }
                if (typeof cssDir === "undefined") { cssDir = ""; }
                if (typeof errorMessage === "undefined") { errorMessage = false; }
                var errorAlert = '<div id=#IDlogin class="info" style="top:#top;left:#left; width:#width#; display:inline; position:absolute;"><div class="info_header"><div class="info_title">動画認証</div></div><div class="info_main"><div id = "loginform" ><div>ID <input type="text" name="id" value=""/ ></div><div>PASS <input type="text" name="pass" value=""/ ></div></div></div></div>';

                var targetElement = !parentElementId ? document.body : document.getElementById(parentElementId + "video_operation");
                targetElement = !targetElement ? document.getElementById(parentElementId) : targetElement;

                var blockElement = document.createElement("div");
                blockElement.id = parentElementId + "block_layer";
                blockElement.style.display = "block";
                blockElement.style.position = "absolute";
                blockElement.style.height = "100%";
                blockElement.style.width = "100%";
                blockElement.style.left = "0";
                blockElement.style.top = "0";

                targetElement.appendChild(blockElement);

                var w = targetElement.clientWidth;
                var h = targetElement.clientHeight;

                var width = Math.max(w * 0.8, 150);
                var height = Math.max((h - 30 - 50) * 0.8, 136 - 30);

                var left = (w - width) / 2;
                var top = (h - height) / 2;
                var cssType = "";
                var size = 14;
                if (w < 240 || h < 180) {
                    cssType = "_ss";
                    size = 12;
                    height = h;
                    top = 0;
                } else if (w < 320 || h < 240) {
                    cssType = "_s";
                    size = 14;
                }
                var headerHeight = cssType == "" ? 40 : 30;
                var splitAuthParam = accesser.model.a.split(":");
                var id = splitAuthParam[0];
                var pass = splitAuthParam.length >= 2 ? splitAuthParam[1] : "";
                var languageResource = new jstream_t3.resource.LanguageResource();
                var headerText = languageResource.kinds.AUTH;
                var color = '#FFFFFF';
                if (errorMessage) {
                    headerText = languageResource.kinds.ERROR_AUTH;
                    color = '#FF7474';
                }

                var div = document.createElement("div");
                div.id = parentElementId + "login";
                div.className = "info";
                div.style.left = left + "px";
                div.style.top = top + "px";
                div.style.width = width + "px";
                div.style.height = height + "px";
                div.style.display = "block";
                div.style.position = "absolute";
                div.style.overflow = "hidden";
                if (jstream_t3.utils.Util.getUserAgent() == "ie7" || jstream_t3.utils.Util.getUserAgent() == "ie8" || jstream_t3.utils.Util.getUserAgent() == "ie9") {
                    div.style.background = "rgb(34,34,34)";
                } else {
                    div.style.background = "rgba(34,34,34,0.8)";
                }
                div.style.borderColor = "rgb(94,94,94)";
                div.style.borderStyle = "solid";
                div.style.borderWidth = "1px";
                div.style.zIndex = "50";
                targetElement.appendChild(div);

                var info_header = document.createElement("div");
                info_header.id = parentElementId + 'login_header';
                info_header.className = 'info_header' + cssType;
                div.appendChild(info_header);

                var info_iocn = document.createElement("div");
                info_iocn.id = parentElementId + 'login_header';
                info_iocn.className = 'info_icon_alert';
                info_header.appendChild(info_iocn);

                var info_title = document.createElement("div");
                info_title.id = parentElementId + 'login_title';
                info_title.className = 'info_title' + cssType;
                info_title.style.color = color;
                info_title.innerText = headerText;
                info_header.appendChild(info_title);

                var info_main = document.createElement("div");
                info_main.id = parentElementId + 'login_main';
                info_main.className = 'info_main' + cssType;
                info_main.style.width = width + 'px';
                info_main.style.height = height - headerHeight + 'px';
                info_main.style.left = left + 'px';
                info_main.style.top = top + 'px';
                div.appendChild(info_main);

                var info_auth = document.createElement("div");
                info_auth.id = parentElementId + 'loginform';
                info_auth.className = 'info_auth';
                info_auth.style.position = 'relative';
                info_main.appendChild(info_auth);

                var id_text_div = document.createElement("div");
                id_text_div.className = 'login_text_input' + cssType;
                info_auth.appendChild(id_text_div);

                var loginID = document.createElement("input");
                loginID.id = parentElementId + 'loginID';
                loginID.name = 'id';
                loginID.type = 'text';
                loginID.align = 'left';
                loginID.placeholder = languageResource.kinds.ID;
                loginID.size = size;
                id_text_div.appendChild(loginID);

                var pass_text_div = document.createElement("div");
                pass_text_div.className = 'login_text_input' + cssType;
                info_auth.appendChild(pass_text_div);

                var loginPASS = document.createElement("input");
                loginPASS.id = parentElementId + 'loginID';
                loginPASS.name = 'id';
                loginPASS.type = 'text';
                loginPASS.align = 'left';
                loginPASS.placeholder = languageResource.kinds.PASS;
                loginPASS.size = size;
                pass_text_div.appendChild(loginPASS);

                var login_button = document.createElement('button');
                login_button.className = 'login_button_input' + cssType;
                login_button.id = parentElementId + 'login_btn';
                login_button.style.width = "90px";
                login_button.style.height = "20px";
                login_button.innerText = languageResource.kinds.PLAY;
                info_main.appendChild(login_button);

                if (jstream_t3.utils.Util.getUserAgent() == "ie7" || jstream_t3.utils.Util.getUserAgent() == "ie8" || jstream_t3.utils.Util.getUserAgent() == "ie9") {
                    info_auth.style.marginTop = ((height - headerHeight) / 2 - (72 / 2)) + "px";
                }
                var form = document.getElementById(parentElementId + "loginform");
                var button = document.getElementById(parentElementId + "login_btn");

                var idText = loginID;
                var passText = loginPASS;

                idText.focus();
                button.onclick = function (e) {
                    var loginElement = document.getElementById(parentElementId + "login");
                    targetElement.removeChild(loginElement);
                    var blockElement = document.getElementById(parentElementId + "block_layer");
                    targetElement.removeChild(blockElement);
                    var id = idText.value;
                    var pass = passText.value;
                    accesser.login(id, pass);
                };
                idText.onkeydown = function (e) {
                    if (e == null || e == undefined) {
                        if (event.keyCode == 13) {
                            var loginElement = document.getElementById(parentElementId + "login");
                            targetElement.removeChild(loginElement);
                            var blockElement = document.getElementById(parentElementId + "block_layer");
                            targetElement.removeChild(blockElement);
                            var id = idText.value;
                            var pass = passText.value;
                            accesser.login(id, pass);
                        }
                    } else {
                        if (e.keyCode == 13) {
                            var loginElement = document.getElementById(parentElementId + "login");
                            targetElement.removeChild(loginElement);
                            var blockElement = document.getElementById(parentElementId + "block_layer");
                            targetElement.removeChild(blockElement);
                            var id = idText.value;
                            var pass = passText.value;
                            accesser.login(id, pass);
                        }
                    }
                };
                passText.onkeydown = function (e) {
                    if (e == null || e == undefined) {
                        if (event.keyCode == 13) {
                            var loginElement = document.getElementById(parentElementId + "login");
                            targetElement.removeChild(loginElement);
                            var blockElement = document.getElementById(parentElementId + "block_layer");
                            targetElement.removeChild(blockElement);
                            var id = idText.value;
                            var pass = passText.value;
                            accesser.login(id, pass);
                        }
                    } else {
                        if (e.keyCode == 13) {
                            var loginElement = document.getElementById(parentElementId + "login");
                            targetElement.removeChild(loginElement);
                            var blockElement = document.getElementById(parentElementId + "block_layer");
                            targetElement.removeChild(blockElement);
                            var id = idText.value;
                            var pass = passText.value;
                            accesser.login(id, pass);
                        }
                    }
                };
                document.getElementById(parentElementId + "loginform").appendChild(button);
            };
            return LoginFormView;
        })();
        view.LoginFormView = LoginFormView;
    })(jstream_t3.view || (jstream_t3.view = {}));
    var view = jstream_t3.view;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    var NetService = (function () {
        function NetService() {
        }
        NetService.prototype.load = function () {
        };

        NetService.prototype.setModel = function (model) {
            this.model = model;
        };

        NetService.prototype.loadJsonp = function (url, result, errResult, checkTarget) {
            var _this = this;
            try  {
                var dt = new Date().getTime();

                var script = document.createElement('script');
                script.type = 'text/javascript';
                script.charset = 'utf-8';
                script.async = true;
                script.defer = true;
                if (result === "accessControlResultEq") {
                    dt = Math.round(dt / (1000 * 60));
                    script.src = url + '&callback=' + result + '&_' + dt + '=';
                } else {
                    script.src = url + '?callback=' + result + '&_' + dt + '=';
                }

                if (script.addEventListener) {
                    script.onload = function () {
                        clearTimeout(timer);
                    };

                    script.onerror = function (ev) {
                        clearTimeout(timer);
                        errResult();
                    };
                } else if (script.readyState) {
                    script.onreadystatechange = function () {
                        if (script.readyState === 'loaded') {
                            if ((_this.model.resultObject[checkTarget] === undefined && result === result)) {
                                script.onreadystatechange = null;
                                clearTimeout(timer);

                                errResult();
                            } else {
                                script.onreadystatechange = null;
                                clearTimeout(timer);
                            }
                        }
                    };
                }

                document.body.appendChild(script);

                var timer = setTimeout(function () {
                    clearTimeout(timer);
                    errResult();
                }, 13000);
            } catch (e) {
                script.src = null;
                clearTimeout(timer);
                errResult();
            }
        };
        NetService.prototype.loadJsonp_auth = function (url, result, errResult, checkTarget) {
            var _this = this;
            try  {
                var dt = new Date().getTime();

                var script = document.createElement('script');
                script.type = 'text/javascript';
                script.charset = 'utf-8';
                script.async = true;
                script.defer = true;
                script.src = url + '&callback=' + result + '&_' + dt + '=';

                if (script.addEventListener) {
                    script.onload = function () {
                        clearTimeout(timer);
                    };

                    script.onerror = function (ev) {
                        clearTimeout(timer);
                        errResult();
                    };
                } else if (script.readyState) {
                    script.onreadystatechange = function () {
                        if (script.readyState === 'loaded') {
                            if ((_this.model.resultObject[checkTarget] === undefined && result === result)) {
                                script.onreadystatechange = null;
                                clearTimeout(timer);

                                errResult();
                            } else {
                                script.onreadystatechange = null;
                                clearTimeout(timer);
                            }
                        }
                    };
                }

                document.body.appendChild(script);

                var timer = setTimeout(function () {
                    clearTimeout(timer);
                    errResult();
                }, 13000);
            } catch (e) {
                script.src = null;
                clearTimeout(timer);
                errResult();
            }
        };
        return NetService;
    })();
    jstream_t3.NetService = NetService;

    var MetaService = (function (_super) {
        __extends(MetaService, _super);
        function MetaService() {
            _super.apply(this, arguments);
            this.syndicationapi_url = "syndication-api.stream.co.jp/ec/";
        }
        MetaService.prototype.setModel = function (params) {
            _super.prototype.setModel.call(this, params);
            var _this = this;
            var synDir = "http://" + this.syndicationapi_url;
            if (window.location.protocol == "https:") {
                synDir = "https://" + this.syndicationapi_url;
            }
            if (!params.stype) {
                var dir = params.playerDir.split("/").slice(0, -4).join("/");
                this.url = dir + "/jmc_meta/" + params.meta_id + ".jsonp";
            } else if (params.stype == "s1") {
                this.url = synDir + "get_metainfo_by_product_id?partner_id=" + params.partner_id + "&maker_id=" + params.maker_id + "&product_id=" + params.product_id + "&type=" + params.type;
            } else if (params.stype == "s2") {
                this.url = synDir + "get_metainfo?partner_id=" + params.partner_id + "&maker_id=" + params.maker_id + "&meta_id=" + params.meta_id + "&type=" + params.type;
            }

            var win = window;
            win.metaDataResult = function (json) {
                if (json.error != null) {
                    _this.fault();
                    return;
                }
                var i, prop;
                json = json.movie;
                for (prop in json) {
                    switch (prop) {
                        case "inbound_link":
                        case "movie_list":
                        case "movie_list_mobile":
                        case "movie_list_pd":
                        case "exlink":
                            i = 0;
                            while (i < json[prop].length) {
                                json[prop][i].text = jstream_t3.utils.Util.decodeHTMLEncode(json[prop][i].text);
                                i++;
                            }
                            break;
                        default:
                            json[prop] = jstream_t3.utils.Util.decodeHTMLEncode(json[prop]);
                            break;
                    }
                    _this.model.resultObject[prop] = json[prop];
                }
                _this.result();
            };
        };

        MetaService.prototype.load = function () {
            var url = this.url;
            var resultHandller = "metaDataResult";
            var errorHandler = this.fault;

            this.loadJsonp(url, resultHandller, errorHandler, "movie_url");
        };
        return MetaService;
    })(NetService);
    jstream_t3.MetaService = MetaService;

    var LiveMetaService = (function (_super) {
        __extends(LiveMetaService, _super);
        function LiveMetaService() {
            _super.apply(this, arguments);
        }
        LiveMetaService.prototype.setModel = function (params) {
            _super.prototype.setModel.call(this, params);
            var _this = this;
            var dir = params.playerDir.split("/").slice(0, -4).join("/");
            this.url = dir + "/livemeta/" + params.lpid + ".jsonp";

            var win = window;
            win.metaDataResult = function (json) {
                if (json.error != null) {
                    _this.fault();
                    return;
                }
                var i, prop, prop2;
                json = json.movie;
                for (prop in json) {
                    if (typeof json[prop] != "number") {
                        switch (prop) {
                            case "quality":
                                for (prop2 in json[prop]) {
                                    json[prop][prop2].ja = jstream_t3.utils.Util.decodeHTMLEncode(json[prop][prop2].ja);
                                }
                                break;
                            case "exlink":
                                i = 0;
                                while (i < json[prop].length) {
                                    json[prop][i].text = jstream_t3.utils.Util.decodeHTMLEncode(json[prop][i].text);
                                    i++;
                                }
                                break;
                            case "list":
                                break;
                            default:
                                json[prop] = jstream_t3.utils.Util.decodeHTMLEncode(json[prop]);
                                break;
                        }
                    }
                    _this.model.resultObject[prop] = json[prop];
                }
                _this.result();
            };
        };

        LiveMetaService.prototype.load = function () {
            var url = this.url;
            var resultHandller = "metaDataResult";
            var errorHandler = this.fault;

            this.loadJsonp(url, resultHandller, errorHandler, "list");
        };
        return LiveMetaService;
    })(NetService);
    jstream_t3.LiveMetaService = LiveMetaService;

    var SettingService = (function (_super) {
        __extends(SettingService, _super);
        function SettingService() {
            _super.apply(this, arguments);
            this.ssl_url = "https://ssl-cache.stream.ne.jp";
        }
        SettingService.prototype.setModel = function (params) {
            _super.prototype.setModel.call(this, params);

            var _this = this;
            if (!params.stype) {
                var dir = params.playerDir.split("/").slice(0, -3).join("/");

                this.url = dir + "/setting/player.jsonp";
            } else if (params.stype == "s1" || params.stype == "s2") {
                var synDir = "http://syndication.webcdn.stream.ne.jp/www50/syndication/setting/";
                if (window.location.protocol == "https:") {
                    synDir = this.ssl_url + "/www50/syndication/setting/";
                }

                this.url = synDir + "player.jsonp";
            }

            var win = window;

            win.settingResult = function (json) {
                if (json.error != null) {
                    _this.fault();
                    return;
                }
                var prop;
                json = json.Player;
                if (json == undefined) {
                    _this.fault();
                    return;
                }
                if (json[params.player_id] == null) {
                    _this.fault();
                    return;
                }
                for (prop in json[params.player_id]) {
                    if (typeof json[params.player_id][prop] === "string") {
                        json[params.player_id][prop] = jstream_t3.utils.Util.decodeHTMLEncode(json[params.player_id][prop]);
                    }
                    _this.model.resultObject[prop] = json[params.player_id][prop];
                }

                _this.setPlayerSetting(_this.model.resultObject);
                _this.result();
            };
        };

        SettingService.prototype.load = function () {
            var url = this.url;
            var resultHandller = "settingResult";
            var errorHandler = this.fault;

            if (this.model.resultObject.stype == "s1" || this.model.resultObject.stype == "s2") {
                jstream_t3.utils.PlayerSetting.setPlayerPreSetting(this.model.resultObject.player_id, this.model.resultObject);
            } else {
                this.setPlayerSetting(this.model.resultObject);
            }
            this.result();
        };

        SettingService.prototype.setPlayerSetting = function (params) {
            var key;

            var settings = {
                "pb": ["play_use", "on"],
                "vc": ["volume_use", "on"],
                "sb": ["seak_use", "on"],
                "fs": ["fullscreen_use", "on"],
                "ft": ["footer_text", ""],
                "fa": ["footer_align", "right"],
                "ti": ["title_use", "on"],
                "is": ["init_sound", "on"],
                "ip": ["init_play", "off"],
                "va": ["va_use", "on"],
                "el": ["exlink_use", "on"],
                "tg": ["tag_use", "on"],
                "mb": ["multibitrate_use", "on"],
                "il": ["inboundlink_use", "on"],
                "rb": ["replaybtn_use", "on"],
                "wm": ["watermark_use", "on"],
                "wd": ["watermark_design", "1"],
                "cp": ["controlbar_use", "on"],
                "rs": ["resumeEnable", "off"],
                "rv": ["resumeVolumeEnable", "on"]
            };

            for (key in settings) {
                if (typeof params.s[key] === "string") {
                    params.s[key] = jstream_t3.utils.Util.decodeHTMLEncode(params.s[key]);
                }
                params[settings[key][0]] = params.s[key] || settings[key][1];
            }

            if (params["footer_text"] == "") {
                params["footer_use"] = "off";
            } else {
                params["footer_use"] = "on";
                params.s["ft"] = encodeURIComponent(params["footer_text"]);
                params["footer_text"] = decodeURIComponent(params["footer_text"]);
            }

            this.setSnsList(params.s);
        };

        SettingService.prototype.setSnsList = function (params) {
            if (params["sn"] && typeof (params["sn"]) == "string") {
                var snsSites = ["facebook", "twitter", "LINE", "google", "mixi"];
                var snsList = params["sn"].split(",");
                this.model.resultObject["sns_id_list"] = [];
                var tempList = [];

                for (var i = 0; i < snsList.length; i++) {
                    if (snsList[i] == "f") {
                        tempList.push("facebook");
                    } else if (snsList[i] == "t") {
                        tempList.push("twitter");
                    } else if (snsList[i] == "m") {
                        tempList.push("mixi");
                    } else if (snsList[i] == "g") {
                        tempList.push("google");
                    } else if (snsList[i] == "l") {
                        tempList.push("LINE");
                    } else {
                        tempList = [];
                        break;
                    }
                }
                if (tempList.length > 0) {
                    if (tempList.length > 4) {
                        tempList.splice(4, 1);
                    }

                    for (var i = 0; i < snsSites.length; i++) {
                        for (var j = 0; j < tempList.length; j++) {
                            if (snsSites[i] == tempList[j]) {
                                if (!(tempList[j] == "LINE" && jstream_t3.utils.Util.isFlash() == true)) {
                                    this.model.resultObject["sns_id_list"].push(snsSites[i]);
                                }
                            }
                        }
                    }
                }
            } else if (params["sn"] == "") {
                this.model.resultObject["sns_id_list"] = [];
            } else {
                this.model.resultObject["sns_id_list"] = ["facebook", "twitter", "google", "mixi"];
            }

            if (this.model.resultObject["sns_id_list"].length == 0) {
                this.model.resultObject["sns_use"] = "off";
            } else {
                this.model.resultObject["sns_use"] = "on";
            }
        };
        return SettingService;
    })(NetService);
    jstream_t3.SettingService = SettingService;

    var ServiceSettingService = (function (_super) {
        __extends(ServiceSettingService, _super);
        function ServiceSettingService() {
            _super.apply(this, arguments);
        }
        ServiceSettingService.prototype.setModel = function (params) {
            _super.prototype.setModel.call(this, params);
            var _this = this;
            var dir = params.playerDir.split("/").slice(0, -3).join("/");
            this.url = dir + "/setting/service.jsonp";

            var win = window;
            win.serviceResult = function (json) {
                if (json.error != null) {
                    _this.fault();
                    return;
                }
                var prop;
                json = json.service;
                for (prop in json) {
                    if (typeof json[prop] === "string") {
                        json[prop] = jstream_t3.utils.Util.decodeHTMLEncode(json[prop]);
                    }
                    _this.model.resultObject[prop] = json[prop];
                }
                _this.result();
            };
        };

        ServiceSettingService.prototype.load = function () {
            var url = this.url;
            var resultHandller = "serviceResult";
            var errorHandler = this.fault;
            this.loadJsonp(url, resultHandller, errorHandler, "pd_enable");
        };
        return ServiceSettingService;
    })(NetService);
    jstream_t3.ServiceSettingService = ServiceSettingService;

    var HostCheckService = (function (_super) {
        __extends(HostCheckService, _super);
        function HostCheckService() {
            _super.apply(this, arguments);
        }
        return HostCheckService;
    })(NetService);
    jstream_t3.HostCheckService = HostCheckService;
    var AuthenticationService = (function (_super) {
        __extends(AuthenticationService, _super);
        function AuthenticationService() {
            _super.apply(this, arguments);
            this.isLoad = true;
            this.isLive = false;
            this.callbackNum = 0;
            this.unixTimes = Math.round(new Date().getTime() / 1000);
            this.api_domain = "api01-platform.stream.co.jp";
        }
        AuthenticationService.prototype.setModel = function (params) {
            _super.prototype.setModel.call(this, params);
            this.cid = params.contract_id || params.maker_id;
            if (params.isLive == true) {
                this.isLive = params.isLive;
                this.lpid = params.lpid;
                var qstring = "?cid=" + this.cid + "&lpid=" + this.lpid;
            } else {
                this.mid = params.meta_id;
                var qstring = "?cid=" + this.cid + "&mid=" + this.mid;
            }
            var _this = this;
            var qstring = qstring + "&a=" + params.a;
            this.callbackNum = parseInt(this.cid + this.mid);
            if (this.model.resultObject.api_url && this.model.resultObject.api_url.length > 0) {
                this.api_domain = this.model.resultObject.api_url;
            }

            this.url = "https://" + this.api_domain + "/apiservice/checkAuth/" + qstring;

            var win = window;
            win.authResult = function (json) {
                _this.result(false);
            };
            var win = window;
            win['checkauthresulteq' + this.callbackNum] = function (json) {
                var response = json.response;
                var responseStatus = json.response_status;
                if (json.error != null) {
                    _this.model.resultObject["tk"] = "_NG_";
                    _this.result(false);
                    return;
                }
                if (this.isLive == true) {
                    if (response === "OK") {
                        _this.result(true);
                    } else {
                        _this.model.resultObject["tk"] = "_NG_";
                        _this.result(false);
                    }
                } else {
                    var tk = json.tk;
                    if ((response === "OK") && (tk !== "")) {
                        if (typeof json["tk"] === "string") {
                            json["tk"] = jstream_t3.utils.Util.decodeHTMLEncode(json["tk"]);
                        }
                        _this.model.resultObject["tk"] = json["tk"];
                        _this.result(true);
                    } else {
                        _this.model.resultObject["tk"] = "_NG_";
                        _this.result(false);
                    }
                }
            };
        };
        AuthenticationService.prototype.load = function () {
            var url = this.url;
            var resultHandller = 'checkauthresulteq' + this.callbackNum;
            var errorHandler = this.fault;
            this.loadJsonp_auth(url, resultHandller, errorHandler, "tk");
        };
        return AuthenticationService;
    })(NetService);
    jstream_t3.AuthenticationService = AuthenticationService;
    var HostCheckService2 = (function (_super) {
        __extends(HostCheckService2, _super);
        function HostCheckService2() {
            _super.apply(this, arguments);
            this.isLoad = true;
            this.isLive = false;
            this.api_domain = "api01-platform.stream.co.jp";
        }
        HostCheckService2.prototype.setModel = function (params) {
            _super.prototype.setModel.call(this, params);
            var _this = this;
            if ((params.viewlimit_flg != "1" || !params.viewlimit_url) && (!params.resultObject.start_date && !params.resultObject.end_date) || params.resultObject.hostCheckResult == "ok") {
                this.isLoad = false;
                params.resultObject.hostCheckResult = "ok";
                return;
            }
            this.cid = params.contract_id || params.maker_id;
            var p = jstream_t3.utils.Util.parse_uri(params.domain);
            var domain = p.scheme + "://" + p.authority + p.path;
            if (params.isLive == true) {
                this.isLive = params.isLive;
                this.lpid = params.lpid;
                var qstring = "?cid=" + this.cid + "&lpid=" + this.lpid;
            } else {
                this.mid = params.meta_id;
                var qstring = "?cid=" + this.cid + "&mid=" + this.mid;
            }
            qstring = qstring + "&domain=" + domain;
            if (this.model.resultObject.api_url && this.model.resultObject.api_url.length > 0) {
                this.api_domain = this.model.resultObject.api_url;
            }

            this.url = "https://" + this.api_domain + "/apiservice/getAccessControl/" + qstring;

            var win = window;
            win.accessControlResultEq = function (json) {
                var response = json.response;
                var responseStatus = json.response_status;
                if (json.error != null) {
                    _this.model.resultObject["tk"] = "_NG_";
                    params.hostCheckResult = "ng";
                    _this.fault(responseStatus || "");
                    if (params.auth_mode == "or" && params.auth == "1" && responseStatus != "2003" && responseStatus != "2004")
                        _this.result();
                    return;
                }
                if (this.isLive == true) {
                    if (response === "OK") {
                        _this.result();
                    } else {
                        _this.model.resultObject["tk"] = "_NG_";
                        _this.fault(responseStatus || "");
                    }
                } else {
                    var tk = json.tk;
                    if ((response === "OK") && (tk !== "")) {
                        if (typeof json["tk"] === "string") {
                            json["tk"] = jstream_t3.utils.Util.decodeHTMLEncode(json["tk"]);
                        }
                        _this.model.resultObject["tk"] = json["tk"];
                        params.hostCheckResult = "ok";
                        _this.model.resultObject.hostCheckResult = "ok";
                        _this.result();
                    } else {
                        _this.model.resultObject["tk"] = "_NG_";
                        params.hostCheckResult = "ng";
                        _this.fault(responseStatus || "");
                        if (params.auth_mode == "or" && params.auth == "1" && responseStatus != "2003" && responseStatus != "2004")
                            _this.result();
                    }
                }
            };
        };

        HostCheckService2.prototype.load = function () {
            if (!this.isLoad) {
                this.result();
                return;
            } else {
                var url = this.url;
                var resultHandller = "accessControlResultEq";
                var errorHandler = this.fault;
                this.loadJsonp(url, resultHandller, errorHandler, "tk");
            }
        };
        return HostCheckService2;
    })(NetService);
    jstream_t3.HostCheckService2 = HostCheckService2;

    var ConnectionCheckService = (function (_super) {
        __extends(ConnectionCheckService, _super);
        function ConnectionCheckService() {
            _super.apply(this, arguments);
        }
        ConnectionCheckService.prototype.setModel = function (params) {
            _super.prototype.setModel.call(this, params);
            var _this = this;
            var dir = params.playerDir.split("/").slice(0, -4).join("/");
            this.mid = params.lpid;
            this.url = dir + "/livelimit/" + params.lpid + ".jsonp";

            var lpid = ('00000' + this.mid).slice(-5);

            eval("connectionResult" + lpid + "= function (json) { if (json.error != null) { _this.fault(); return; } var prop; for (prop in json) { if (typeof json[prop] === 'string') { json[prop] = jstream_t3.utils.Util.decodeHTMLEncode(json[prop]); } _this.model.resultObject[prop] = json[prop]; } _this.result(); }");
        };

        ConnectionCheckService.prototype.load = function () {
            var url = this.url;
            var resultHandller = "connectionResult" + ('00000' + this.mid).slice(-5);
            var errorHandler = this.fault;
            this.loadJsonp(url, resultHandller, errorHandler, "connection");
        };
        return ConnectionCheckService;
    })(NetService);
    jstream_t3.ConnectionCheckService = ConnectionCheckService;

    var LiveStatusService = (function (_super) {
        __extends(LiveStatusService, _super);
        function LiveStatusService() {
            _super.apply(this, arguments);
        }
        LiveStatusService.prototype.setModel = function (params) {
            _super.prototype.setModel.call(this, params);
            var _this = this;
            var dir = params.playerDir.split("/").slice(0, -4).join("/");
            this.mid = params.lpid;
            this.url = dir + "/livelid/" + params.lpid + ".jsonp";

            eval("lidResult" + this.mid + "= function (json) { if (json.error != null) { _this.fault(); return; } var prop; for (prop in json) { if (typeof json[prop] === 'string') { json[prop] = jstream_t3.utils.Util.decodeHTMLEncode(json[prop]); } _this.model.resultObject[prop] = json[prop]; } _this.result(); }");
        };

        LiveStatusService.prototype.load = function () {
            var url = this.url;
            var resultHandller = "lidResult" + this.mid;
            var errorHandler = this.fault;
            this.loadJsonp(url, resultHandller, errorHandler, "enabled");
        };
        return LiveStatusService;
    })(NetService);
    jstream_t3.LiveStatusService = LiveStatusService;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (utils) {
        var Timer = (function (_super) {
            __extends(Timer, _super);
            function Timer(interval, repeateCount) {
                if (typeof repeateCount === "undefined") { repeateCount = 0; }
                _super.call(this);
                this.interval = interval;
                this.repeateCount = repeateCount;
                this.running = false;
            }
            Timer.prototype.start = function () {
                var _this = this;
                this.running = true;
                this.currentCount = 0;
                this.intervalID = setInterval(function () {
                    if (_this.repeateCount > 0 && _this.currentCount > _this.repeateCount) {
                        _this.dispatchEvent(Timer.TIMER_COMPLETE);
                        _this.stop();
                        return;
                    }
                    _this.dispatchEvent(Timer.TIMER);
                    _this.currentCount++;
                }, this.interval);
            };

            Timer.prototype.stop = function () {
                clearInterval(this.intervalID);
                this.running = false;
            };

            Timer.prototype.reset = function () {
                this.stop();
                this.currentCount = 0;
            };
            Timer.TIMER = "time";
            Timer.TIMER_COMPLETE = "timeComplete";
            return Timer;
        })(jstream_t3.events.EventDispatcher);
        utils.Timer = Timer;
    })(jstream_t3.utils || (jstream_t3.utils = {}));
    var utils = jstream_t3.utils;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (utils) {
        var HashChecker = (function (_super) {
            __extends(HashChecker, _super);
            function HashChecker(checkInterval) {
                if (typeof checkInterval === "undefined") { checkInterval = 300; }
                var _this = this;
                _super.call(this);
                this.timer = new utils.Timer(checkInterval);
                this.timer.addEventListener("time", function () {
                    _this.checkHash();
                });
                this.checkHash();
            }
            HashChecker.prototype.checkHash = function () {
                var hash = window.location.hash.slice(1);
                if (this.currentHash != hash) {
                    this.currentHash = hash;
                    this.dispatchEvent("chenge");
                }
            };

            HashChecker.prototype.start = function () {
                this.timer.start();
            };

            HashChecker.prototype.stop = function () {
                this.timer.stop();
            };
            return HashChecker;
        })(jstream_t3.events.EventDispatcher);
        utils.HashChecker = HashChecker;
    })(jstream_t3.utils || (jstream_t3.utils = {}));
    var utils = jstream_t3.utils;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (geom) {
        var Point = (function () {
            function Point(x, y) {
                if (typeof x === "undefined") { x = 0; }
                if (typeof y === "undefined") { y = 0; }
                this.x = x;
                this.y = y;
            }
            Point.prototype.racio = function () {
                return this.y / this.x;
            };
            return Point;
        })();
        geom.Point = Point;
    })(jstream_t3.geom || (jstream_t3.geom = {}));
    var geom = jstream_t3.geom;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (geom) {
        var Rectangle = (function () {
            function Rectangle(x, y, width, height) {
                if (typeof x === "undefined") { x = 0; }
                if (typeof y === "undefined") { y = 0; }
                if (typeof width === "undefined") { width = 0; }
                if (typeof height === "undefined") { height = 0; }
                this.x = x;
                this.y = y;
                this.width = width;
                this.height = height;
            }
            Rectangle.prototype.fexedZoom = function (width, height) {
                var xScale = width / this.width;
                var yScale = height / this.height;
                var scale = (xScale > yScale) ? yScale : xScale;
                this.zoom(scale);
                return this;
            };

            Rectangle.prototype.centerXY = function (width, height, basePosition) {
                if (typeof basePosition === "undefined") { basePosition = null; }
                if (basePosition == null) {
                    basePosition = new geom.Point();
                }
                this.x = Math.floor((width - this.width) / 2) + basePosition.x;
                this.y = Math.floor((height - this.height) / 2) + basePosition.y;
                return this;
            };

            Rectangle.prototype.zoom = function (scale) {
                this.width *= scale;
                this.height *= scale;
                return this;
            };
            return Rectangle;
        })();
        geom.Rectangle = Rectangle;
    })(jstream_t3.geom || (jstream_t3.geom = {}));
    var geom = jstream_t3.geom;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (view) {
        var ViewElement = (function (_super) {
            __extends(ViewElement, _super);
            function ViewElement(dom, style) {
                if (typeof dom === "undefined") { dom = null; }
                if (typeof style === "undefined") { style = null; }
                _super.call(this);
                this.parent = null;
                this.id = this.createID();
                this.children = [];
                this.childrenHash = {};
                this.dom = this.createDom(dom);
                if (!dom) {
                    this.initStyle(style);
                }
            }
            ViewElement.prototype.createID = function () {
                return "t" + Math.floor(Math.random() * new Date().getTime());
            };

            ViewElement.prototype.createDom = function (dom) {
                if (typeof dom === "undefined") { dom = null; }
                if (dom == null) {
                    dom = document.createElement("div");
                }
                this.setUpEvent(dom);
                return dom;
            };

            ViewElement.prototype.useHandCursole = function (value) {
                this.dom.style.cursor = value ? "pointer" : null;
            };

            ViewElement.prototype.setUpEvent = function (dom) {
                var _this = this;
                dom.onload = function () {
                    _this.dispatchEvent(DOMEventKind.LOAD);
                };

                dom.onclick = function () {
                    _this.dispatchEvent(MouseEventKind.CLICK);
                };

                dom.onmouseout = function () {
                    _this.dispatchEvent(MouseEventKind.MOUSE_OUT);
                };

                dom.onmouseover = function () {
                    _this.dispatchEvent(MouseEventKind.MOUSE_OVER);
                };

                dom.onmousemove = function () {
                    _this.dispatchEvent(MouseEventKind.MOUSE_MOVE);
                };

                dom.onmousedown = function () {
                    _this.dispatchEvent(MouseEventKind.MOUSE_DOWN);
                };

                dom.onmouseup = function () {
                    _this.dispatchEvent(MouseEventKind.MOUSE_UP);
                };
            };

            ViewElement.prototype.initStyle = function (style) {
                if (typeof style === "undefined") { style = null; }
                if (style == null)
                    style = {};

                this.dom.style.position = style.position || "absolute";
                this.dom.style.margin = style.margin || "0px";
                this.dom.style.padding = style.padding || "0px";
                this.dom.style.left = style.left || "0px";
                this.dom.style.top = style.top || "0px";
            };

            ViewElement.prototype.setNumberStyle = function (type, value) {
                if (typeof value === "undefined") { value = null; }
                if (value != null) {
                    this.dom.style[type] = value.toString() + "px";
                }
                return this.getNumberStyle(type);
            };
            ViewElement.prototype.setStringStyle = function (type, value) {
                if (typeof value === "undefined") { value = null; }
                if (value != null) {
                    this.dom.style[type] = value;
                }
                return this.getStringStyle(type);
            };

            ViewElement.prototype.getNumberStyle = function (type) {
                if (!this.dom.style[type])
                    return 0;
                return parseInt(this.dom.style[type].slice(0, -2));
            };

            ViewElement.prototype.getStringStyle = function (type) {
                if (!this.dom.style[type])
                    return "";
                return (this.dom.style[type]);
            };

            ViewElement.prototype.left = function (value) {
                if (typeof value === "undefined") { value = null; }
                return this.setNumberStyle("left", value);
            };

            ViewElement.prototype.top = function (value) {
                if (typeof value === "undefined") { value = null; }
                return this.setNumberStyle("top", value);
            };

            ViewElement.prototype.right = function (value) {
                if (typeof value === "undefined") { value = null; }
                return this.setNumberStyle("right", value);
            };

            ViewElement.prototype.bottom = function (value) {
                if (typeof value === "undefined") { value = null; }
                return this.setNumberStyle("bottom", value);
            };

            ViewElement.prototype.width = function (value) {
                if (typeof value === "undefined") { value = null; }
                if (value != null)
                    this.dom.style.width = value + "px";
                return this.dom.offsetWidth - this.getNumberStyle("borderLeftWidth") - this.getNumberStyle("borderRightWidth") - this.getNumberStyle("paddingLeft") - this.getNumberStyle("paddingRight");
            };

            ViewElement.prototype.outerWidth = function () {
                return this.dom.offsetWidth;
            };

            ViewElement.prototype.height = function (value) {
                if (typeof value === "undefined") { value = null; }
                if (value != null)
                    this.dom.style.height = value + "px";
                return this.dom.offsetHeight;
            };

            ViewElement.prototype.outerHeight = function () {
                return this.dom.offsetHeight;
            };

            ViewElement.prototype.innerHeight = function () {
                return this.dom.offsetHeight;
            };

            ViewElement.prototype.borderVisible = function (value) {
                if (typeof value === "undefined") { value = null; }
                if (value != null) {
                    this.dom.style.border = !value ? "none" : value;
                }
                return this.dom.style.border != "none";
            };

            ViewElement.prototype.visible = function (value) {
                if (typeof value === "undefined") { value = null; }
                if (value != null) {
                    this.dom.style.visibility = value ? "visible" : "hidden";
                }
                return this.dom.style.visibility == "visible";
            };

            ViewElement.prototype.alpha = function (value) {
                if (typeof value === "undefined") { value = null; }
                if (value != null) {
                    this.dom.style.opacity = value.toString();
                }
                return parseFloat(this.dom.style.opacity);
            };

            ViewElement.prototype.getElement = function () {
                return this.dom;
            };

            ViewElement.prototype.addChild = function (value) {
                if (this.childrenHash[value.id] == null) {
                    this.children.push(value);
                    this.childrenHash[value.id] = value;
                    this.dom.appendChild(value.getElement());
                    value.parent = this;
                }
            };

            ViewElement.prototype.removeChild = function (value) {
                if (this.childrenHash[value.id]) {
                    delete this.childrenHash[value.id];
                    for (var i = 0; i < this.children.length; i++) {
                        if (this.children[i].id == value.id) {
                            this.children.splice(i, 1);
                            this.dom.removeChild(value.getElement());
                            value.parent = null;
                            return;
                        }
                    }
                }
            };

            ViewElement.prototype.parentDom = function () {
                return this.dom.parentElement;
            };
            return ViewElement;
        })(jstream_t3.events.EventDispatcher);
        view.ViewElement = ViewElement;

        var MouseEventKind = (function () {
            function MouseEventKind() {
            }
            MouseEventKind.MOUSE_UP = "mouseup";
            MouseEventKind.MOUSE_DOWN = "mosuedown";
            MouseEventKind.MOUSE_MOVE = "mousemove";
            MouseEventKind.CLICK = "click";
            MouseEventKind.MOUSE_OUT = "mouseout";
            MouseEventKind.MOUSE_OVER = "mouseover";
            return MouseEventKind;
        })();
        view.MouseEventKind = MouseEventKind;

        var DOMEventKind = (function () {
            function DOMEventKind() {
            }
            DOMEventKind.LOAD = "load";
            return DOMEventKind;
        })();
        view.DOMEventKind = DOMEventKind;
    })(jstream_t3.view || (jstream_t3.view = {}));
    var view = jstream_t3.view;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (view) {
        var ImageView = (function (_super) {
            __extends(ImageView, _super);
            function ImageView(fit) {
                if (typeof fit === "undefined") { fit = true; }
                _super.call(this);
                this.fit = fit;
                this.isLoading = false;
                this._rawHeigt = 0;
                this._rawWidth = 0;
                this.setupRawSize();
                this.addEventListener(view.DOMEventKind.LOAD, this.onload);
            }
            ImageView.prototype.createDom = function (dom) {
                if (typeof dom === "undefined") { dom = null; }
                var img = document.createElement("img");
                var element = _super.prototype.createDom.call(this, img);

                return element;
            };

            ImageView.prototype.onload = function (e) {
                var _this = e.currentTarget;
                _this.isLoading = true;
                if (_this.fit) {
                    _this.resize(e);
                }
                _this.visible(true);
            };

            ImageView.prototype.rawHeight = function () {
                return (this.getElement()).naturalHeight;
            };

            ImageView.prototype.rawWidth = function () {
                return (this.getElement()).naturalWidth;
            };

            ImageView.prototype.load = function (src) {
                var _this = this;
                this.isLoading = true;
                this.visible(false);
                this._rawWidth = 0;
                this._rawHeigt = 0;
                (this.getElement()).src = src;
                if (!("naturalWidth" in this.getElement())) {
                    setTimeout(function () {
                        if (_this.isLoading && _this.getElement()["width"] != 0) {
                            _this.dispatchEvent(view.DOMEventKind.LOAD);
                        }
                    }, 33);
                }
            };

            ImageView.prototype.resize = function (e) {
                var _this = e.currentTarget;
                _this.IEResize();
                var rect = new jstream_t3.geom.Rectangle(0, 0, _this.rawWidth(), _this.rawHeight());
                rect.fexedZoom(_this.parent.width(), _this.parent.height());
                rect.centerXY(_this.parent.width(), _this.parent.height());

                _this.left(rect.x);
                _this.top(rect.y);
                _this.width(rect.width);
                _this.height(rect.height);
            };

            ImageView.prototype.IEResize = function () {
                var image = this.getElement();
                if ("naturalWidth" in image) {
                    return;
                }
                var run = image.runtimeStyle;
                var mem = { w: run.width, h: run.height };
                run.width = "auto";
                run.height = "auto";
                this._rawWidth = image.width;
                this._rawHeigt = image.height;
                run.width = mem.w;
                run.height = mem.h;
            };
            ImageView.prototype.setupRawSize = function () {
                var _this = this;
                if ("naturalWidth" in this.getElement()) {
                    return;
                }
                this.rawHeight = function () {
                    return _this._rawHeigt;
                };
                this.rawWidth = function () {
                    return _this._rawWidth;
                };
            };
            return ImageView;
        })(view.ViewElement);
        view.ImageView = ImageView;
    })(jstream_t3.view || (jstream_t3.view = {}));
    var view = jstream_t3.view;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (view) {
        var ThumbnailView = (function () {
            function ThumbnailView() {
                this.thumbnail = new view.ImageView();
                this.wMark = new view.ImageView(false);
                this.base = new view.ViewElement(null, { position: "relative" });
            }
            ThumbnailView.prototype.createElement = function (thumbnailURL, wmarkPath, width, height) {
                if (typeof width === "undefined") { width = 100; }
                if (typeof height === "undefined") { height = 100; }
                this.base.width(width);
                this.base.height(height);
                this.base.addChild(this.thumbnail);
                this.thumbnail.useHandCursole(true);
                this.thumbnail.load(thumbnailURL);
                this.thumbnailImage = new Image();
                this.thumbnailImage.src = thumbnailURL;

                var wSize = 99;

                if (width < 240 || height < 180) {
                    wSize = 49;
                }
                this.waterMarkSize = wSize;
                var left;
                var top;
                left = Math.floor(width / 2 - wSize / 2);
                top = Math.floor(height / 2 - wSize / 2);
                if (wmarkPath != null) {
                    this.wMark.left(left);
                    this.wMark.top(top);
                    this.wMark.width(wSize);
                    this.wMark.height(wSize);
                    this.wMark.load(wmarkPath);
                    this.wMark.useHandCursole(true);
                    this.base.addChild(this.wMark);
                }

                return this.base;
            };

            ThumbnailView.prototype.setSize = function (width, height) {
                this.base.width(width);
                this.base.height(height);
                this.wMark.left(Math.floor(width / 2 - this.wMark.width() / 2));
                this.wMark.top(Math.floor(height / 2 - this.wMark.height() / 2));
            };
            ThumbnailView.prototype.setSizeResponsive = function (responsive) {
                if (responsive == "on") {
                    this.base.setStringStyle("position", "absolute");
                }

                var userAgent = window.navigator.userAgent.toLowerCase();
                var appVersion = window.navigator.appVersion.toLowerCase();

                if (appVersion.indexOf("msie 6.") != -1 || appVersion.indexOf("msie 7.") != -1 || appVersion.indexOf("msie 8.") != -1) {
                    var clientHeight;
                    var clientWidth;
                    if (document.compatMode == "BackCompat") {
                        clientWidth = document.body.clientWidth;
                        clientHeight = document.body.clientHeight;
                    } else {
                        clientWidth = document.documentElement.clientWidth;
                        clientHeight = document.documentElement.clientHeight;
                    }

                    var thumbOriginWidth = this.thumbnailImage.width;
                    var thumbOriginHeight = this.thumbnailImage.height;

                    var thumbnailAspect = thumbOriginHeight / thumbOriginWidth;

                    this.base.setStringStyle("width", "100%");
                    this.base.setStringStyle("height", "100%");

                    this.base.setStringStyle("cursor", "pointer");

                    this.thumbnail.setStringStyle("max-width", "100%");
                    this.wMark.setStringStyle("left", "50%");
                    this.wMark.setStringStyle("top", "50%");
                    this.wMark.setStringStyle("margin", this.waterMarkSize / 2 * -1 + "px 0 0 " + this.waterMarkSize / 2 * -1 + "px");
                } else {
                    this.base.setStringStyle("width", "100%");
                    this.base.setStringStyle("height", "100%");
                    this.base.setStringStyle("background-image", "url(" + this.thumbnailImage.src + ")");
                    this.base.setStringStyle("background-size", "contain");
                    this.base.setStringStyle("background-repeat", "no-repeat");
                    this.base.setStringStyle("background-position", "center");
                    this.base.setStringStyle("cursor", "pointer");

                    this.thumbnail.getElement().onload = null;
                    this.thumbnail.visible(false);
                    this.thumbnail.setStringStyle("display", "none");
                    this.wMark.setStringStyle("left", "50%");
                    this.wMark.setStringStyle("top", "50%");
                    this.wMark.setStringStyle("margin", this.waterMarkSize / 2 * -1 + "px 0 0 " + this.waterMarkSize / 2 * -1 + "px");
                }
            };

            ThumbnailView.prototype.getElement = function () {
                return this.base.getElement();
            };
            return ThumbnailView;
        })();
        view.ThumbnailView = ThumbnailView;
    })(jstream_t3.view || (jstream_t3.view = {}));
    var view = jstream_t3.view;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    var PlatformBuilder = (function () {
        function PlatformBuilder(model, accessor) {
            if (typeof accessor === "undefined") { accessor = null; }
            this.model = model;
            this.accessor = accessor;
        }
        PlatformBuilder.prototype.build = function () {
        };

        PlatformBuilder.prototype.createFooter = function () {
            var footer = document.getElementById("footer-" + this.model.objectID);
            footer.innerHTML = "<span>" + this.model.footer_text + "</span>";
            footer.className = "jstream-eqPlayer-footer " + jstream_t3.utils.Util.getUserAgent();
            footer.style.textAlign = this.model.footer_align;
            if (this.model.deviceType === "android") {
                footer.style.fontSize = "10px";
            }
        };
        return PlatformBuilder;
    })();
    jstream_t3.PlatformBuilder = PlatformBuilder;

    var SWFBuilder = (function (_super) {
        __extends(SWFBuilder, _super);
        function SWFBuilder() {
            _super.apply(this, arguments);
        }
        SWFBuilder.prototype.build = function () {
            var tag = '<div id="' + this.model.objectID + '"></div><div id="footer-' + this.model.objectID + '"></div>';
            document.getElementById(this.model.fieldID).innerHTML = tag;

            if (this.model.isFooder() && !(this.model.responsive == "on" || this.model.responsive == "fit")) {
                this.createFooter();
            }

            var swfHeight = (this.model.isFooder() && !(this.model.responsive == "on" || this.model.responsive == "fit") ? this.model.height - 20 : this.model.height);

            if (!this.model.isLive) {
                var q = "";
                if (this.model.stype) {
                    q = "?stype=" + this.model.stype;
                }
                var width = String(this.model.width);
                var height = String(swfHeight);
                if (this.model.responsive == "on" || this.model.responsive == "fit") {
                    width = "100%";
                    height = "100%";
                }
                jstream_t3.utils.EmbedSwf.embed(this.model.objectID, this.model.playerDir + "EQPlayer.swf" + q, width, height, this.model.thumbnail_url);
            } else {
                jstream_t3.utils.EmbedSwf.embed(this.model.objectID, this.model.playerDir + "EQLivePlayer.swf", String(this.model.width), String(swfHeight));
            }
        };
        return SWFBuilder;
    })(PlatformBuilder);
    jstream_t3.SWFBuilder = SWFBuilder;

    var HTML5Builder = (function (_super) {
        __extends(HTML5Builder, _super);
        function HTML5Builder() {
            _super.apply(this, arguments);
        }
        HTML5Builder.prototype.build = function () {
            var tag = '<link rel = "stylesheet" href = "' + this.model.cssDir + 'html5player.css" / >';
            document.getElementById(this.model.fieldID).innerHTML = tag;

            if (this.model.getEnvironmentType() == jstream_t3.EnviromentKind.MOBILE_STREAMING) {
                this.model.movie_url = this.model.movie_url_mobile;
                this.model.movie_list = this.model.movie_list_mobile;
            } else if (this.model.getEnvironmentType() == jstream_t3.EnviromentKind.MOBILE_PROGRESSIVE) {
                this.model.movie_url = this.model.movie_url_pd;
                this.model.movie_list = this.model.movie_list_pd;
            }
            this.model.movie_width = this.model.width;
            this.model.movie_height = this.model.height;
            var eqPlayer = jstream_t3.PlayerManger.getPlayer(this.model.objectID).eqPlayer;
            eqPlayer.fieldID = eqPlayer.fieldID;
            eqPlayer.html5Player = new HTML5Player_t3();
            eqPlayer.html5Player.init(eqPlayer, this.model.objectID);
            eqPlayer.accessor.dispatchEvent("playerInit");
        };
        return HTML5Builder;
    })(PlatformBuilder);
    jstream_t3.HTML5Builder = HTML5Builder;

    var HLSBuilder = (function (_super) {
        __extends(HLSBuilder, _super);
        function HLSBuilder() {
            _super.apply(this, arguments);
        }
        HLSBuilder.prototype.build = function () {
            var _this = this;
            var tag = '<div id="' + this.model.objectID + '"></div><div id="footer-' + this.model.objectID + '"></div>';
            document.getElementById(this.model.fieldID).innerHTML = tag;
            if (this.model.isFooder() && (this.model.responsive != "on" && this.model.responsive != "fit")) {
                this.createFooter();
            }
            var movieURL = this.model.movie_url_mobile;
            var thumbnail = new jstream_t3.view.ThumbnailView();
            var height = (this.model.isFooder() && (this.model.responsive != "on" && this.model.responsive != "fit") ? this.model.height - 20 : this.model.height);
            var wmPath = this.model.cssDir + "wm_play.png";
            if (this.model.watermark_use == "off") {
                wmPath = null;
            }
            if (this.model.watermark_design == "2") {
                wmPath = this.model.cssDir + "play.png";
            }
            thumbnail.createElement(this.model.getThumbnailURL(), wmPath, this.model.width, height);
            if (this.model.responsive == "on" || this.model.responsive == "fit") {
                thumbnail.setSizeResponsive(this.model.responsive);
            }

            if (this.accessor.model.isAuthEnable()) {
                var thDiv = thumbnail.getElement();
                thDiv.onclick = function () {
                    _this.accessor.setAuth();
                };
                document.getElementById(this.model.fieldID).appendChild(thDiv);
            } else {
                var a = document.createElement("a");
                a.href = movieURL;
                a.target = "_parent";
                a.appendChild(thumbnail.getElement());
                document.getElementById(this.model.fieldID).appendChild(a);
            }
        };
        return HLSBuilder;
    })(PlatformBuilder);
    jstream_t3.HLSBuilder = HLSBuilder;

    var NoFlashBuilder = (function (_super) {
        __extends(NoFlashBuilder, _super);
        function NoFlashBuilder() {
            _super.apply(this, arguments);
        }
        NoFlashBuilder.prototype.build = function () {
            var language = null;
            if (language == null) {
                var lang = "ja";
                if (jstream_t3.utils.Util.browserLanguage() != "ja") {
                    lang = "en";
                }
                language = new jstream_t3.resource.LanguageResource(this.model["language_resource_" + lang]);
            }
            if (jstream_t3.utils.Util.isMobileList().Android2 || jstream_t3.utils.Util.isMobileList().Android3) {
                jstream_t3.view.AlertView.show(language.kinds.ERROR_NO_FLASH_ANDROID_MESSAGE, language.kinds.ERROR_NO_FLASH_ANDROID_TITLE, this.model.fieldID, this.model.cssDir);
            } else {
                jstream_t3.view.AlertView.show(language.kinds.ERROR_NO_FLASH_MESSAGE, language.kinds.ERROR_NO_FLASH_TITLE, this.model.fieldID, this.model.cssDir);
            }
        };
        return NoFlashBuilder;
    })(PlatformBuilder);
    jstream_t3.NoFlashBuilder = NoFlashBuilder;

    var PlatformBuilderFactory = (function () {
        function PlatformBuilderFactory() {
        }
        PlatformBuilderFactory.create = function (model, accessor) {
            if (typeof accessor === "undefined") { accessor = null; }
            var type = model.getEnvironmentType();
            var result;
            switch (type) {
                case jstream_t3.EnviromentKind.MOBILE_NATIVE:
                    result = new HLSBuilder(model, accessor);
                    break;
                case jstream_t3.EnviromentKind.MOBILE_PROGRESSIVE:
                case jstream_t3.EnviromentKind.MOBILE_STREAMING:
                    result = new HTML5Builder(model);
                    break;
                case jstream_t3.EnviromentKind.NO_FLASH:
                    result = new NoFlashBuilder(model);
                    break;
                case jstream_t3.EnviromentKind.PC_STREAMING:
                    result = new SWFBuilder(model);
                    break;
            }
            return result;
        };
        return PlatformBuilderFactory;
    })();
    jstream_t3.PlatformBuilderFactory = PlatformBuilderFactory;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    (function (utils) {
        var Logger = (function () {
            function Logger() {
            }
            Logger.logSetup = function () {
                if (!console) {
                    var win = window;
                    win["console"] = {
                        log: function (str) {
                        }
                    };
                }
            };

            Logger.log = function (str) {
                Logger._log += str + "\n";
            };

            Logger.stateLog = function (value) {
                var date = new Date();
                value.date = (date.getHours() * 60 + date.getMinutes()) + "." + date.getSeconds() + "." + date.getMilliseconds();
                Logger._stateLog.push(value);
            };

            Logger.publishStateLog = function () {
                if (utils.Util.isFlash()) {
                    return Logger.publishLog(["date", "time", "va", "api", "eq", "strobe", "strobeMethod", "action"]);
                } else {
                    return Logger.publishLog(["date", "time", "va", "api", "video", "action"]);
                }
            };

            Logger.publishLog = function (stateList) {
                var result = "";
                var lines = [];

                var i;
                for (i = 0; i < stateList.length; i++) {
                    lines[i] = [stateList[i]];
                }

                for (i = 0; i < Logger._stateLog.length; i++) {
                    var item = Logger._stateLog[i];
                    for (var n = 0; n < stateList.length; n++) {
                        var value = item[stateList[n]];
                        if (typeof value == "number") {
                            value = "" + value;
                        }
                        lines[n].push(value || "");
                    }
                }

                for (i = 0; i < stateList.length; i++) {
                    result += lines[i].join(",") + "\n";
                }

                return result;
            };

            Logger.getLogBuf = function () {
                return Logger._log;
            };

            Logger.getAllLog = function () {
                return Logger._log;
            };
            Logger._log = "";

            Logger._stateLog = [];
            return Logger;
        })();
        utils.Logger = Logger;
    })(jstream_t3.utils || (jstream_t3.utils = {}));
    var utils = jstream_t3.utils;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    var EQPlayerAccessAPI = (function (_super) {
        __extends(EQPlayerAccessAPI, _super);
        function EQPlayerAccessAPI(eqPlayer) {
            var _this = this;
            this.inited = false;
            this.objectID = eqPlayer.targetElementID;
            this.eqPlayer = eqPlayer;
            this.progressRate = 10;
            this.preSeek = true;
            jstream_t3.PlayerManger.addPlayerAPI(this);
            _super.call(this);
            this.addEventListener("playerInit", function () {
                _this.playerInit();
            }, 1000);
            this.analytics = this.createAnalytics();
            this.model = eqPlayer.flashVars;
            this.model.objectID = this.objectID;
            this.model.fieldID = eqPlayer.fieldID;
            this.model.onError = function (code, title, message) {
                _this.showError(code, message, title);
            };

            this.liveModel = eqPlayer.flashVars;
            this.liveModel.objectID = this.objectID;
            this.liveModel.fieldID = eqPlayer.fieldID;
            this.liveModel.onError = function (code, title, message) {
                _this.showError(code, message, title);
            };

            this.settingService = new jstream_t3.SettingService();
            this.settingService.fault = function () {
                _this.showError(jstream_t3.events.ErrorEvent.SETTINGS_LOAD_ERROR, JMCPlayer.kinds.ERROR_SETTING_DELETE, JMCPlayer.kinds.ERROR_SETTING_TITLE);
                _this.eqPlayer.errorHandler("error");
            };

            this.metaDataService = new jstream_t3.MetaService();
            this.metaDataService.fault = function () {
                if (_this.LanguageResource == null) {
                    var lang = "ja";
                    if (jstream_t3.utils.Util.browserLanguage() != "ja") {
                        lang = "en";
                    }
                    _this.LanguageResource = new jstream_t3.resource.LanguageResource(_this.model["language_resource_" + lang]);
                }
                _this.showError(jstream_t3.events.ErrorEvent.METAINFO_LOAD_ERROR, _this.LanguageResource.kinds.ERROR_META_DATA_MESSAGE, _this.LanguageResource.kinds.ERROR_META_DATA_TITLE);
                _this.eqPlayer.errorHandler("error");
            };

            this.liveMetaDataService = new jstream_t3.LiveMetaService();
            this.liveMetaDataService.fault = function () {
                _this.showError(jstream_t3.events.ErrorEvent.METAINFO_LOAD_ERROR, JMCPlayer.kinds.P1201M, JMCPlayer.kinds.P1201T);
                _this.eqPlayer.errorHandler("error");
            };

            this.serviceSettingService = new jstream_t3.ServiceSettingService();
            this.serviceSettingService.fault = function () {
                _this.showError(jstream_t3.events.ErrorEvent.SERVICE_SETTING_ERROR, JMCPlayer.kinds.ERROR_SERVICE_DELETE, JMCPlayer.kinds.ERROR_SERVICE_TITLE);
                _this.eqPlayer.errorHandler("error");
            };

            this.hostCheckService = new jstream_t3.HostCheckService();
            this.hostCheckService.fault = function (status) {
                _this.showError(jstream_t3.events.ErrorEvent.VIEWLIMIT_DISABLED, JMCPlayer.kinds.ERROR_ENV_MESSAGE.replace("_STATUS_", status), JMCPlayer.kinds.ERROR_ENV_TITLE);
                _this.eqPlayer.errorHandler("error");
            };

            this.hostCheckService2 = new jstream_t3.HostCheckService2();
            var _model = this.model;
            this.hostCheckService2.fault = function (status) {
                if (_this.LanguageResource == null) {
                    var lang = "ja";
                    if (jstream_t3.utils.Util.browserLanguage() != "ja") {
                        lang = "en";
                    }
                    _this.LanguageResource = new jstream_t3.resource.LanguageResource(_this.model["language_resource_" + lang]);
                }
                switch (status) {
                    case 2001:
                        _this.model.hostCheckResult = "ng";
                        if (!(_model.auth_mode == "or" && _model.auth == "1")) {
                            _this.showError(jstream_t3.events.ErrorEvent.VIEWLIMIT_DISABLED, _this.LanguageResource.kinds.ERROR_ENV_MESSAGE.replace("_STATUS_", status), _this.LanguageResource.kinds.ERROR_ENV_TITLE);
                            _this.eqPlayer.errorHandler("error");
                        }
                        break;
                    case 2002:
                        _this.model.hostCheckResult = "ng";
                        if (!(_model.auth_mode == "or" && _model.auth == "1")) {
                            _this.showError(jstream_t3.events.ErrorEvent.VIEWLIMIT_DISABLED, _this.LanguageResource.kinds.ERROR_ENV_MESSAGE.replace("_STATUS_", status), _this.LanguageResource.kinds.ERROR_ENV_TITLE);
                            _this.eqPlayer.errorHandler("error");
                        }
                        break;
                    case 2003:
                        _this.model.hostCheckResult = "ng";
                        _this.showError(jstream_t3.events.ErrorEvent.VIEWLIMIT_DISABLED, _this.LanguageResource.kinds.ERROR_LIMIT_PRE_MESSAGE, _this.LanguageResource.kinds.ERROR_LIMIT_PRE_TITLE);
                        _this.eqPlayer.errorHandler("error");
                        break;
                    case 2004:
                        _this.model.hostCheckResult = "ng";
                        _this.showError(jstream_t3.events.ErrorEvent.VIEWLIMIT_DISABLED, _this.LanguageResource.kinds.ERROR_LIMIT_OVER_MESSAGE, _this.LanguageResource.kinds.ERROR_LIMIT_OVER_TITLE);
                        _this.eqPlayer.errorHandler("error");
                        break;
                    default:
                        _this.model.hostCheckResult = "ng";
                        if (!(_model.auth_mode == "or" && _model.auth == "1")) {
                            _this.showError(jstream_t3.events.ErrorEvent.VIEWLIMIT_DISABLED, _this.LanguageResource.kinds.ERROR_ENV_MESSAGE.replace("_STATUS_", status), _this.LanguageResource.kinds.ERROR_ENV_TITLE);
                            _this.eqPlayer.errorHandler("error");
                        }
                }
            };
            this.authCheckService = new jstream_t3.AuthenticationService();
        }
        EQPlayerAccessAPI.prototype.loadMetaData = function (resultHandller) {
            this.metaDataService.result = resultHandller;
            this.metaDataService.syndicationapi_url = this.model.syndicationapi_url;
            this.metaDataService.setModel(this.model.createServiceModel());
            this.metaDataService.load();
        };

        EQPlayerAccessAPI.prototype.loadLiveMetaData = function (resultHandller) {
            this.liveMetaDataService.result = resultHandller;
            this.liveMetaDataService.setModel(this.liveModel.createLiveServiceModel());
            this.liveMetaDataService.load();
        };

        EQPlayerAccessAPI.prototype.loadSettingData = function (resultHandller) {
            this.settingService.result = resultHandller;
            this.settingService.ssl_url = this.model.ssl_url;
            this.settingService.setModel(this.model.createServiceModel());
            this.settingService.load();
        };

        EQPlayerAccessAPI.prototype.loadPDSetting = function (resultHandller) {
            this.serviceSettingService.setModel(this.model.createServiceModel());
            this.serviceSettingService.result = resultHandller;
            this.serviceSettingService.load();
        };

        EQPlayerAccessAPI.prototype.loadHostCheck = function (resultHandler) {
            this.hostCheckService.setModel(this.model.createServiceModel());
            this.hostCheckService.result = resultHandler;
            this.hostCheckService.load();
        };

        EQPlayerAccessAPI.prototype.loadHostCheck2 = function (resultHandler) {
            this.hostCheckService2.setModel(this.model.createServiceModel());
            this.hostCheckService2.result = resultHandler;
            this.hostCheckService2.load();
        };

        EQPlayerAccessAPI.prototype.loadLiveHostCheck = function (resultHandler) {
            this.hostCheckService2.setModel(this.liveModel.createLiveServiceModel());
            this.hostCheckService2.result = resultHandler;
            this.hostCheckService2.load();
        };
        EQPlayerAccessAPI.prototype.loadAuthCheck = function (resultHandler) {
            this.authCheckService.setModel(this.model.createServiceModel());
            this.authCheckService.result = resultHandler;
            this.authCheckService.fault = resultHandler;
            this.authCheckService.load();
        };

        EQPlayerAccessAPI.prototype.showError = function (code, message, title) {
            if (typeof title === "undefined") { title = ""; }
            if (this.model.responsive == "on" || this.model.responsive == "fit") {
                if (this.model.isLive && document.getElementById(this.eqPlayer.fieldID).clientHeight < 150) {
                    this.liveModel.setTagSize(this.eqPlayer.fieldID);
                }
            }
            jstream_t3.view.AlertView.show(message, title, this.eqPlayer.fieldID, this.model.cssDir);
            this.dispatchEvent(new jstream_t3.events.ErrorEvent(code, message, title));
        };

        EQPlayerAccessAPI.prototype.createAnalytics = function () {
            var analytics = new Analytics(true);
            return analytics;
        };

        EQPlayerAccessAPI.prototype.addEventListener = function (type, handler, priolity) {
            if (typeof priolity === "undefined") { priolity = 0; }
            _super.prototype.addEventListener.call(this, type, handler, priolity);
            if (type == "progress" || this.state == "playing") {
                this.startProgress();
            }
        };

        EQPlayerAccessAPI.prototype.startProgress = function () {
            var _this = this;
            if (this.progressItervalID != null)
                return;
            this.updateTime = new Date().getTime();
            this.progressItervalID = setInterval(function () {
                if (_this.state == "playing") {
                    _this.dispatchEvent("progress");
                    var time = new Date().getTime();
                    if (time - _this.updateTime > 5000) {
                        _this.dispatchEvent("update");
                        _this.updateTime = time;
                        if (_this.model.resumeEnable == "on") {
                            var name = "EQPlayer_resume_CurrentTime_" + _this.model.meta_id + "_" + _this.model.contract_id;
                            var value = _this.getCurrentTime().toString();
                            var path = '/';
                            var period = 30;
                            var max = 20;
                            var overflowCookie = jstream_t3.utils.Util.CheckOverCookie("EQPlayer_resume_CurrentTime_", name, max);
                            if (overflowCookie != null) {
                                jstream_t3.utils.Util.DeleteCookie(overflowCookie, _this.model.CookieDomain);
                            }
                            jstream_t3.utils.Util.SetCookie(name, value, path, period, _this.model.CookieDomain);
                        }
                    }
                } else {
                    _this.stopProgress();
                }
            }, 1000 / this.progressRate);
        };

        EQPlayerAccessAPI.prototype.stopProgress = function () {
            clearInterval(this.progressItervalID);
            this.progressItervalID = null;
        };

        EQPlayerAccessAPI.prototype.getElement = function () {
            return document.getElementById(this.objectID) || {};
        };

        EQPlayerAccessAPI.prototype.getCurrentTime = function () {
            return 0;
        };
        EQPlayerAccessAPI.prototype.validateSeek = function (value) {
            if (isNaN(value) || value < 0 || value > this.getTotalTime()) {
                return false;
            }
            return true;
        };
        EQPlayerAccessAPI.prototype.setCurrentTime = function (time) {
        };

        EQPlayerAccessAPI.prototype.setStartTime = function (time) {
        };

        EQPlayerAccessAPI.prototype.setState = function (state) {
            if (this.state == state) {
                return;
            }
            this.preState = this.state;

            this.state = state;

            if (state == "playing") {
                this.isPlayed = true;
            }

            if (state == "landing" && (this.model["isLightbox"] == "true" && this.model.isThumbnail == false)) {
                return;
            }
            this.dispatchEvent("change_state");
            this.dispatchEvent(this.state);
            if (state != "exit" && state != "complete" && state != "landing") {
                if (this.model.resumeEnable == "on") {
                    var name = "EQPlayer_resume_CurrentTime_" + this.model.meta_id + "_" + this.model.contract_id;
                    var value = this.getCurrentTime().toString();
                    var path = '/';
                    var period = 30;
                    var max = 20;
                    var overflowCookie = jstream_t3.utils.Util.CheckOverCookie("EQPlayer_resume_CurrentTime_", name, max);
                    if (overflowCookie != null) {
                        jstream_t3.utils.Util.DeleteCookie(overflowCookie, this.model.CookieDomain);
                    }
                    jstream_t3.utils.Util.SetCookie(name, value, path, period, this.model.CookieDomain);
                }
            } else if (state == "complete") {
                if (this.model.resumeEnable == "on") {
                    var name = "EQPlayer_resume_CurrentTime_" + this.model.meta_id + "_" + this.model.contract_id;
                    var value = "0";
                    var path = '/';
                    var period = 30;
                    jstream_t3.utils.Util.DeleteCookie(name, this.model.CookieDomain);
                }
            }
            if (state == "playing") {
                this.startProgress();
            } else {
                this.stopProgress();
            }
        };
        EQPlayerAccessAPI.prototype.getEnvironmentType = function () {
            return this.model.getEnvironmentType();
        };
        EQPlayerAccessAPI.prototype.play = function () {
        };
        EQPlayerAccessAPI.prototype.pause = function () {
        };
        EQPlayerAccessAPI.prototype.getTotalTime = function () {
            return;
        };
        EQPlayerAccessAPI.prototype.playerInit = function () {
            this.setAnalyticsConfig();
        };

        EQPlayerAccessAPI.prototype.setAnalyticsConfig = function () {
            var vars = this.eqPlayer.flashVars;
            this.analyticsEnabled = vars.isVa();
            var cvaLength = 5;
            if (!this.analyticsEnabled) {
                return;
            }
            this.analytics.setSelf(vars.parent_url);
            this.analytics.setRef(vars.ref);

            var svcid = vars.contract_id || vars.maker_id;
            var vid = svcid + "-" + vars.meta_id + "-" + vars.file_id;
            var uid = "";
            var pid = vars.partner_id;
            var o = "";
            var i = 1;
            for (var key in vars.o) {
                if (i > cvaLength) {
                    break;
                }
                o += key + "=" + vars.o[key] + "&";
                i++;
            }
            if (o.length > 1)
                o = o.slice(0, -1);
            this.analytics.setSvcid(svcid);
            this.analytics.setVid(vid);
            this.analytics.setUid(uid);
            this.analytics.setTotal(vars.duration);
            this.analytics.setTagType(vars.tagType);
            this.analytics.setPid(vars.partner_id);
            this.analytics.setObject(o);

            if (this.model.va_url)
                this.analytics.setBaseURL(this.model.va_url);
            if (this.model.vc)
                this.analytics.setVc(this.model.vc);
            this.analytics.setEvents(this);
        };

        EQPlayerAccessAPI.prototype.sendClickBeacon = function (type) {
            if (!this.analyticsEnabled) {
                return;
            }
            this.analytics.sendClickBeacon(type, this.getCurrentTime());
        };

        EQPlayerAccessAPI.prototype.createPlayer = function () {
        };

        EQPlayerAccessAPI.prototype.changeMedia = function (meta_id, autoPlay) {
            if (typeof autoPlay === "undefined") { autoPlay = true; }
        };

        EQPlayerAccessAPI.prototype.changeQuality = function (quality) {
        };
        EQPlayerAccessAPI.prototype.getQuality = function () {
            return 0;
        };
        EQPlayerAccessAPI.prototype.mute = function (value) {
            return false;
        };

        EQPlayerAccessAPI.prototype.isMuted = function () {
            return false;
        };

        EQPlayerAccessAPI.prototype.setVolume = function (volume) {
        };

        EQPlayerAccessAPI.prototype.getVolume = function () {
            return 0;
        };

        EQPlayerAccessAPI.prototype.destroy = function () {
            this.removeEventListener;
            this.startProgress();
            this.metaDataService = null;
            this.settingService = null;
            this.serviceSettingService = null;
            this.objectID = null;
            this.inited = null;
            this.eqPlayer.flashVars = null;
            this.eqPlayer.flashVarsList = null;
            this.progressRate = null;
            this.state = null;
            this.analytics = null;
            this.analyticsEnabled = null;
            this.isPlayed = null;
            this.hashChecker = null;
            jstream_t3.PlayerManger.getPlayer;

            this.model.destroy();
            this.model = null;
            this.clearEventListener();
        };
        return EQPlayerAccessAPI;
    })(jstream_t3.events.EventDispatcher);
    jstream_t3.EQPlayerAccessAPI = EQPlayerAccessAPI;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    var SWFAccessAPI = (function (_super) {
        __extends(SWFAccessAPI, _super);
        function SWFAccessAPI(eqPlayer) {
            var _this = this;
            _super.call(this, eqPlayer);
            this.addEventListener("mediaError", function (e) {
                if (!_this.liveModel.isLive) {
                    _this.dispatchEvent(new jstream_t3.events.ErrorEvent(jstream_t3.events.ErrorEvent.SERVER_MEDIA_ERROR));
                } else {
                    _this.setState("interrupted");
                }
            });
            var swfAccessAPI = this;
            if (window.addEventListener) {
                window.addEventListener("beforeunload", function (e) {
                    if (swfAccessAPI.model.resumeVolumeEnable == "on") {
                        if (_this.model.CookieDomain) {
                            var name = "EQPlayer_resume_Volume";
                            var value;
                            var path = '/';
                            var period;
                            if (swfAccessAPI.isMuted && swfAccessAPI.isMuted()) {
                                value = "mute";
                            } else {
                                value = swfAccessAPI.getVolume().toString();
                            }
                            jstream_t3.utils.Util.SetCookie(name, value, path, period, _this.model.CookieDomain);
                        }
                    }
                });
            } else {
                window.attachEvent("onbeforeunload", function (e) {
                    if (swfAccessAPI.model.resumeVolumeEnable == "on") {
                        if (_this.model.CookieDomain) {
                            var name = "EQPlayer_resume_Volume";
                            var value;
                            var path = '/';
                            var period;
                            if (swfAccessAPI.isMuted && swfAccessAPI.isMuted()) {
                                value = "mute";
                            } else {
                                value = swfAccessAPI.getVolume().toString();
                            }
                            jstream_t3.utils.Util.SetCookie(name, value, path, period, _this.model.CookieDomain);
                        }
                    }
                });
            }
        }
        SWFAccessAPI.prototype.setState = function (state) {
            if (state == "landing") {
                this.inited = true;
            }
            _super.prototype.setState.call(this, state);
        };
        SWFAccessAPI.prototype.getCurrentTime = function () {
            if (!this.inited)
                return 0;
            if (this.model.isThumbnail)
                return 0;
            if (this.liveModel.isLive) {
                return;
            } else {
                return this.getElement().getCurrentTime();
            }
        };

        SWFAccessAPI.prototype.getTotalTime = function () {
            if (!this.inited)
                return 0;
            if (this.liveModel.isLive) {
                return;
            } else {
                return this.getElement().getTotalTime();
            }
        };

        SWFAccessAPI.prototype.setStartTime = function (time) {
            jstream_t3.utils.Logger.stateLog({
                time: this.getCurrentTime(),
                action: "api.setStartTime"
            });
            if (!this.validateSeek(time)) {
                return;
            }
            if (!this.liveModel.isLive) {
                this.getElement().setStartTime(time);
            }
        };

        SWFAccessAPI.prototype.setCurrentTime = function (time) {
            jstream_t3.utils.Logger.stateLog({
                time: this.getCurrentTime(),
                action: "api.setCurrentTime"
            });
            if (!this.validateSeek(time)) {
                return;
            }
            if (!this.liveModel.isLive) {
                this.getElement().seek(time);
            }
        };

        SWFAccessAPI.prototype.play = function () {
            jstream_t3.utils.Logger.stateLog({
                time: this.getCurrentTime(),
                action: "api.play"
            });
            this.getElement().play2();
            _super.prototype.play.call(this);
        };

        SWFAccessAPI.prototype.pause = function () {
            if (!this.isPlayed)
                return;
            if (this.state == "complete" || this.state == "paused") {
                return;
            }
            jstream_t3.utils.Logger.stateLog({
                time: this.getCurrentTime(),
                action: "api.pause"
            });
            this.getElement().pause();
            _super.prototype.pause.call(this);
        };

        SWFAccessAPI.prototype.createPlayer = function () {
            var success;
            if (!this.liveModel.isLive) {
                success = this.model.parce();
            } else {
                success = this.liveModel.parseLive();
            }
            if (!success) {
                return;
            }

            this.eqPlayer.flashVarsList = this.model.getListFormat();

            jstream_t3.PlatformBuilderFactory.create(this.model).build();
            if (!jstream_t3.utils.Util.isFlash()) {
                this.dispatchEvent(new jstream_t3.events.ErrorEvent(jstream_t3.events.ErrorEvent.FLASHPLAYER_VERSION_ERROR));
            }
        };

        SWFAccessAPI.prototype.changeQuality = function (value) {
            jstream_t3.utils.Logger.stateLog({
                time: this.getCurrentTime(),
                action: "api.changeQuality"
            });
            this.getElement().changeQuality(value);
        };

        SWFAccessAPI.prototype.getQuality = function () {
            return this.getElement().getQuality();
        };

        SWFAccessAPI.prototype.mute = function (value) {
            if (typeof value === "boolean") {
                jstream_t3.utils.Logger.stateLog({
                    time: this.getCurrentTime(),
                    action: "api.mute"
                });
                return this.getElement().mute(value);
            } else {
                return this.isMuted();
            }
        };

        SWFAccessAPI.prototype.isMuted = function () {
            if (this.getElement().isMute) {
                return this.getElement().isMute();
            } else {
                return false;
            }
        };

        SWFAccessAPI.prototype.setVolume = function (volume) {
            if (typeof volume === "number" && volume >= 0 && volume <= 100 && volume % 1 == 0) {
                jstream_t3.utils.Logger.stateLog({
                    time: this.getCurrentTime(),
                    action: "api.setVolume"
                });
                if (this.getElement().setVolume) {
                    this.getElement().setVolume(volume / 100);
                }
            }
        };

        SWFAccessAPI.prototype.getVolume = function () {
            if (this.getElement().getVolume) {
                return Math.floor(this.getElement().getVolume() * 100);
            } else {
                return 100;
            }
        };
        return SWFAccessAPI;
    })(jstream_t3.EQPlayerAccessAPI);
    jstream_t3.SWFAccessAPI = SWFAccessAPI;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    var HTML5AccessAPI = (function (_super) {
        __extends(HTML5AccessAPI, _super);
        function HTML5AccessAPI(player) {
            _super.call(this, player);
            this.isSeeking = false;
            this.isQuealitySelecting = false;
            this.QuealitySelect_startTime = 0;
            this.isFirstPlay = true;
            this.laststat = "";
            this.video_event = "";
            this.isTouching = false;
            this.MOVIE_QUALITY_LIST_JA = ["自動", "低画質", "標準画質", "高画質", "HD画質", "フルHD画質", "4K画質"];
            this.MOVIE_QUALITY_LIST_EN = ["AUTO", "Low", "Standard", "High", "HD", "FullHD", "4K"];
            this.lastTime = 0;
            this.last2Time = 0;
            this.jmcPlayer = player;
        }
        HTML5AccessAPI.prototype.setAuth = function () {
            if (!this.model.isAuthPassed) {
                if (this.model.a.indexOf(':') == -1 || this.model.a.split(":")[1].length < 1) {
                    this.showLoginForm();
                } else {
                    this.login(null, null);
                }
            } else {
                parent.location.href = this.model.movie_url_mobile;
            }
        };
        HTML5AccessAPI.prototype.showLoginForm = function (errorMessage) {
            if (typeof errorMessage === "undefined") { errorMessage = false; }
            if (this.model.responsive == "on" || this.model.responsive == "fit") {
            }
            var cssDir = this.model.playerDir + "resource/style/";
            jstream_t3.view.LoginFormView.show(this, this.model.fieldID, cssDir, errorMessage);
        };

        HTML5AccessAPI.prototype.login = function (id, pass) {
            var _this = this;
            var isPreSetAuthParam = false;
            var hashedPass = "";
            var orignePass = pass || "";

            if (id != null && pass != null) {
                var isAuthed = false;
                var md5_hexstr = MD5_hexhash(pass);

                id = jstream_t3.utils.Util.base64encode(id);
                hashedPass = md5_hexstr;
            } else if (id == null && pass == null) {
                isPreSetAuthParam = true;
                var splitAuthParam = _this.model.a.split(":");
                id = jstream_t3.utils.Util.base64encode(splitAuthParam[0]);

                hashedPass = splitAuthParam[1];
            }
            _this.model.a = encodeURIComponent(id + ":" + hashedPass);

            _super.prototype.loadAuthCheck.call(this, function (result) {
                if (isPreSetAuthParam) {
                    _this.model.a = "";
                } else {
                    _this.model.a = decodeURIComponent(_this.model.a);
                    var splitAuthParam = _this.model.a.split(":");
                    var id = jstream_t3.utils.Util.base64decode(splitAuthParam[0]);
                    var pass = orignePass;
                    _this.model.a = id + ":" + pass;
                }

                _this.authResult(result);
            });
        };

        HTML5AccessAPI.prototype.authResult = function (result) {
            if (this.model.getEnvironmentType() == jstream_t3.EnviromentKind.MOBILE_NATIVE) {
                if (result) {
                    this.model.isAuthPassed = true;
                    this.model.setMovieMobileURL_AfterAuth();
                    parent.location.href = this.model.movie_url_mobile;
                } else {
                    this.showLoginForm(true);
                }
            } else if (this.model.getEnvironmentType() == jstream_t3.EnviromentKind.MOBILE_STREAMING) {
                this.model.a = null;
                if (result) {
                    this.model.setMovieMobileURL_AfterAuth();
                    this.eqPlayer.html5Player.updateVideoURL(this.model.movie_url_mobile, true);
                } else {
                    this.eqPlayer.html5Player.updateVideoURL(null, false);
                }
            } else {
                if (result) {
                    this.model.setMovieMobileURL_AfterAuth();
                }
                this.model.a = null;
                this.eqPlayer.html5Player.authResult(result);
            }
        };

        HTML5AccessAPI.prototype.playerInit = function () {
            var _this = this;
            _super.prototype.playerInit.call(this);

            var video = this.getElement();
            video.addEventListener("playing", function (e) {
                _this.videoLog(e);
                _this.chengeState(e);
                _this.video_event = e.type;
            });
            video.addEventListener("pause", function (e) {
                _this.videoLog(e);
                _this.video_event = e.type;

                if ((!_this.liveModel.isLive) && (_this.getTotalTime() - _this.getCurrentTime() < 1)) {
                    return;
                }
                _this.chengeState(e);
            });
            video.addEventListener("seeking", function (e) {
                _this.videoLog(e);
                _this.video_event = e.type;
                if (_this.isSeeking || _this.isTouching)
                    return;
                if (jstream_t3.utils.Util.isMobileList().Android4 || jstream_t3.utils.Util.isMobileList().Firefox)
                    return;

                _this.startSeek();
            });

            video.addEventListener("seeked", function (e) {
                _this.videoLog(e);
                _this.video_event = e.type;
                if (_this.isQuealitySelecting)
                    _this.isQuealitySelecting = false;

                if (_this.isTouching || !_this.isSeeking)
                    return;
                _this.completeSeek();
            });
            video.addEventListener("ended", function (e) {
                _this.videoLog(e);
                _this.video_event = e.type;
                _this.chengeState(e);
            });
            video.addEventListener("timeupdate", function (e) {
                _this.video_event = e.type;

                _this.last2Time = _this.lastTime;
                _this.lastTime = video.currentTime;
                _this.videoLog(e);

                if (_this.model.isFirstPlay == true) {
                    if (_this.model.start_time <= _this.lastTime) {
                        _this.model.isFirstPlay = false;
                        e.type = "playing";
                        _this.chengeState(e);
                    }
                }
                if (_this.isQuealitySelecting) {
                    _this.chengeState(e);
                }
            });
            video.addEventListener("loadeddata", function (e) {
                _this.videoLog(e);
            });
            video.addEventListener("loadedmetadata", function (e) {
                _this.videoLog(e);
                _this.video_event = e.type;
                _this.chengeState(e);
            });
            video.addEventListener("error", function (e) {
                _this.videoLog(e);
                _this.video_event = e.type;
                if (!_this.liveModel.isLive) {
                    _this.dispatchEvent(new jstream_t3.events.ErrorEvent(jstream_t3.events.ErrorEvent.SERVER_MEDIA_ERROR));
                } else {
                    _this.setState("interrupted");
                }
            });
            var html5Player = this.eqPlayer.html5Player;
            var __setCurrentTime = html5Player.setCurrentTime;

            var initSeek = html5Player._init_video_seek;
            html5Player._init_video_seek = function () {
                initSeek();
                if (!html5Player._values.seek_use)
                    return;
                var rail = html5Player._values.movie_slider_obj.node_slider_rail;
                rail.addEventListener("touchstart", function (e) {
                    _this.seekStart();
                }, true);
                rail.addEventListener("touchend", function (e) {
                    _this.seekEnd();
                });
            };

            var selectQuality = html5Player._click_movie_select;
            html5Player._click_movie_select = function (index) {
                _this.QuealitySelect_startTime = video.currentTime;
                _this.isQuealitySelecting = true;
                _this.stopProgress();

                selectQuality(index);
            };
            this.setState("landing");
        };

        HTML5AccessAPI.prototype.videoLog = function (e) {
            jstream_t3.utils.Logger.stateLog({
                time: this.getCurrentTime(),
                video: e.type
            });
        };

        HTML5AccessAPI.prototype.startSeek = function () {
            this.preSeekState = this.state;
            this.isSeeking = true;
            if (!this.isQuealitySelecting)
                this.setState("seek_start");
        };
        HTML5AccessAPI.prototype.completeSeek = function () {
            this.isSeeking = false;

            if (!this.isQuealitySelecting)
                this.setState(this.preSeekState == "playing" ? "playing" : "paused");
            this.preSeekState = null;
        };

        HTML5AccessAPI.prototype.seekStart = function () {
            this.isTouching = true;
            this.startSeek();
        };

        HTML5AccessAPI.prototype.seekEnd = function () {
            this.isTouching = false;
            if (this.isSeeking) {
                this.completeSeek();
            }
        };

        HTML5AccessAPI.prototype.timeupdate = function (e) {
            this.lastTime = this.getElement().currentTime;
        };

        HTML5AccessAPI.prototype.chengeState = function (e) {
            if (e.type == "timeupdate") {
                if (this.isQuealitySelecting && this.lastTime + 2 >= this.QuealitySelect_startTime) {
                    this.isQuealitySelecting = false;

                    if (this.state == "playing") {
                        this.startProgress();
                    }
                }
                return;
            }

            if (this.isQuealitySelecting) {
                return;
            }

            if (this.isSeeking && e.type == "playing") {
                return;
            }

            if ((!this.liveModel.isLive) && (e.type == "pause" && this.getCurrentTime() == this.getTotalTime())) {
                return;
            }

            if (this.state == "complete" && e.type != "playing") {
                return;
            }

            if (e.type == "playing" && this.getCurrentTime() == 0) {
                this.inited = true;
            }

            if (this.liveModel.isLive)
                this.inited = true;

            if ((this.liveModel.isLive) && (e.type == "ended")) {
                this.setState("interrupted");
                return;
            }

            var labels = {
                playing: "playing",
                pause: "paused",
                ended: "complete"
            };
            this.laststat = this.state;
            var state = labels[e.type];
            this.setState(state);
        };

        HTML5AccessAPI.prototype.setState = function (state) {
            if (state != this.state) {
                _super.prototype.setState.call(this, state);
            }
        };

        HTML5AccessAPI.prototype._getCurrentTime = function () {
            var video = this.getElement();
            var time = video.currentTime;
            return Math.floor(time * 1000) / 1000;
        };

        HTML5AccessAPI.prototype.getCurrentTime = function () {
            if (this.liveModel.isLive) {
                return;
            } else {
                var playhead = this._getCurrentTime();

                return playhead;
            }
        };

        HTML5AccessAPI.prototype.getTotalTime = function () {
            var time = this.getElement().duration;
            if (this.liveModel.isLive) {
                return;
            } else {
                return Math.floor(time * 1000) / 1000;
            }
        };

        HTML5AccessAPI.prototype.setStartTime = function (time) {
            if (!this.validateSeek(time)) {
                return;
            }
            jstream_t3.utils.Logger.stateLog({
                time: this.getCurrentTime(),
                action: "api.setStartTime"
            });
            if (!this.liveModel.isLive) {
                this.setCurrentTime(time);
                this.play();
            }
        };

        HTML5AccessAPI.prototype.setCurrentTime = function (time) {
            if (!this.validateSeek(time)) {
                return;
            }
            if (time == 0) {
                time = 0.1;
            }
            jstream_t3.utils.Logger.stateLog({
                time: this.getCurrentTime(),
                action: "api.setCurrentTime"
            });
            if (!this.liveModel.isLive) {
                this.eqPlayer.html5Player.setCurrentTime(time);
            }
        };

        HTML5AccessAPI.prototype.play = function () {
            this.eqPlayer.html5Player.play();
        };

        HTML5AccessAPI.prototype.pause = function () {
            if (!this.isPlayed)
                return;
            if (this.state == "complete" || this.state == "paused") {
                return;
            }
            jstream_t3.utils.Logger.stateLog({
                time: this.getCurrentTime(),
                action: "api.pause"
            });
            this.eqPlayer.html5Player.pause();
            _super.prototype.pause.call(this);
        };

        HTML5AccessAPI.prototype.createPlayer = function () {
            var success;
            if (!this.liveModel.isLive) {
                success = this.model.parce();
            } else {
                success = this.liveModel.parseLive();
            }
            if (!success) {
                return;
            }
            jstream_t3.PlatformBuilderFactory.create(this.model, this).build();
        };

        HTML5AccessAPI.prototype.changeQuality = function (value) {
            if (value == this.getQuality()) {
                return;
            }

            if (typeof value == "number" && value >= 0 && value < 7) {
                jstream_t3.utils.Logger.stateLog({
                    time: this.getCurrentTime(),
                    action: "api.changeQuality"
                });
                var index = this.getQualityLabel(value);

                if (index >= 0) {
                    this.eqPlayer.html5Player.changeQuality(this.model.movie_list[index].url);
                } else {
                }
            }
        };

        HTML5AccessAPI.prototype.getQualityLabel = function (index) {
            var movie_quality_list;
            if (jstream_t3.utils.Util.browserLanguage() == "ja") {
                movie_quality_list = this.MOVIE_QUALITY_LIST_JA;
            } else {
                movie_quality_list = this.MOVIE_QUALITY_LIST_EN;
            }
            for (var i = 0; i < this.model.movie_list.length; i++) {
                if (this.model.movie_list[i].text == movie_quality_list[index]) {
                    return i;
                }
            }
            return -1;
        };

        HTML5AccessAPI.prototype.getQualityVal = function (text) {
            var movie_quality_list;
            if (jstream_t3.utils.Util.browserLanguage() == "ja") {
                movie_quality_list = this.MOVIE_QUALITY_LIST_JA;
            } else {
                movie_quality_list = this.MOVIE_QUALITY_LIST_EN;
            }
            for (var i = 0; i < movie_quality_list.length; i++) {
                if (movie_quality_list[i] == text) {
                    return i;
                }
            }
            return -1;
        };

        HTML5AccessAPI.prototype.getQuality = function () {
            var src = this.eqPlayer.html5Player.getCurrentMovieURL();
            for (var i = 0; i < this.model.movie_list.length; i++) {
                if (this.model.movie_list[i].url == src) {
                    var val = this.getQualityVal(this.model.movie_list[i].text);
                    return val;
                }
            }
            return -1;
        };
        return HTML5AccessAPI;
    })(jstream_t3.EQPlayerAccessAPI);
    jstream_t3.HTML5AccessAPI = HTML5AccessAPI;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    var EQPlayerAccessAPIBuilder = (function () {
        function EQPlayerAccessAPIBuilder() {
        }
        EQPlayerAccessAPIBuilder.create = function (eqPlayer) {
            var api;
            if (eqPlayer.flashVars.isMobilePlayer()) {
                api = new jstream_t3.HTML5AccessAPI(eqPlayer);
            } else {
                api = new jstream_t3.SWFAccessAPI(eqPlayer);
            }
            return api;
        };
        return EQPlayerAccessAPIBuilder;
    })();
    jstream_t3.EQPlayerAccessAPIBuilder = EQPlayerAccessAPIBuilder;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    var QueController = (function () {
        function QueController(queType) {
            this.queType = queType;
        }
        QueController.prototype.getQueGlobal = function () {
            if (window["jstream_que_global"] == null) {
                window["jstream_que_global"] = {
                    queList: {},
                    currentQue: {}
                };
            }
            return window["jstream_que_global"];
        };

        QueController.prototype.getQueList = function () {
            if (this.getQueGlobal().queList[this.queType] == null) {
                this.getQueGlobal().queList[this.queType] = [];
            }
            return this.getQueGlobal().queList[this.queType];
        };

        QueController.prototype.currentQue = function (value) {
            if (value != null) {
                this.getQueGlobal().currentQue[this.queType] = value;
            }
            return this.getQueGlobal().currentQue[this.queType];
        };

        QueController.prototype.resetCurrentQue = function () {
            this.getQueGlobal().currentQue[this.queType] = null;
        };

        QueController.prototype.setQue = function () {
            this.getQueList().push(this);

            if (this.currentQue() == null) {
                this.next();
            }
        };

        QueController.prototype.next = function () {
            var _this = this;
            if (this.getQueList().length == 0) {
                this.resetCurrentQue();
                return;
            }

            this.currentQue(this.getQueList().shift());

            setTimeout(function () {
                var a = _this.currentQue();
                if (a) {
                    a.exec();
                }
            }, 100);
        };

        QueController.prototype.exec = function () {
        };
        return QueController;
    })();
    jstream_t3.QueController = QueController;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    var PlayerFactoryBase = (function (_super) {
        __extends(PlayerFactoryBase, _super);
        function PlayerFactoryBase(in_params, embedTagID) {
            if (typeof embedTagID === "undefined") { embedTagID = null; }
            _super.call(this, "playerFactory");
            this.setUp(in_params, embedTagID);
            this.parentDivID = in_params.parentDivID;
            if (!in_params.noPlayer) {
                this.addTag();
                this.setQue();
            }
        }
        PlayerFactoryBase.prototype.getPlayerVersion = function () {
            return jstream_t3.version.getVersion();
        };

        PlayerFactoryBase.prototype.setUp = function (in_params, embedTagID) {
            if (typeof embedTagID === "undefined") { embedTagID = null; }
            this.params = new jstream_t3.model.EQPlayerModel(in_params);
            var prop = "";

            if (!this.params.tagType) {
                this.params.tagType = this.getPlayerVersion();
            }

            this.embedTagID = embedTagID;
            if (this.params.file_id == null) {
                this.params.file_id = "0";
            }
            this.createURLQuery();
            this.params.playerDir = this.params.base + this.getPlayerVersion() + "/";
            this.params.cssDir = this.params.playerDir + "resource/style/";
            this.params.stype = this.getStype();

            this.id = this.createID();
            this.jmcPlayer = new JMCPlayer(this.id, this.params);
        };

        PlayerFactoryBase.prototype.getStype = function () {
            return null;
        };

        PlayerFactoryBase.prototype.addTag = function () {
            var eqField = this.createHtmlTag(this.jmcPlayer.accessor instanceof jstream_t3.SWFAccessAPI);
            var embedTagID = this.embedTagID;

            if (embedTagID == null) {
                document.write(eqField);
            } else {
                if (jstream_t3.utils.Util.getUserAgent() == "ie7" || jstream_t3.utils.Util.getUserAgent() == "ie8" || jstream_t3.utils.Util.getUserAgent() == "ie9") {
                    var link = jstream_t3.utils.Util.ReplaceHtmltagWithString(eqField, "div", "");
                    var linkElement = document.createElement("link");
                    linkElement.rel = "stylesheet";
                    linkElement.href = this.params.cssDir + "object.css";
                    var parentDiv = document.getElementById(this.embedTagID);
                    for (var i = 0; i < parentDiv.childNodes.length; i++) {
                        var item = parentDiv.childNodes.item(i);
                        if (item.id) {
                            jstream_t3.PlayerManger.removePlayerAPI("eq" + item.id.slice(7));
                        }
                    }
                    parentDiv.innerHTML = eqField;
                    parentDiv.appendChild(linkElement);
                } else {
                    var parentDiv = document.getElementById(this.embedTagID);
                    for (var i = 0; i < parentDiv.childNodes.length; i++) {
                        var item = parentDiv.childNodes.item(i);
                        if (item.id) {
                            jstream_t3.PlayerManger.removePlayerAPI("eq" + item.id.slice(7));
                        }
                    }
                    parentDiv.innerHTML = eqField;
                }
            }
        };

        PlayerFactoryBase.prototype.createID = function () {
            return "";
        };

        PlayerFactoryBase.prototype.createBaseURL = function (path) {
            if (window.location.protocol === "https:") {
                var paths = path.split("/");
                paths.shift();
                return "https://ssl-cache.stream.ne.jp/" + paths.join("/");
            } else {
                return "http://" + path;
            }
        };

        PlayerFactoryBase.prototype.createURLQuery = function () {
            var params = this.params;
            params.base = this.createBaseURL(params.base);

            if (!params.isIframe) {
                params.ref = document.referrer;
                params.parent_url = jstream_t3.utils.Util.getCanonical() || window.location.href;
            } else {
            }
        };

        PlayerFactoryBase.prototype.createHtmlTag = function (isSWF) {
            var params = this.params;

            var width = "";
            var height = "";
            var maxWidth = "";
            var maxHeight = "";
            if (params.responsive == "on") {
                params.footer_use = "off";
                params.footer_text = "";
                if (params.width == "eq-auto" || params.height == "eq-auto") {
                    width = "width:100%;";
                    height = "height:100%;";
                } else {
                    width = "width:100%;";
                    height = "height:100%;";
                    maxWidth = " max-width:" + params.width + "px;";
                    maxHeight = "max-height:" + params.height + "px;";
                }
                var div = '<link rel = "stylesheet" href = "' + this.params.cssDir + 'object.css"  >' + '<div style="' + maxWidth + maxHeight + '">' + '<div style="padding-bottom:' + params.height / params.width * 100 + '%;position:relative;">' + '<div class="jstream-eqPlayer" id = "eqField-' + this.id + '" style = "background-color:#000; padding:0px; margin:0px; border:none; ' + width + height + ' position:absolute; display: inline-block; zoom:1; font-family: sans-serif; overflow:hidden;" lang="en-US" >.</div></div></div>';
            } else if (params.responsive == "fit") {
                params.footer_use = "off";
                params.footer_text = "";
                width = "width:100%";
                height = "height:100%";
                var div = '<link rel = "stylesheet" href = "' + this.params.cssDir + 'object.css"  >' + '<div class="jstream-eqPlayer" id = "eqField-' + this.id + '" style = "background-color:#000; padding:0px; margin:0px; border:none; ' + width + '; ' + height + '; ' + maxWidth + maxHeight + ' position:absolute; display: inline-block; zoom:1; font-family: sans-serif; overflow:hidden;" lang="en-US">.</div>';
            } else {
                width = "width:" + params.width + "px";
                height = "height:" + params.height + "px";
                var div = '<link rel = "stylesheet" href = "' + this.params.cssDir + 'object.css"  >' + '<div class="jstream-eqPlayer" id = "eqField-' + this.id + '" style = "background-color:#000; padding:0px; margin:0px; border:none; ' + width + '; ' + height + '; ' + maxWidth + maxHeight + ' position:relative; display: inline-block; zoom:1; font-family: sans-serif; overflow:hidden;" lang="en-US">.</div>';
            }

            return div;
        };

        PlayerFactoryBase.getURLQuery = function (paramstring) {
            var item, list, qlist, query, vars;

            var result = {};
            var paramstring = paramstring || location.search.substr(1);
            qlist = paramstring.split("&");
            for (var i = 0; i < qlist.length; i++) {
                if (typeof qlist[i] == "undefined" || qlist[i] === null) {
                    continue;
                }
                query = qlist[i].split("=");
                if (query[1] === "") {
                    continue;
                }

                query[1] = decodeURIComponent(query[1]);

                item = query[1];
                vars = query[1];
                if (query[0] === "s" || query[0] === "o") {
                    var settings = vars.slice(1, vars.length - 1);
                    settings = settings.split(',');
                    var arry = [];
                    for (var j = 0; j < settings.length; j++) {
                        var setting = settings[j].split(": ");
                        if (setting.length >= 2) {
                            if (setting[0] === "sn") {
                                for (var k = j + 1; k < settings.length; k++) {
                                    var d = settings[k].split(': ');
                                    if (d.length >= 2) {
                                        break;
                                    }
                                    setting[1] += "," + settings[k];
                                }
                            }
                            arry.push('"' + setting[0] + '"' + ":" + '"' + setting[1] + '"');
                        }
                    }
                    query[1] = "{" + arry.join(',') + "}";
                }
                if (query[0] === "sns_id_list") {
                    query[1] = vars.split("_,_");
                }
                result[query[0]] = query[1];
            }

            if (result.sns_id_list == null) {
                result.sns_id_list = [];
            }
            if (result.sns_facebook_use === "on") {
                result.sns_id_list.push("facebook");
            }
            if (result.sns_twitter_use === "on") {
                result.sns_id_list.push("twitter");
            }
            if (result.sns_mixi_use === "on") {
                result.sns_id_list.push("mixi");
            }
            if (result.sns_google_use === "on") {
                result.sns_id_list.push("google");
            }
            result.deviceType = (navigator.userAgent.search(/Android/) !== -1 ? "android" : "default");
            return result;
        };

        PlayerFactoryBase.prototype.setTagSize = function () {
            var movieWidth = this.params.width;
            var movieHeight = this.params.height;
            if (this.params.footer_use == "on")
                movieHeight = movieHeight - 20;
            var divTagID = 'eqField-' + this.id;
            var divTag = document.getElementById(divTagID);
            var divTagMaxWidth;
            var divTagMaxHeight;
            var divTagWidth = divTag.clientWidth;
            var divTagHeight = divTag.clientHeight;

            var params = this.params;
            var ftHeight = (params.footer_use === 'on') ? 20 : 0;
            if (params.width == "eq-auto" || params.height == "eq-auto") {
                if (divTagWidth <= 0 || divTagWidth == null) {
                    divTagMaxWidth = Number(movieWidth);
                    divTagMaxHeight = Number(movieHeight) + ftHeight;
                } else if (divTagHeight <= 24 || divTagHeight == null) {
                    divTagMaxWidth = Number(divTagWidth);
                    divTagMaxHeight = Math.ceil((movieHeight / movieWidth) * divTagWidth) + ftHeight;
                } else {
                    divTagMaxWidth = Number(divTagWidth);
                    divTagMaxHeight = Number(divTagHeight);
                }
            } else if (!isNaN(parseInt(params.width)) && !isNaN(parseInt(params.height))) {
                params.width = parseInt(params.width);
                params.height = parseInt(params.height);
                if (params.width > divTagWidth && divTagWidth > 150) {
                    divTagMaxWidth = Number(divTagWidth);
                    divTagMaxHeight = Math.ceil((movieHeight / movieWidth) * divTagWidth) + ftHeight;
                } else {
                    divTagMaxWidth = Number(params.width);
                    divTagMaxHeight = Number(params.height);
                }
            } else {
                divTagMaxWidth = Number(movieWidth);
                divTagMaxHeight = Number(movieHeight) + ftHeight;
            }

            this.params.width = divTagMaxWidth;
            this.params.height = divTagMaxHeight;
        };
        return PlayerFactoryBase;
    })(jstream_t3.QueController);
    jstream_t3.PlayerFactoryBase = PlayerFactoryBase;
})(jstream_t3 || (jstream_t3 = {}));
var jstream_t3;
(function (jstream_t3) {
    var PlayerFactoryOBJ = (function (_super) {
        __extends(PlayerFactoryOBJ, _super);
        function PlayerFactoryOBJ(params, embedTagID) {
            if (typeof embedTagID === "undefined") { embedTagID = null; }
            _super.call(this, params, embedTagID);
        }
        PlayerFactoryOBJ.version = function () {
            return jstream_t3.version.getVersion();
            ;
        };
        PlayerFactoryOBJ.create = function (params, embedTagID) {
            if (typeof embedTagID === "undefined") { embedTagID = null; }
            jstream_t3.utils.Util.changeParamName(params);
            if (params.meta_id && isNaN(params.meta_id)) {
                params.meta_id = jstream_t3.utils.Util.unObfuscate(params.meta_id);
            }
            params.contract_id = jstream_t3.utils.Util.unObfuscate(params.contract_id);
            params.noPlayer = false;

            var inCookie = null;
            if (!params.inCookieVer) {
                inCookie = jstream_t3.utils.Util.GetCookie("EQPlayerVer");
            } else {
                inCookie = params.inCookieVer;
            }

            params.inCookieCurrentTime = jstream_t3.utils.Util.GetCookie("EQPlayer_resume_CurrentTime_" + params.meta_id + "_" + params.contract_id);
            params.inCookieVolume = jstream_t3.utils.Util.GetCookie("EQPlayer_resume_Volume");
            var arr_uri = location.hostname.match(/^(.*?)([a-z0-9][a-z0-9\-]{1,63}\.[a-z\.]{2,6})$/i);
            if (arr_uri == null) {
                params.CookieDomain = ".localhost";
            } else {
                params.CookieDomain = "." + arr_uri[2];
            }

            var src = "";
            var baseURL = params.b;
            if (window.location.protocol === "https:") {
                var paths = baseURL.split("/");
                paths.shift();
                baseURL = "https://ssl-cache.stream.ne.jp/" + paths.join("/");
            } else {
                baseURL = "http://" + baseURL;
            }
            if (inCookie != null && inCookie == "nextVer") {
                src = baseURL + "t3/next/" + "obj.js";
            } else {
                src = baseURL + "t3/old/" + "obj.js";
            }

            var instance;
            if (!params.noPlayer) {
                params.noPlayer = false;
                instance = new PlayerFactoryOBJ(params, embedTagID);
                return instance.jmcPlayer;
            }
            instance = new PlayerFactoryOBJ(params, embedTagID);
            params.noPlayer = false;
            var callbackNum = Math.floor(Math.random() * (9999 - 1000) + 1000);
            window["instance" + callbackNum] = instance;

            var script = document.createElement('script');
            script.type = 'text/javascript';
            script.charset = 'utf-8';
            script.src = src;
            var parentDivID = callbackNum.toString();
            params.parentDivID = parentDivID;
            var parentDiv = document.createElement("div");
            parentDiv.id = parentDivID;

            if (params.isLightBox != true) {
                if (embedTagID != null) {
                    document.getElementById(embedTagID).appendChild(parentDiv);
                } else {
                    var style = "";
                    if (params.responsive == "fit") {
                        style = "style = 'height:100%;width:100%;position:absolute;top:0px;left:0px;'";
                    } else if (params.responsive != "on") {
                        style = "style = 'width:" + params.width + "px;'";
                    }
                    document.write("<div id='" + parentDivID + "' " + style + " ></div>");
                }
            }
            if (script.addEventListener) {
                script.onload = function () {
                    var temp = instance.jmcPlayer.accessor.listeners;
                    instance.jmcPlayer.accessor = jstream_t3.PlayerFactoryOBJ.createPlayer(params, embedTagID).accessor;
                    var tempObjList = Object.keys(temp);
                    for (var tmpObj in tempObjList) {
                        if (!(tempObjList[tmpObj] in instance.jmcPlayer.accessor.listeners)) {
                            instance.jmcPlayer.accessor.listeners[tempObjList[tmpObj]] = (temp[tempObjList[tmpObj]]);
                        }
                    }
                    clearTimeout(timer);
                };
                script.onerror = function (ev) {
                    clearTimeout(timer);
                };
            } else if (script.readyState) {
                script.onreadystatechange = function () {
                    script.onreadystatechange = null;
                    var temp = instance.jmcPlayer.accessor.listeners;
                    instance.jmcPlayer.accessor = jstream_t3.PlayerFactoryOBJ.createPlayer(params, embedTagID).accessor;
                    var tempObjList = Object.keys(temp);
                    for (var tmpObj in tempObjList) {
                        if (!(tempObjList[tmpObj] in instance.jmcPlayer.accessor.listeners)) {
                            instance.jmcPlayer.accessor.listeners[tempObjList[tmpObj]] = (temp[tempObjList[tmpObj]]);
                        }
                    }
                    clearTimeout(timer);
                };
            }

            var parent = document.getElementById(parentDivID);
            if (jstream_t3.utils.Util.getUserAgent() == "ie8") {
                document.attachEvent("DOMContentLoaded", function (e) {
                    parent.appendChild(script);
                });
            } else {
                parent.appendChild(script);
            }

            var timer = setTimeout(function () {
                clearTimeout(timer);
            }, 0);
            return window["instance" + callbackNum].jmcPlayer;
        };
        PlayerFactoryOBJ.createPlayer = function (params, embedTagID) {
            if (typeof embedTagID === "undefined") { embedTagID = null; }
            var instance = new PlayerFactoryOBJ(params, embedTagID);
            return instance.jmcPlayer;
        };

        PlayerFactoryOBJ.prototype.createID = function () {
            return this.params.contract_id + "-" + this.params.meta_id + "-" + this.params.file_id + "-" + Math.floor(Math.random() * 100000);
        };

        PlayerFactoryOBJ.prototype.exec = function () {
            var _this = this;
            var params = this.params;

            var jmcPlayer = this.jmcPlayer;
            var _this = this;
            jmcPlayer.flashVars = params;

            jmcPlayer.errorHandler = function (message) {
                _this.next();
            };

            jmcPlayer.accessor.loadPDSetting(function () {
                jmcPlayer.accessor.loadSettingData(function () {
                    if (params.responsive == "on" || params.responsive == "fit") {
                        _this.setTagSize();
                    }
                    jmcPlayer.accessor.loadMetaData(function () {
                        jmcPlayer.accessor.loadHostCheck2(function () {
                            jmcPlayer.create();

                            if ((params.getEnvironmentType() == jstream_t3.EnviromentKind.MOBILE_PROGRESSIVE || params.getEnvironmentType() == jstream_t3.EnviromentKind.MOBILE_STREAMING) && params.isAuthEnable()) {
                                if (params.init_play == "off" && !params.a) {
                                    if (params.isLightbox)
                                        jmcPlayer.html5Player.setAuthVisible(true);
                                } else {
                                    jmcPlayer.accessor.play();
                                }
                            }
                            _this.next();
                        });
                    });
                });
            });
        };
        return PlayerFactoryOBJ;
    })(jstream_t3.PlayerFactoryBase);
    jstream_t3.PlayerFactoryOBJ = PlayerFactoryOBJ;
})(jstream_t3 || (jstream_t3 = {}));
/* md5.js - MD5 Message-Digest
 * Copyright (C) 1999,2002 Masanao Izumo <iz@onicos.co.jp>
 * Version: 2.0.0
 * LastModified: May 13 2002
 *
 * This program is free software.  You can redistribute it and/or modify
 * it without any warranty.  This library calculates the MD5 based on RFC1321.
 * See RFC1321 for more information and algorism.
 */

/* Interface:
 * md5_128bits = MD5_hash(data);
 * md5_hexstr = MD5_hexhash(data);
 */

/* ChangeLog
 * 2002/05/13: Version 2.0.0 released
 * NOTICE: API is changed.
 * 2002/04/15: Bug fix about MD5 length.
 */


//    md5_T[i] = parseInt(Math.abs(Math.sin(i)) * 4294967296.0);
var MD5_T = new Array(0x00000000, 0xd76aa478, 0xe8c7b756, 0x242070db,
		      0xc1bdceee, 0xf57c0faf, 0x4787c62a, 0xa8304613,
		      0xfd469501, 0x698098d8, 0x8b44f7af, 0xffff5bb1,
		      0x895cd7be, 0x6b901122, 0xfd987193, 0xa679438e,
		      0x49b40821, 0xf61e2562, 0xc040b340, 0x265e5a51,
		      0xe9b6c7aa, 0xd62f105d, 0x02441453, 0xd8a1e681,
		      0xe7d3fbc8, 0x21e1cde6, 0xc33707d6, 0xf4d50d87,
		      0x455a14ed, 0xa9e3e905, 0xfcefa3f8, 0x676f02d9,
		      0x8d2a4c8a, 0xfffa3942, 0x8771f681, 0x6d9d6122,
		      0xfde5380c, 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60,
		      0xbebfbc70, 0x289b7ec6, 0xeaa127fa, 0xd4ef3085,
		      0x04881d05, 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8,
		      0xc4ac5665, 0xf4292244, 0x432aff97, 0xab9423a7,
		      0xfc93a039, 0x655b59c3, 0x8f0ccc92, 0xffeff47d,
		      0x85845dd1, 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314,
		      0x4e0811a1, 0xf7537e82, 0xbd3af235, 0x2ad7d2bb,
		      0xeb86d391);

var MD5_round1 = new Array(new Array( 0, 7, 1), new Array( 1,12, 2),
			   new Array( 2,17, 3), new Array( 3,22, 4),
			   new Array( 4, 7, 5), new Array( 5,12, 6),
			   new Array( 6,17, 7), new Array( 7,22, 8),
			   new Array( 8, 7, 9), new Array( 9,12,10),
			   new Array(10,17,11), new Array(11,22,12),
			   new Array(12, 7,13), new Array(13,12,14),
			   new Array(14,17,15), new Array(15,22,16));

var MD5_round2 = new Array(new Array( 1, 5,17), new Array( 6, 9,18),
			   new Array(11,14,19), new Array( 0,20,20),
			   new Array( 5, 5,21), new Array(10, 9,22),
			   new Array(15,14,23), new Array( 4,20,24),
			   new Array( 9, 5,25), new Array(14, 9,26),
			   new Array( 3,14,27), new Array( 8,20,28),
			   new Array(13, 5,29), new Array( 2, 9,30),
			   new Array( 7,14,31), new Array(12,20,32));

var MD5_round3 = new Array(new Array( 5, 4,33), new Array( 8,11,34),
			   new Array(11,16,35), new Array(14,23,36),
			   new Array( 1, 4,37), new Array( 4,11,38),
			   new Array( 7,16,39), new Array(10,23,40),
			   new Array(13, 4,41), new Array( 0,11,42),
			   new Array( 3,16,43), new Array( 6,23,44),
			   new Array( 9, 4,45), new Array(12,11,46),
			   new Array(15,16,47), new Array( 2,23,48));

var MD5_round4 = new Array(new Array( 0, 6,49), new Array( 7,10,50),
			   new Array(14,15,51), new Array( 5,21,52),
			   new Array(12, 6,53), new Array( 3,10,54),
			   new Array(10,15,55), new Array( 1,21,56),
			   new Array( 8, 6,57), new Array(15,10,58),
			   new Array( 6,15,59), new Array(13,21,60),
			   new Array( 4, 6,61), new Array(11,10,62),
			   new Array( 2,15,63), new Array( 9,21,64));

function MD5_F(x, y, z) { return (x & y) | (~x & z); }
function MD5_G(x, y, z) { return (x & z) | (y & ~z); }
function MD5_H(x, y, z) { return x ^ y ^ z;          }
function MD5_I(x, y, z) { return y ^ (x | ~z);       }

var MD5_round = new Array(new Array(MD5_F, MD5_round1),
			  new Array(MD5_G, MD5_round2),
			  new Array(MD5_H, MD5_round3),
			  new Array(MD5_I, MD5_round4));

function MD5_pack(n32) {
  return String.fromCharCode(n32 & 0xff) +
	 String.fromCharCode((n32 >>> 8) & 0xff) +
	 String.fromCharCode((n32 >>> 16) & 0xff) +
	 String.fromCharCode((n32 >>> 24) & 0xff);
}

function MD5_unpack(s4) {
  return  s4.charCodeAt(0)        |
	 (s4.charCodeAt(1) <<  8) |
	 (s4.charCodeAt(2) << 16) |
	 (s4.charCodeAt(3) << 24);
}

function MD5_number(n) {
  while (n < 0)
    n += 4294967296;
  while (n > 4294967295)
    n -= 4294967296;
  return n;
}

function MD5_apply_round(x, s, f, abcd, r) {
  var a, b, c, d;
  var kk, ss, ii;
  var t, u;

  a = abcd[0];
  b = abcd[1];
  c = abcd[2];
  d = abcd[3];
  kk = r[0];
  ss = r[1];
  ii = r[2];

  u = f(s[b], s[c], s[d]);
  t = s[a] + u + x[kk] + MD5_T[ii];
  t = MD5_number(t);
  t = ((t<<ss) | (t>>>(32-ss)));
  t += s[b];
  s[a] = MD5_number(t);
}

function MD5_hash(data) {
  var abcd, x, state, s;
  var len, index, padLen, f, r;
  var i, j, k;
  var tmp;

  state = new Array(0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476);
  len = data.length;
  index = len & 0x3f;
  padLen = (index < 56) ? (56 - index) : (120 - index);
  if(padLen > 0) {
    data += "\x80";
    for(i = 0; i < padLen - 1; i++)
      data += "\x00";
  }
  data += MD5_pack(len * 8);
  data += MD5_pack(0);
  len  += padLen + 8;
  abcd = new Array(0, 1, 2, 3);
  x    = new Array(16);
  s    = new Array(4);

  for(k = 0; k < len; k += 64) {
    for(i = 0, j = k; i < 16; i++, j += 4) {
      x[i] = data.charCodeAt(j) |
	    (data.charCodeAt(j + 1) <<  8) |
	    (data.charCodeAt(j + 2) << 16) |
	    (data.charCodeAt(j + 3) << 24);
    }
    for(i = 0; i < 4; i++)
      s[i] = state[i];
    for(i = 0; i < 4; i++) {
      f = MD5_round[i][0];
      r = MD5_round[i][1];
      for(j = 0; j < 16; j++) {
	MD5_apply_round(x, s, f, abcd, r[j]);
	tmp = abcd[0];
	abcd[0] = abcd[3];
	abcd[3] = abcd[2];
	abcd[2] = abcd[1];
	abcd[1] = tmp;
      }
    }

    for(i = 0; i < 4; i++) {
      state[i] += s[i];
      state[i] = MD5_number(state[i]);
    }
  }

  return MD5_pack(state[0]) +
	 MD5_pack(state[1]) +
	 MD5_pack(state[2]) +
	 MD5_pack(state[3]);
}

function MD5_hexhash(data) {
    var i, out, c;
    var bit128;

    bit128 = MD5_hash(data);
    out = "";
    for(i = 0; i < 16; i++) {
	c = bit128.charCodeAt(i);
	out += "0123456789abcdef".charAt((c>>4) & 0xf);
	out += "0123456789abcdef".charAt(c & 0xf);
    }
    return out;
}

Anon7 - 2021