Testing flash fallback for audio tags.

1.9.x
Julio Montoya 12 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'; $autoplay = 'autoplay';
} }
$width = isset($params['width']) ? 'width="'.$params['width'].'"' : null; $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; return $html;
break; 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_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/mediaelement/mediaelementplayer.css';
//$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/projekktor/theme/maccaco/projekktor.style.css';
$css_file_to_string = null; $css_file_to_string = null;
foreach ($css as $file) { foreach ($css as $file) {
@ -477,6 +478,7 @@ class Template
'thickbox.js', 'thickbox.js',
'bootstrap/bootstrap.js', 'bootstrap/bootstrap.js',
'mediaelement/mediaelement-and-player.min.js' 'mediaelement/mediaelement-and-player.min.js'
//'projekktor/projekktor.min.js'
); );
if (api_is_global_chat_enabled()) { if (api_is_global_chat_enabled()) {

@ -50,7 +50,7 @@ if (isset($_SESSION['lpobject'])) {
$mycourselptheme = null; $mycourselptheme = null;
if (api_get_setting('allow_course_theme') == 'true') { 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) { if (!empty($lp_theme_css) && !empty($mycourselptheme) && $mycourselptheme != -1 && $mycourselptheme == 1) {
@ -65,4 +65,11 @@ if (isset($_SESSION['lpobject'])) {
} }
session_write_close(); 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> $htmlHeadXtra[] = '<script>
$(document).ready(function(){ $(document).ready(function() {
$("div#log_content_cleaner").bind("click", function() { $("div#log_content_cleaner").bind("click", function() {
$("div#log_content").empty(); $("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; var chamilo_xajax_handler = window.oxajax;
</script>'; </script>';
if ($_SESSION['oLP']->mode == 'embedframe' || $_SESSION['oLP']->get_hide_toc_frame()==1 ) { if ($_SESSION['oLP']->mode == 'embedframe' || $_SESSION['oLP']->get_hide_toc_frame()==1 ) {
$htmlHeadXtra[] = '<script> $htmlHeadXtra[] = '<script>
$(document).ready(function(){ $(document).ready(function() {
toogle_minipanel(); toogle_minipanel();
}); });
</script>'; </script>';

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

Loading…
Cancel
Save