mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 02:13:15 +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;
|
||||
}
|
||||
|
||||
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())) {
|
||||
$this->url = $url;
|
||||
|
||||
|
||||
@@ -6,17 +6,30 @@
|
||||
<input type="hidden" name="height" value="{{original_h}}"/>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
flowplayer("preview{{random}}",
|
||||
{src:"/include/jslibs/flowplayer/flowplayer-3.2.18.swf", wmode: "transparent"},
|
||||
{clip:{url:"{{url|url_encode}}",autoPlay: true,autoBuffering:true,provider: "h264streaming",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 %}
|
||||
}
|
||||
});
|
||||
flowplayer("preview{{random}}", {
|
||||
src:"/include/jslibs/flowplayer/flowplayer-3.2.18.swf",
|
||||
wmode: "transparent"
|
||||
},
|
||||
{
|
||||
clip: {
|
||||
url:"{{url|url_encode}}",
|
||||
autoPlay: true,
|
||||
autoBuffering:true,
|
||||
{% 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>
|
||||
{% endmacro %}
|
||||
|
||||
Reference in New Issue
Block a user