window[LightSliderRelatedInit] = new LightSliderRelatedInit();
window[LazyLoadInit] = new LazyLoadInit();
window[HomeMenu] = new HomeMenu();
-window[Audio] = new Audio();
+window['Audio'] = new Audio();
window['Video'] = new Video();
window[VideoOverlay] = new VideoOverlay();
window[Instagram] = new Instagram();
-var Audio = function() {
+var Audio = function(context) {
+
+ this.context = context || $('body');
+
+ this.audios = [];
+ this.playlists = [];
//
// Init
//
this.init();
- this.audios = [];
- this.playlists = [];
-
};
Audio.prototype.init = function() {
};
+Audio.prototype.play = function(e) {
+
+ this.audios[0].play();
+
+}
+
module.exports = Audio;
+var Audio = require('./audio');
+var Video = require('./video');
+
var VideoOverlay = function() {
this.$overlay = $('#overlay');
that.$overlayContent.load(url, function() {
- var player = window['Video'].init();
+ if($('video', that.$overlay).length > 0) {
+ var player = new Video(that.$overlay);
+ } else {
+ var player = new Audio(that.$overlay);
+ }
+
setTimeout(function() {
player.play();
that.$overlayLoader.hide();
-var Video = function() {
+var Video = function(context) {
this.player = null;
+ this.context = context || $('body');
//
// Init
//
- if($('#video-js-playlist').length > 0) {
+ if($('#video-js-playlist', this.context).length > 0) {
this.init();
}
};
+Video.prototype.play = function(e) {
+
+ this.player.play();
+
+}
+
Video.prototype.open = function(e) {
left: 50%;
@include transform(translateX(-50%) translateY(-50%));
+
+ }
+
+ &--audio {
+ &:after {
+ content: "\f028";
+ }
}
}
padding: 0;
background: $color-black-light;
list-style-type: none;
+ color: $color-background;
&__item {
@include typeface(serif);
font-weight: weight(bold);
font-style: italic;
+ color: $color-background;
span {
/*@include font-size(m);
<div class="mb1 col-md-10 col-md-push-3 page__content" data-summary-content>
- <div class="embed-responsive">
- <video controls id="video-js-playlist" class="video-js vjs-ircam-skin" data-title="{{ media.title }}" {% if media.poster_url %}poster="{{ media.poster_url }}"{% endif %}>
- </video>
- </div>
- <ol class="video-playlist">
- {% spaceless %}
- <li class="video-playlist__item{% if forloop.first %} playing{% endif %}"><a href="#" data-poster="{{media.poster_url }}" data-src="{% for transcoded in media.transcoded.all %}{% if forloop.first %}{% else %},{% endif %}{{ transcoded.url }}{% if forloop.last %}{% endif %}{% endfor %}" data-mime="{% for transcoded in media.transcoded.all %}{% if forloop.first %}{% else %},{% endif %}{{ transcoded.mime_type }}{% if forloop.last %}{% endif %}{% endfor %}"><span>{{ media.title }}</span></a></li>
- {% endspaceless %}
+ <audio preload="true"></audio>
+
+ <ol class="audio-playlist">
+ <li class="audio-playlist__item">
+ {% for transcoded in media.transcoded.all %}
+ {% if transcoded.mime_type == "audio/mp4" or transcoded.mime_type == "audio/mp3" %}
+ <a href="#" data-src="{{ transcoded.url }}"><span>{{ media.title }}</span>{% if media.description %}<small> {{ media.description }}</small>{% endif %}</a>
+ {% endif %}
+ {% endfor %}
+ </li>
</ol>
</div>
<div class="">
<div class="media-box media-box--{{object|get_media_type|lower}}">
<a class="media-box__image-container" href="{% url 'organization-media-overlay' object.type object.slug %}" data-video-overlay>
- <figure class="media-box__image media-box__image--video">
+ <figure class="media-box__image media-box__image--{{ object|get_media_type|lower }}">
{% if object.poster_url %}
<img src="{{ object.poster_url }}">
{% else %}