pause_player-8.x-1.3/templates/pause-player-formatter.html.twig

templates/pause-player-formatter.html.twig
<script type="text/javascript">
	//Global variables
	if (typeof PausePlayer_VideosList === "undefined") {
		var PausePlayer_VideosList = [];
	}
	//Configuration of the video file : array for the function createPlayer of Pause Player
	var videoTmp = {
		//player config
		idvideo: "{{idvideo}}", //ID of the HTML element that will contain the video
		width: "{{settings.width}}", //320, 320px, 100%
		height: "{{settings.height}}", //200, 200px, 100%
		appearmode: "{{settings.appearmode}}", //default, onpreload, onplay (play is launched by javascript, playbutton)
		autoplay: {{settings.autoplay}},
		backgroundcolor: "{{settings.backgroundcolor}}", //blue, #4682B4, transparent...
		controlsdisplaymode: "{{settings.controlsdisplaymode}}", //allthetime, disappear, never
        looping: "{{settings.looping}}", //all, none, 0, 1, 2, 3 (index of video to loop)...
        volume: "{{settings.volume}}", //volume : 0 to 100. Volume forced if usersettings inactive. Volume is set but user settings have priority.
        mute: {{settings.mute}}, //volume off
        preloadtime: "{{settings.preloadtime}}", //preload time before playback (in seconds)
        playbutton: "{{settings.playbutton}}", //playbutton : none, javascript, both, start, end
        videodisplaymode: "{{settings.videodisplaymode}}", //default, noresize, stretch, cover (no black bars)
        debug: {{settings.debug}},
        //setDebugLevels : pauseplayer.DEBUGLEVEL_INFO | pauseplayer.DEBUGLEVEL_WARN | pauseplayer.DEBUGLEVEL_ERROR
        //playnonstop
        //loadPolicyFile
        //usersettings
        //language : fr, en
		
		//For commercial player
		startcontent: {
			mode: "{{settings.startcontent_mode}}", //none, videoimage (image associated to the video or screenshot), webimage (image associated to endcontent), html (HTML element)
			image: "{{settings.startcontent_image}}",
			displaymode: "{{settings.startcontent_displaymode}}" //default, noresize, stretch, cover (no black bars)
		},
		endcontent: {
			mode: "{{settings.endcontent_mode}}", //none, videoimage (image associated to the video or screenshot), webimage (image associated to endcontent), html (HTML element)
			image: "{{settings.endcontent_image}}",
			displaymode: "{{settings.endcontent_displaymode}}" //default, noresize, stretch, cover (no black bars)
		},
		disappearmode: "{{settings.disappearmode}}", //disappearmode (endcontent displayed when player disappear) : none (no endcontent), atend (when end of the playing of all videos), onstop, onpause
        //jscommunication/activeJSCommunication : callback, waitdom
		
		//Video config
		playlist: [
			{
				file: "{{url}}",
				title: "{{title}}",
				ratio: "{{settings.ratio}}",
				image: "{{settings.image}}"
			}
		]
	};
	PausePlayer_VideosList.push(videoTmp);
	
	//If the page is ready, we create players
	if (typeof PausePlayer_PageLoaded !== "undefined" && PausePlayer_PageLoaded) {
		pausePlayerManageVideos();
	}
</script>

<div class="pause_player_video {{settings.cssclasses}}">
	<div id="{{idvideo}}" class="videocontainer"></div>
	
	{% if field_type == 'file' %}
		<div class="informations">
			<span class="title">{{title}}</span> 
			{% if size > 0 %}<span class="size"> | {{size}} Ko</span>{% endif %}
			<span class="date"> | {{modificationDateFormat}}</span>
		</div>
		{% if settings.description != NULL and settings.description != '' %}
			<div class="description">
				{{settings.description}}
			</div>
		{% endif %}
	{% endif %}
	
	{% if field_type == 'link' %}
		<div class="informations">
			<span class="title">{{title}}</span>
		</div>
		{% if settings.description != NULL and settings.description != '' %}
			<div class="description">
				{{settings.description}}
			</div>
		{% endif %}
	{% endif %}
</div>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc