+++ /dev/null
-<audio preload="true"></audio>
-<ol class="audio-playlist">
-
- {% for audio in object %}
-
- <li class="audio-playlist__item">
- <a href="#" data-src="{{ audio.open_source_url }}">{{ audio.title }}</a>
- </li>
-
- {% comment %}
-
- {# audio.title #}<br>
- {# audio.open_source_mime_type #}<br>
- {# audio.closed_source_mime_type #}<br>
- {# audio.category #}<br>
- {# audio.media_id #}<br>
- {# audio.open_source_url #}<br>
- {# audio.closed_source_url #}<br>
- {# audio.poster_url #}<br>
- <audio>
- <source src="{{ audio.open_source_url }}" type="{{ audio.open_source_mime_type }}">
- <source src="{{ audio.closed_source_mime_type }}" type="{{ audio.closed_source_url }}">
- Your browser does not support the audio element.
- </audio>
-
- {% endcomment %}
-
- {% endfor %}
-
-</ol>
+++ /dev/null
-{% load mezzanine_tags keyword_tags i18n organization_tags %}
-{% for media in home.dynamic_content_home_media.all|slice:":3" %}
- <div class="col-xs-3">
- <div class="home__shutter-item">
- <h2>{{ media.content_object.title }}</h2>
- {% if media.content_object.description %}
- <p>{{ media.content_object.description|truncatechars:100 }}</p>
- {% endif %}
- {% if media.content_object.poster_url %}
- <img src="{% thumbnail media.content_object.poster_url 203 140 %}">
- {% endif %}
- {% if media.content_type.model == 'video' %}
- <a href="{# media.content_object.get_absolute_url #}" title="">{% trans 'See the video' %}</a>
- {% elif media.content_type.model == 'audio' %}
- <a href="{# media.content_object.get_absolute_url #}" title="">{% trans 'Hear the sound' %}</a>
- {% endif %}
- </div>
- </div>
-{% endfor %}
--- /dev/null
+<audio preload="true"></audio>
+
+<ol class="audio-playlist">
+ {% for media in playlist %}
+ <li class="audio-playlist__item">
+ {% for transcoded_media in media.transcoded.all %}
+ <a href="#" data-src="{{ transcoded_media.url }}">{{ media.title }}</a>
+ {% endfor %}
+ </li>
+ {% endfor %}
+</ol>
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+{% load mezzanine_tags keyword_tags %}
+
+{% block title %}
+{{ playlist.title }}
+{% endblock %}
+
+{% block main %}
+
+{% for media in playlist.medias.all %}
+ {% if forloop.first %}
+ <div class="embed-responsive">
+ <audio width="100%" poster="{{ media.poster_url }}" controls data-title="{{ media.title }}" preload="none">
+ {% for transcoded_media in media.transcoded.all %}
+ <source src="{{ transcoded_media.url }}" type="{{ transcoded_media.mime_type }}" />
+ {% endfor %}
+ </audio>
+ </div>
+ <ul>
+ {% else %}
+ <li>{{ media.title }}</li>
+ {% endif %}
+ {% if forloop.last %}
+ </ul>
+ {% endif %}
+{% endfor %}
+
+<div class="video-html">
+ {{ playlist.content|safe }}
+</div>
+
+{% with playlist as object %}
+ {% include "includes/share_buttons.html" %}
+{% endwith %}
+
+{% endblock %}
--- /dev/null
+{% load mezzanine_tags keyword_tags i18n organization_tags %}
+{% for media in home.dynamic_content_home_media.all|slice:":3" %}
+ <div class="col-xs-3">
+ <div class="home__shutter-item">
+ <h2>{{ media.content_object.title }}</h2>
+ {% if media.content_object.description %}
+ <p>{{ media.content_object.description|truncatechars:100 }}</p>
+ {% endif %}
+ {% if media.content_object.poster_url %}
+ <img src="{% thumbnail media.content_object.poster_url 203 140 %}">
+ {% endif %}
+ {% if media.content_type.model == 'video' %}
+ <a href="{# media.content_object.get_absolute_url #}" title="">{% trans 'See the video' %}</a>
+ {% elif media.content_type.model == 'audio' %}
+ <a href="{# media.content_object.get_absolute_url #}" title="">{% trans 'Hear the sound' %}</a>
+ {% endif %}
+ </div>
+ </div>
+{% endfor %}
--- /dev/null
+<video preload="true"></video>
+
+<ol class="audio-playlist">
+ {% for media in playlist %}
+ <li class="video-playlist__item">
+ {% for transcoded_media in media.transcoded.all %}
+ <a href="#" data-src="{{ transcoded_media.url }}">{{ media.title }}</a>
+ {% endfor %}
+ </li>
+ {% endfor %}
+</ol>
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+{% load mezzanine_tags keyword_tags %}
+
+{% block title %}
+{{ playlist.title }}
+{% endblock %}
+
+{% block main %}
+
+{% for media in playlist.medias.all %}
+ {% if forloop.first %}
+ <div class="embed-responsive">
+ <video width="100%" poster="{{ media.poster_url }}" controls data-title="{{ media.title }}" preload="none">
+ {% for transcoded_media in media.transcoded.all %}
+ <source src="{{ transcoded_media.url }}" type="{{ transcoded_media.mime_type }}" />
+ {% endfor %}
+ </video>
+ </div>
+ <ol>
+ {% else %}
+ <li>{{ media.title }}</li>
+ {% endif %}
+ {% if forloop.last %}
+ </ol>
+ {% endif %}
+{% endfor %}
+
+<div class="video-html">
+ {{ playlist.content|safe }}
+</div>
+
+{% with playlist as object %}
+ {% include "includes/share_buttons.html" %}
+{% endwith %}
+
+{% endblock %}
+++ /dev/null
-{% extends "pages/page.html" %}
-{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %}
-
-{% block meta_title %}{% trans "Media" %}{% endblock %}
-
-{% block meta_keywords %}{% metablock %}
-{% keywords_for person as keywords %}
-{% for keyword in keywords %}
- {% if not forloop.first %}, {% endif %}
- {{ keyword }}
-{% endfor %}
-{% endmetablock %}{% endblock %}
-
-{% block page_class %}
- person
-{% endblock %}
-
-{% block breadcrumb_menu %}
- {{ block.super }}
- <li class="breadcrumb__item active">{% trans "Media" %}</li>
-{% endblock %}
-
-{% block page_title %}
- {% editable person.title %}
- <h1 class="dotted">{% trans "Media" %}</h1>
- {% endeditable %}
-{% endblock %}
-
-{% block page_content %}
- {# not working for audio for the moment... #}
- {% for object in media %}
- {% with object|classname|lower as class_name %}
- {% with "media/"|add:class_name|add:"/inc/"|add:class_name|add:"_card.html" as template %}
- {% include template %}
- {% endwith %}
- {% endwith %}
- {{ object|classname }} : {{ object.created_at }} : {{ object.title }}
- <br>
- {% endfor %}
-
-{% endblock %}
--- /dev/null
+{% extends "pages/page.html" %}
+{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %}
+
+{% block meta_title %}{% trans "Media" %}{% endblock %}
+
+{% block meta_keywords %}{% metablock %}
+{% keywords_for person as keywords %}
+{% for keyword in keywords %}
+ {% if not forloop.first %}, {% endif %}
+ {{ keyword }}
+{% endfor %}
+{% endmetablock %}{% endblock %}
+
+{% block page_class %}
+ person
+{% endblock %}
+
+{% block breadcrumb_menu %}
+ {{ block.super }}
+ <li class="breadcrumb__item active">{% trans "Media" %}</li>
+{% endblock %}
+
+{% block page_title %}
+ {% editable person.title %}
+ <h1 class="dotted">{% trans "Media" %}</h1>
+ {% endeditable %}
+{% endblock %}
+
+{% block page_content %}
+ {% for object in media %}
+ {% with object|classname|lower as class_name %}
+ {% with "media/"|add:class_name|add:"/inc/"|add:class_name|add:"_card.html" as template %}
+ {% include template %}
+ {% endwith %}
+ {% endwith %}
+ {{ object|classname }} : {{ object.created_at }} : {{ object.title }}
+ <br>
+ {% endfor %}
+{% endblock %}
--- /dev/null
+{% extends "pages/page.html" %}
+{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %}
+
+{% block meta_title %}{% trans "Media" %}{% endblock %}
+
+{% block meta_keywords %}{% metablock %}
+{% keywords_for person as keywords %}
+{% for keyword in keywords %}
+ {% if not forloop.first %}, {% endif %}
+ {{ keyword }}
+{% endfor %}
+{% endmetablock %}{% endblock %}
+
+{% block page_class %}
+ person
+{% endblock %}
+
+{% block breadcrumb_menu %}
+ {{ block.super }}
+ <li class="breadcrumb__item active">{% trans "Media" %}</li>
+{% endblock %}
+
+{% block page_title %}
+ {% editable person.title %}
+ <h1 class="dotted">{% trans "Media" %}</h1>
+ {% endeditable %}
+{% endblock %}
+
+{% block page_content %}
+ {# not working for audio for the moment... #}
+ {% for playlist in playlists %}
+ {% with playlist.type as type %}
+ {% with "media/inc/playlist_"|add:type|add:"_card.html" as template %}
+ {% include template %}
+ {% endwith %}
+ {% endwith %}
+ {{ playlist|classname }} : {{ playlist.created }} : {{ playlist.title }}
+ <br>
+ {% endfor %}
+
+{% endblock %}
+++ /dev/null
-{% for video in videos %}
- {% comment %}
- {# video.title #}<br>
- {# video.open_source_mime_type #}<br>
- {# video.closed_source_mime_type #}<br>
- {# video.category #}<br>
- {# video.media_id #}<br>
- {# video.open_source_url #}<br>
- {# video.closed_source_url #}<br>
- {# video.poster_url #}<br>
- {% endcomment %}
-
- <video width="905" height="520" controls>
- <source src="{{ video.closed_source_url }}" type="{{ video.closed_source_mime_type }}">
- <source src="{{ video.open_source_url }}" type="{{ video.open_source_mime_type }}">
- Your browser does not support the video tag.
- </video>
-{% endfor %}
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% load mezzanine_tags keyword_tags %}
-
-{% block title %}
-{{ video.title }}
-{% endblock %}
-
-{% block main %}
-
-<div class="video-html">
- {{ video.content|safe }}
-</div>
-
-<div class="embed-responsive">
- <video width="100%" poster="{{ video.poster_url }}" controls data-title="{{ video.title }}" preload="none">
- <source src="{{ video.open_source_url }}" type="{{ video.open_source_mime_type }}" />
- <source src="{{ video.closed_source_url }}" type="{{ video.closed_source_mime_type }}" />
- </video>
-</div>
-
-{% with video as object %}
- {% include "includes/share_buttons.html" %}
-{% endwith %}
-
-{% endblock %}