{% extends "iri_mashup_home.html" %}
{% load static %}
{% load i18n %}
{% load analytics %}
{% load thumbnail %}
    {% block title %}Lecture du média '{{content.title}}'{% endblock %}   
    {% block css_page %}
    <link rel="stylesheet" href="{% static 'hashcut/iri/css/players.css' %}" />
    {% endblock %} 

{% block wrap_header %}
<div class="wrap-header">  
    <div class="header">
        {% include 'partial/iri_mashup_popin_user.html' %}
        {% include 'partial/iri_hashcut_logo.html' %}
        <div class="title-video-wrap">
            <p class="title-video" href="#">
                <span class="category">Média</span>
                <span class="separator">&raquo;</span>
                {{content.title}}
            </p>
        </div>
        <div class="Ldt-Social">
            <div class="Ldt-Social-Url-Container">
                <a href="#" target="_blank" class="Ldt-Social-Square Ldt-Social-Url" title="Partager le lien"></a>
                <span class="Ldt-Social-UrlPop">
                    <input class="Ldt-Social-Input"/>
                    <div class="Ldt-Social-CopyBtn">Copier</div>
                </span>
            </div>
            <a href="#" target="_blank" class="Ldt-Social-Fb Ldt-Social-Ext" title="Partager sur Facebook"></a>
            <a href="#" target="_blank" class="Ldt-Social-Twitter Ldt-Social-Ext" title="Partager sur Twitter"></a>
            <a href="#" target="_blank" class="Ldt-Social-Gplus Ldt-Social-Ext" title="Partager sur Google+"></a>
            <a href="#" target="_blank" class="Ldt-Social-Mail" title="Partager par mail"></a>
        </div>
        <div class="profil-wrap">
            <ul>
                <li><a href="{% url mashup_home branding=branding %}" class="all-hashcut">Accueil</a></li>
                <li><a href="{% url mashup_edit branding=branding %}" class="new-hashcut">Créer un Hashcut</a></li>
                <li><a href="#user" class="my-profil open-popin">Mon profil</a></li>
            </ul>
        </div>
    </div><!-- header -->
</div><!-- wrap-header -->
{% endblock %}

{% block content %}
<div class="content clearfix">

    <div class="left-content">
        <h2>Lire le Média</h2>
        <div class="bloc-video">
            <div class="video">
                <div class="video-wait"></div>
            </div>
            <div class="widget">
            <div class="Ldt-Slider-Container">
                <div class="Ldt-Slider"></div>
            </div>
            <div class="Ldt-Slider-Time"></div>

            <div class="Ldt-Ctrl">
                <div class="Ldt-Ctrl-Left">
                    <div title="Lecture" class="Ldt-Ctrl-button Ldt-Ctrl-Play Ldt-Ctrl-Play-PlayState"></div>
                    <div class="Ldt-Ctrl-spacer"></div>
                    <div class="Ldt-Ctrl-InOutBlock">
                        <div title="Débuter le segment ici" class="Ldt-Ctrl-button Ldt-Ctrl-SetIn"></div>
                        <div class="Ldt-Ctrl-spacer"></div>
                        <div title="Finir le segment ici" class="Ldt-Ctrl-button Ldt-Ctrl-SetOut"></div>
                        <div class="Ldt-Ctrl-spacer"></div>
                    </div>
                </div>
                <div class="Ldt-Ctrl-Right">
                   <div class="Ldt-Ctrl-spacer"></div>
                   <div class="Ldt-Ctrl-Time">
                       <div title="Temps écoulé" class="Ldt-Ctrl-Time-Elapsed">00:00</div>
                       <div class="Ldt-Ctrl-Time-Separator">/</div>
                       <div title="Temps total" class="Ldt-Ctrl-Time-Total">00:00</div>
                   </div>
                   <div class="Ldt-Ctrl-spacer"></div>
                   <div title="Couper le son" class="Ldt-Ctrl-button Ldt-Ctrl-Sound Ldt-Ctrl-Sound-Full"></div>
                </div>
                <div title="Changer le volume" class="Ldt-Ctrl-Volume-Control">
                   <div class="Ldt-Ctrl-Volume-Bar"></div>
                </div>
            </div>
            
        </div>
            <div class="media-segments"></div>
        </div><!-- bloc-video -->
    </div><!-- left-content -->
    
    <div class="right-content">
        <h2>Plus d’informations</h2>
        <div class="more-info-wrap">
            <table class="more-info ">
                <tbody>
                    <tr class="info-title">
                        <th>Titre :</th>
                        <td><a href="#">{{content.title}}</a></td>
                    </tr>
                    <tr class="info-duration">
                        <th>Durée :</th>
                        <td></td>
                    </tr>
                    <tr class="info-description">
                        <th>Description : </th>
                        <td></td>
                    </tr>
                    <tr class="info-tags">
                        <th>Tags : </th>
                        <td></td>
                    </tr>
                </tbody>
            </table>
        </div>
        </ul>
        <h2>Hashcuts utilisant le média</h2>
        <ul class="list-video">
            
        </ul>
    </div><!-- right-content -->
</div><!-- content -->
{% endblock %}
<!-- JavaScript -->
{% block js_import %}
<script type="text/javascript" src="{% static 'hashcut/lib/jquery.min.js' %}"></script>
<script type="text/javascript" src="{% static 'hashcut/lib/jquery-ui.min.js' %}"></script>
<script type="text/javascript" src="{% static 'hashcut/js/common.js' %}"></script>
<script type="text/javascript" src="{% static 'hashcut/lib/underscore-min.js' %}"></script>
<script type="text/javascript" src="{% static 'hashcut/lib/popcorn-complete.min.js' %}"></script>
<script type="text/javascript" src="{% static 'hashcut/js/hashcut.js' %}"></script>
<script type="text/javascript">
    IriSP.endpoints = {
   		content: "{% url api_dispatch_list api_name='1.0' resource_name='contents' %}",
        project: "{% url api_dispatch_list api_name='1.0' resource_name='projects' %}",
        segment: "{% url api_dispatch_list api_name='1.0' resource_name='segments' %}",
        ldt: "{% url projectjson_id id='' %}",
        hashcut_page: "{% url mashup_hashcut branding=branding ldt_id='' %}"
    };
    
    $(function() {
    	IriSP.video_url_transform = function(oldurl) {
            var newurl = oldurl.replace(/mp4:/i,'');
            newurl = newurl.replace(/ddc_player\//i,'');
            newurl = newurl.replace(/rtmp/i,'http');
            return newurl;
        };
        IriSP.mediaplayer({
            id: "{{ctt_id}}"
        });
        social({
            swf: "{% static 'hashcut/lib/ZeroClipboard.swf' %}"
        });
    });
</script>
{% endblock %}

