mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 10:23:17 +00:00
Merge pull request #1078 from nlegoff/fix_h264
[3.8] Fix video player if h264 mode is setted to false
This commit is contained in:
@@ -746,7 +746,7 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($this->mime, array('video/mp4'))) {
|
if ($this->app['phraseanet.h264-factory']->isH264Enabled() && in_array($this->mime, array('video/mp4'))) {
|
||||||
if (null !== $url = $this->app['phraseanet.h264']->getUrl($this->get_pathfile())) {
|
if (null !== $url = $this->app['phraseanet.h264']->getUrl($this->get_pathfile())) {
|
||||||
$this->url = $url;
|
$this->url = $url;
|
||||||
|
|
||||||
|
|||||||
@@ -6,17 +6,30 @@
|
|||||||
<input type="hidden" name="height" value="{{original_h}}"/>
|
<input type="hidden" name="height" value="{{original_h}}"/>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
flowplayer("preview{{random}}",
|
flowplayer("preview{{random}}", {
|
||||||
{src:"/include/jslibs/flowplayer/flowplayer-3.2.18.swf", wmode: "transparent"},
|
src:"/include/jslibs/flowplayer/flowplayer-3.2.18.swf",
|
||||||
{clip:{url:"{{url|url_encode}}",autoPlay: true,autoBuffering:true,provider: "h264streaming",scaling:"fit"},
|
wmode: "transparent"
|
||||||
onError:function(code,message){getNewVideoToken("{{thumbnail.get_sbas_id() ~'_'~thumbnail.get_record_id()}}", this);},
|
},
|
||||||
plugins: {
|
{
|
||||||
{% if app['phraseanet.h264-factory'].isH264Enabled() %}
|
clip: {
|
||||||
h264streaming: {
|
url:"{{url|url_encode}}",
|
||||||
url: "/include/jslibs/flowplayer/pseudostreaming/flowplayer.pseudostreaming-3.2.13.swf"
|
autoPlay: true,
|
||||||
}
|
autoBuffering:true,
|
||||||
{% endif %}
|
{% if app['phraseanet.h264-factory'].isH264Enabled() %}
|
||||||
}
|
provider: "h264streaming",
|
||||||
});
|
{% endif %}
|
||||||
|
scaling:"fit"
|
||||||
|
},
|
||||||
|
onError:function(code,message) {
|
||||||
|
getNewVideoToken("{{thumbnail.get_sbas_id() ~'_'~thumbnail.get_record_id()}}", this);
|
||||||
|
},
|
||||||
|
plugins: {
|
||||||
|
{% if app['phraseanet.h264-factory'].isH264Enabled() %}
|
||||||
|
h264streaming: {
|
||||||
|
url: "/include/jslibs/flowplayer/pseudostreaming/flowplayer.pseudostreaming-3.2.13.swf"
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|||||||
Reference in New Issue
Block a user