1
我與Django的工作,我有這樣的一個模板:Django和HTML5視頻 - 源標籤都沒有了在Safari
{% load formatting_tags %}
{% load staticfiles %}
<div class="utility-modal utility-modal__medium modal-dialog">
<div class="modal-content">
<div class="modal-content--header">
<h4 class="modal-content--header--title">{{ education_modal_title }}</h4>
<button class="modal-content--header--action icon-close" data-dismiss="modal" title="Close"></button>
</div>
<div class="modal-content--body">
<video width="100%" controls="true" autoplay poster="{% static poster_url %}" id="video1">
<source src="{% static video_ogg_url %}" type="video/ogg; codecs=theora, vorbis">
<source src="{% static video_url %}" type="video/mp4; codecs=avc1.42E01E,mp4a.40.2">
<source src="{% static video_webm_url %}" type="video/webm; codecs=vp8, vorbis">
<p>Your browser does not support the video tag.</p>
</video>
</div>
<div class="modal-content--footer">
<button onclick="document.location='{{ button_page_link }}'" class="btn btn__primary btn__block">Go to page</button>
</div>
</div>
</div>
視頻的URL是從視圖變量傳遞。這適用於Chrome和Firefox,但不適用於Safari。在Safari上,視頻中的三個源標籤已經消失。
有誰知道可能是什麼問題?