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:
Nicolas Le Goff
2014-05-14 16:31:26 +02:00
2 changed files with 26 additions and 13 deletions

View File

@@ -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;

View File

@@ -6,10 +6,23 @@
<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);},
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: {