Testing flash fallback for audio tags.

1.9.x
Julio Montoya 11 years ago
parent 416ac91290
commit 2a9e5767fa
  1. 7
      archive/index.html
  2. 6
      main/inc/lib/display.lib.php
  3. 2
      main/inc/lib/template.lib.php
  4. 11
      main/newscorm/lp_nav.php
  5. 7
      main/newscorm/lp_view.php
  6. 10
      main/template/default/layout/footer.tpl

@ -1,7 +0,0 @@
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
</body></html>

@ -1563,7 +1563,11 @@ class Display {
$autoplay = 'autoplay';
}
$width = isset($params['width']) ? 'width="'.$params['width'].'"' : null;
$html = '<audio id="'.$fileInfo['basename'].'" controls '.$autoplay.' '.$width.' src="'.$file.'" />';
$html = '<audio id="'.$fileInfo['basename'].'" controls '.$autoplay.' '.$width.' src="'.$file.'" >';
$html .= '<object width="320" height="240" type="application/x-shockwave-flash" data="'.api_get_path(WEB_LIBRARY_PATH).'javascript/mediaelement/flashmediaelement.swf">
<param name="movie" value="'.api_get_path(WEB_LIBRARY_PATH).'javascript/mediaelement/flashmediaelement.swf" />
<param name="flashvars" value="controls=true&file='.$fileInfo['basename'].'" />
</object>';
return $html;
break;

@ -423,6 +423,7 @@ class Template
$css[] = api_get_path(WEB_CSS_PATH).'font_awesome/css/font-awesome.css';
$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/mediaelement/mediaelementplayer.css';
//$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/projekktor/theme/maccaco/projekktor.style.css';
$css_file_to_string = null;
foreach ($css as $file) {
@ -477,6 +478,7 @@ class Template
'thickbox.js',
'bootstrap/bootstrap.js',
'mediaelement/mediaelement-and-player.min.js'
//'projekktor/projekktor.min.js'
);
if (api_is_global_chat_enabled()) {

@ -50,7 +50,7 @@ if (isset($_SESSION['lpobject'])) {
$mycourselptheme = null;
if (api_get_setting('allow_course_theme') == 'true') {
$mycourselptheme = api_get_course_setting('allow_learning_path_theme');
$mycourselptheme = api_get_course_setting('allow_learning_path_theme');
}
if (!empty($lp_theme_css) && !empty($mycourselptheme) && $mycourselptheme != -1 && $mycourselptheme == 1) {
@ -65,4 +65,11 @@ if (isset($_SESSION['lpobject'])) {
}
session_write_close();
?>
<span><?php echo (!empty($mediaplayer)) ? $mediaplayer : '&nbsp;' ?></span>
<script>
$(document).ready(function() {
$('video:not(.skip), audio:not(.skip)').mediaelementplayer();
});
</script>
<span>
<?php echo (!empty($mediaplayer)) ? $mediaplayer : '&nbsp;' ?>
</span>

@ -83,17 +83,18 @@ if (api_get_setting('show_glossary_in_documents') == 'ismanual' || api_get_setti
}*/
$htmlHeadXtra[] = '<script>
$(document).ready(function(){
$(document).ready(function() {
$("div#log_content_cleaner").bind("click", function() {
$("div#log_content").empty();
});$("video:not(.skip), audio:not(.skip)").mediaelementplayer(/* Options */);
});
$("video:not(.skip), audio:not(.skip)").mediaelementplayer();
});
var chamilo_xajax_handler = window.oxajax;
</script>';
if ($_SESSION['oLP']->mode == 'embedframe' || $_SESSION['oLP']->get_hide_toc_frame()==1 ) {
$htmlHeadXtra[] = '<script>
$(document).ready(function(){
$(document).ready(function() {
toogle_minipanel();
});
</script>';

@ -68,6 +68,9 @@ $(document).ready( function() {
disable_search_threshold: 10
});
// Mediaelement
$('video:not(.skip), audio:not(.skip)').mediaelementplayer(/* Options */);
// Table highlight.
$("form .data_table input:checkbox").click(function() {
if ($(this).is(":checked")) {
@ -92,11 +95,8 @@ $(document).ready( function() {
}
$('.boot-tooltip').tooltip(tip_options);
});
{% endraw %}
$(document).load(function() {
// Mediaelement
$('video:not(.skip), audio:not(.skip)').mediaelementplayer(/* Options */);
});
</script>
{% endraw %}
{{ execution_stats }}

Loading…
Cancel
Save