Videojs for project video headers
This commit is contained in:
parent
eb02fa5eec
commit
bf0ebce81a
@ -1,19 +1,6 @@
|
|||||||
| {% block head %}
|
| {% block head %}
|
||||||
| {% if header_video_file %}
|
| {% if header_video_file %}
|
||||||
script(src="//releases.flowplayer.org/6.0.5/flowplayer.min.js")
|
script(src="//vjs.zencdn.net/5.8.8/video.js")
|
||||||
script.
|
|
||||||
$(function() {
|
|
||||||
$('#flowplayer_container').flowplayer({
|
|
||||||
key: "{{config.FLOWPLAYER_KEY}}",
|
|
||||||
embed: false,
|
|
||||||
splash: true,
|
|
||||||
clip: { sources: [
|
|
||||||
{% for var in header_video_file.variations %}
|
|
||||||
{type: "{{ var.content_type }}", src: "{{ var.link|safe }}"},
|
|
||||||
{% endfor %}
|
|
||||||
]}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
| {% endblock %}
|
| {% endblock %}
|
||||||
|
|
||||||
@ -22,17 +9,19 @@ script.
|
|||||||
#node-container
|
#node-container
|
||||||
section.node-preview.project
|
section.node-preview.project
|
||||||
| {% if header_video_file %}
|
| {% if header_video_file %}
|
||||||
#flowplayer_container.is-splash.play-button(
|
video.video-js.vjs-fluid(
|
||||||
style="{% if header_video_node.picture %}background-image:url({{header_video_node.picture.thumbnail('l', api=api)}}); background-repeat:no-repeat; {% endif %}")
|
controls,
|
||||||
.fp-startscreen.fp-toggle
|
data-setup="{}",
|
||||||
a.big-play-button
|
preload="auto",
|
||||||
i.pi-play
|
poster="{% if node.picture %}{{ header_video_node.picture.thumbnail('l', api=api) }}{% endif %}")
|
||||||
.fp-endscreen
|
| {% for source in node.video_sources %}
|
||||||
a.watch-again.fp-toggle
|
source(
|
||||||
i.pi-replay
|
src="{{ source.src }}",
|
||||||
| Watch again
|
type="{{ source.type }}")
|
||||||
.fp-waiting
|
| {% endfor %}
|
||||||
i.pi-spin.spin
|
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>
|
||||||
| {% elif project.picture_header %}
|
| {% elif project.picture_header %}
|
||||||
a(href="{{ url_for( 'projects.view', project_url=project.url) }}")
|
a(href="{{ url_for( 'projects.view', project_url=project.url) }}")
|
||||||
img.header(src="{{ project.picture_header.thumbnail('l', api=api) }}")
|
img.header(src="{{ project.picture_header.thumbnail('l', api=api) }}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user