2016-08-19 09:19:06 +02:00
|
|
|
| {% block body %}
|
|
|
|
|
|
|
|
#node-container
|
|
|
|
#node-overlay
|
|
|
|
|
|
|
|
section.node-preview.video
|
2017-02-02 16:06:41 +01:00
|
|
|
| {% if node.video_sources %}
|
2017-09-20 16:18:05 +02:00
|
|
|
video#videoplayer.video-js(
|
2017-02-02 16:06:41 +01:00
|
|
|
controls,
|
|
|
|
data-setup="{}",
|
|
|
|
preload="auto",
|
|
|
|
poster="{% if node.picture %}{{ node.picture.thumbnail('l', api=api) }}{% endif %}")
|
|
|
|
| {% for source in node.video_sources %}
|
|
|
|
source(
|
|
|
|
src="{{ source.src }}",
|
|
|
|
type="{{ source.type }}")
|
|
|
|
| {% endfor %}
|
|
|
|
p.vjs-no-js.
|
|
|
|
To view this video please enable JavaScript, and consider upgrading to a web browser that
|
|
|
|
<a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
|
|
|
|
| {% else %}
|
|
|
|
.video-dummy.sorry(
|
2017-02-02 18:05:30 +01:00
|
|
|
style="{% if node.picture %}background-image: url({{ node.picture.thumbnail('l', api=api) }});{% endif %}")
|
2017-02-02 16:06:41 +01:00
|
|
|
.video-dummy-content
|
|
|
|
.video-dummy-content-text
|
2017-09-20 14:19:15 +02:00
|
|
|
span Available to Blender Cloud subscribers
|
|
|
|
span
|
|
|
|
small Support Blender and get awesome stuff!
|
|
|
|
hr
|
|
|
|
a.subscribe(href="{{ url_for('cloud.join') }}") <em>Subscribe</em>
|
|
|
|
a(href="{{ url_for('users.login') }}") Already a subscriber? Log in
|
2017-02-02 16:06:41 +01:00
|
|
|
| {% endif %}
|
2016-08-19 09:19:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
section.node-details-container.video
|
|
|
|
|
|
|
|
.node-details-header
|
|
|
|
.node-title#node-title
|
|
|
|
| {{node.name}}
|
|
|
|
|
|
|
|
| {% if node.description %}
|
|
|
|
.node-details-description#node-description
|
|
|
|
| {{node.description}}
|
|
|
|
| {% endif %}
|
|
|
|
|
2017-09-04 19:46:42 +02:00
|
|
|
include ../../_node_details
|
2016-08-19 09:19:06 +02:00
|
|
|
|
2016-11-01 15:53:16 +01:00
|
|
|
#comments-embed
|
2017-09-30 23:21:54 +02:00
|
|
|
.comments-list-loading
|
2016-08-19 09:19:06 +02:00
|
|
|
i.pi-spin
|
|
|
|
|
2017-02-02 17:40:04 +01:00
|
|
|
script(type="text/javascript").
|
2017-02-06 12:07:05 +01:00
|
|
|
{% if node.video_sources %}
|
2017-10-24 12:38:11 +02:00
|
|
|
|
|
|
|
var videoPlayer = document.getElementById('videoplayer');
|
|
|
|
|
|
|
|
var options = {
|
|
|
|
controlBar: {
|
|
|
|
volumePanel: { inline: false }
|
2017-02-08 16:27:52 +01:00
|
|
|
}
|
2017-10-24 12:38:11 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
videojs.registerPlugin('analytics', function() {
|
|
|
|
this.ga({
|
|
|
|
'eventLabel' : '{{ node._id }} - {{ node.name }}',
|
|
|
|
'eventCategory' : '{{ node.project }}',
|
|
|
|
'eventsToTrack' : ['start', 'error', 'percentsPlayed']
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
videojs(videoPlayer, options).ready(function() {
|
|
|
|
this.hotkeys();
|
|
|
|
});
|
|
|
|
|
|
|
|
function addVideoPlayerButton(data) {
|
|
|
|
|
|
|
|
var controlBar,
|
|
|
|
newButton = document.createElement('button'),
|
|
|
|
buttonContent = document.createElement('span');
|
|
|
|
|
|
|
|
newButton.className = 'vjs-control vjs-button ' + data.class;
|
|
|
|
buttonContent.className = 'vjs-icon-placeholder';
|
|
|
|
|
|
|
|
newButton.appendChild(buttonContent);
|
|
|
|
controlBar = document.getElementsByClassName('vjs-control-bar')[0];
|
|
|
|
insertBeforeButton = document.getElementsByClassName('vjs-fullscreen-control')[0];
|
|
|
|
controlBar.insertBefore(newButton, insertBeforeButton);
|
|
|
|
|
|
|
|
return newButton;
|
|
|
|
}
|
|
|
|
|
|
|
|
var videoPlayerLoopButton = addVideoPlayerButton({
|
|
|
|
player: videoPlayer,
|
|
|
|
class: 'vjs-loop-button',
|
|
|
|
icon: "pi-replay"
|
|
|
|
});
|
|
|
|
|
|
|
|
videoPlayerLoopButton.onclick = function() {
|
|
|
|
if (videoPlayer.loop){
|
|
|
|
videoPlayer.loop = false;
|
|
|
|
$(this).removeClass('vjs-control-active');
|
|
|
|
|
|
|
|
} else {
|
|
|
|
videoPlayer.loop = true;
|
|
|
|
$(this).addClass('vjs-control-active');
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-02-06 12:07:05 +01:00
|
|
|
{% endif %}
|
2017-02-02 17:40:04 +01:00
|
|
|
|
2016-08-19 09:19:06 +02:00
|
|
|
$(function(){
|
|
|
|
// Generate GA pageview
|
|
|
|
ga('send', 'pageview', location.pathname);
|
|
|
|
|
|
|
|
var content_type = $("li.node-details-meta-list-item.type").text();
|
|
|
|
$("li.node-details-meta-list-item.type").text(content_type.substring(content_type.indexOf("/") + 1));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2017-02-06 12:07:05 +01:00
|
|
|
include ../../_scripts
|
|
|
|
|
2016-08-19 09:19:06 +02:00
|
|
|
| {% endblock %}
|