try {
	self.ss_playerId = flashId;
	self.ss_videoPlayerWidth = document.getElementById(flashId).width;
	self.ss_videoPlayerHeight = document.getElementById(flashId).height;
	self.ss_playerWMode = config["wmode"]; //hack to get around BrightCove shortfall with wmode
} catch (err){
	//if these are not set, then they have to have been set in the page
	self.ss_playerWMode = "transparent";
}


	self.ss_playerType = "flashint";
	self.ss_adType = "overlay";
	self.ss_videoAdType = "overlay";
	
	self.ss_pauseVideoFunction = pause_brightCove;
	self.ss_resumeVideoFunction = resume_brightCove;
	self.ss_getVideoPlayPositionFunction = getVideoPosition_brightCove;

	
	
	var ss_videoIsPaused = false;
	function pause_brightCove(){
		ss_videoIsPaused = true;
		callFlash("pauseVideo");
	}
	function resume_brightCove(){
		callFlash("pauseVideo");
	}

	var bcPlayPosition = 0;  //this will get updated with playPosition
	function getVideoPosition_Result(position) {
		bcPlayPosition = position * 1000; //needs to be in milliseconds
	}
	function getVideoPosition_brightCove(){
		callFlash("getVideoPosition");
		return bcPlayPosition;
	}


	function onTemplateLoaded(message) {
		callFlash("addEventListener", "pause", "onMediaPause");
		callFlash("addEventListener", "mediaStart", "onMediaStart");
	}

	function onMediaPause() {   //this is just used to set ss_videoIsPaused=true so that onMediaStart will not restart scanscout
		pause_brightCove();
	}


	var initialContentId = '';
	function onMediaStart() {
		if (self.ss_noScanScout == "true"){
			//don't do anything
		} else {
			if (!ss_videoIsPaused){
				callFlash("getCurrentTitle");
				if (initialContentId != self.ss_mediaId){
					ss_restart();
					ss_debugVideoMetadata();
				}
				initialContentId = self.ss_mediaId;
			}
			ss_videoIsPaused = false;
		} 
	}
	//this will set up the metadata for the current Video
	function getCurrentTitle_Result(titleDTO){
		self.ss_mediaId =  titleDTO.referenceId != null ? titleDTO.referenceId : titleDTO.id;
		self.ss_mediaURL = (titleDTO.FLVFullLengthURL != null ? titleDTO.FLVFullLengthURL.toString() : '');
		self.ss_mediaCategories = _getMetadataCommaList(titleDTO.categories);
		self.ss_mediaKeywords = _getMetadataCommaList(titleDTO.tags);
		self.ss_mediaDescription = getContentDescription(titleDTO);
		self.ss_mediaTitle = getContentDescription(titleDTO);
	}

	//this will return a comma-separated string with the members of the array
	function _getMetadataCommaList(metadataArray){
		var metadataList = '';
		if (metadataArray != null){
			for (var i = 0; i < metadataArray.length; i++){
				metadataList += metadataArray[i];
				if ((i+1) < metadataArray.length){
					metadataList += ",";
				}
			}
		}
		return metadataList;
	}
	function getContentDescription(titleDTO){
		var longDesc = titleDTO.longDescription;
		var shortDesc = titleDTO.shortDescription;
		return (longDesc == null && shortDesc == null) ? '' : ((longDesc != null) ? longDesc : shortDesc);
	}
