Commit c6c84816 authored by Ossi Laine's avatar Ossi Laine
Browse files

Changed audio iframe to audio html -tag

parent df68de51
...@@ -45,13 +45,15 @@ ...@@ -45,13 +45,15 @@
</button> </button>
<div id="export-link-container" class="hidden"> <div id="export-link-container" class="hidden">
<a id="export-link" class="float-right" href="{{ url_for('experiment.download_csv', exp_id=exp.idexperiment) }}" role="button"></a> <a id="export-link" class="float-right"
href="{{ url_for('experiment.download_csv', exp_id=exp.idexperiment) }}" role="button"></a>
<p id="export-error"></p> <p id="export-error"></p>
</div> </div>
<div class="progress hidden"> <div class="progress hidden">
<div id="export-results-bar" class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width: 0%"> <div id="export-results-bar" class="progress-bar progress-bar-striped progress-bar-animated"
role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
</div> </div>
</div> </div>
...@@ -151,7 +153,10 @@ ...@@ -151,7 +153,10 @@
{% elif s.type == 'audio' %} {% elif s.type == 'audio' %}
<td> <td>
<div class="embed-responsive embed-responsive-16by9 "> <div class="embed-responsive embed-responsive-16by9 ">
<iframe class="embed-responsive-item thumbnail" src="/{{ s.media }}" allowFullScreen></iframe> <audio class="embed-responsive-item thumbnail" controls>
<source src="/{{ s.media }}">
Your browser does not support the audio element.
</audio>
</div> </div>
</td> </td>
{% else %} {% else %}
...@@ -176,7 +181,8 @@ ...@@ -176,7 +181,8 @@
<div class="progress hidden" id="plotted-image"> <div class="progress hidden" id="plotted-image">
<div id="image-loading-progress" class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width: 0%"> <div id="image-loading-progress" class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar"
aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
<!-- Creating image... --> <!-- Creating image... -->
</div> </div>
</div> </div>
...@@ -211,9 +217,9 @@ ...@@ -211,9 +217,9 @@
</tbody> </tbody>
</table> </table>
<script src="{{ url_for('static', filename='lib/js/socket.io.js') }}" ></script> <script src="{{ url_for('static', filename='lib/js/socket.io.js') }}"></script>
<script src="{{ url_for('static', filename='js/urls.js') }}" ></script> <script src="{{ url_for('static', filename='js/urls.js') }}"></script>
<script src="{{ url_for('static', filename='js/getDrawing.js') }}" ></script> <script src="{{ url_for('static', filename='js/getDrawing.js') }}"></script>
<script src="{{ url_for('static', filename='js/getCSV.js') }}" ></script> <script src="{{ url_for('static', filename='js/getCSV.js') }}"></script>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -38,7 +38,10 @@ ...@@ -38,7 +38,10 @@
<div class="col-{{stimulus_size}} container stimulus mt-5 pt-5"> <div class="col-{{stimulus_size}} container stimulus mt-5 pt-5">
{% for page in pages.items %} {% for page in pages.items %}
<div class="embed-responsive embed-responsive-16by9"> <div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="/{{ page.media }}" allowfullscreen></iframe> <audio class="embed-responsive-item" controls>
<source src="/{{ page.media }}">
Your browser does not support the audio element.
</audio>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
...@@ -49,7 +52,8 @@ ...@@ -49,7 +52,8 @@
{% if session['type']=='text' %} {% if session['type']=='text' %}
<div class="container text-center mt-5 pt-5"> <div class="container text-center mt-5 pt-5">
{% for page in pages.items %} {% for page in pages.items %}
<h{{ stimulus_size_text }} class="text-center mt-5"><br>{{ randomized_stimulus.text }}</h{{ stimulus_size_text }}> <h{{ stimulus_size_text }} class="text-center mt-5"><br>{{ randomized_stimulus.text }}
</h{{ stimulus_size_text }}>
{% endfor %} {% endfor %}
</div> </div>
<br><br> <br><br>
...@@ -79,7 +83,10 @@ ...@@ -79,7 +83,10 @@
<div class="col-{{stimulus_size}} container stimulus mt-5 pt-5"> <div class="col-{{stimulus_size}} container stimulus mt-5 pt-5">
{% for page in pages.items %} {% for page in pages.items %}
<div class="embed-responsive embed-responsive-16by9"> <div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="/{{ randomized_stimulus.media }}" allowfullscreen></iframe> <audio class="embed-responsive-item" controls>
<source src="/{{ randomized_stimulus.media }}">
Your browser does not support the audio element.
</audio>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
...@@ -91,15 +98,19 @@ ...@@ -91,15 +98,19 @@
<div class="col-4 mt-5 pt-5"> <div class="col-4 mt-5 pt-5">
<div class="canvas-container"> <div class="canvas-container">
<span class="canvas-info"></span> <span class="canvas-info"></span>
<canvas id="embody-canvas" class="crosshair" width="20" height="20" ></canvas> <canvas id="embody-canvas" class="crosshair" width="20" height="20"></canvas>
</div> </div>
{% for embody_question in embody_questions %} {% for embody_question in embody_questions %}
<img id="idembody-{{embody_question.idembody}}" class="embody-image {% if loop.last %}last-embody{% endif %} {% if loop.index != 1 %}hidden{% else %}selected-embody{% endif %}" src={{ embody_question.picture }} /> <img id="idembody-{{embody_question.idembody}}"
class="embody-image {% if loop.last %}last-embody{% endif %} {% if loop.index != 1 %}hidden{% else %}selected-embody{% endif %}"
src={{ embody_question.picture }} />
{% endfor %} {% endfor %}
{% for embody_question in embody_questions %} {% for embody_question in embody_questions %}
<p id="idquestion-{{ embody_question.idembody }}" class="embody-question {% if loop.index != 1 %}hidden{% else %}selected-embody{% endif %}"> {{ embody_question.question }}</p> <p id="idquestion-{{ embody_question.idembody }}"
class="embody-question {% if loop.index != 1 %}hidden{% else %}selected-embody{% endif %}">
{{ embody_question.question }}</p>
{% endfor %} {% endfor %}
<img id="baseImageMask" class="hidden" src={{ url_for('static', filename='img/dummy_600_mask.png') }} /> <img id="baseImageMask" class="hidden" src={{ url_for('static', filename='img/dummy_600_mask.png') }} />
...@@ -113,13 +124,13 @@ ...@@ -113,13 +124,13 @@
<br> <br>
<h4 class="text-center">{{ rating_instruction }}</h4> <h4 class="text-center">{{ rating_instruction }}</h4>
<!-- Select form type --> <!-- Select form type -->
{% if form.__name__ == 'embody' %} {% if form.__name__ == 'embody' %}
<form id="canvas-form" class="form-group mt-5" action="/task/embody/{{ page_num }}" method="post" > <form id="canvas-form" class="form-group mt-5" action="/task/embody/{{ page_num }}" method="post">
<input id="canvas-data" type="hidden" value="" name="coordinates"> <input id="canvas-data" type="hidden" value="" name="coordinates">
...@@ -140,13 +151,13 @@ ...@@ -140,13 +151,13 @@
<p>{{ _('You can zoom in/out the page view by pressing ctrl+/ctrl- (Windows) or ⌘+/⌘- (Mac)') }} </p> <p>{{ _('You can zoom in/out the page view by pressing ctrl+/ctrl- (Windows) or ⌘+/⌘- (Mac)') }} </p>
</div> </div>
</div> </div>
</form> </form>
<script src="{{ url_for('static', filename='js/canvas.js') }}" ></script> <script src="{{ url_for('static', filename='js/canvas.js') }}"></script>
{% elif form.__name__ == 'slider' %} {% elif form.__name__ == 'slider' %}
<form class="form-group mt-5" action="/task/question/{{ page_num }}" method="post"> <form class="form-group mt-5" action="/task/question/{{ page_num }}" method="post">
{% for category in form.categories1 %} {% for category in form.categories1 %}
{% for scale in form.categories1[category] %} {% for scale in form.categories1[category] %}
<div class="row form-group mt-0 mb-0"> <div class="row form-group mt-0 mb-0">
...@@ -173,7 +184,7 @@ ...@@ -173,7 +184,7 @@
<p>{{ _('You can zoom in/out the page view by pressing ctrl+/ctrl- (Windows) or ⌘+/⌘- (Mac)') }} </p> <p>{{ _('You can zoom in/out the page view by pressing ctrl+/ctrl- (Windows) or ⌘+/⌘- (Mac)') }} </p>
</div> </div>
</div> </div>
</form> </form>
{% endif %} {% endif %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment