问题
I am looking for any example of HTML SCORM compliant course with mp3 without flash player. I need to find scorm compliant course which plays mp3 using HTML5 audio.
Related question: How to enable mp3 content type in SAP Authoring Tool
In a case that post on SAP portal disaparred here is a copy of it:
I think I have found why mp3 is nor played in SAP contewnt player. The problem is in com.sap.hcm.ls.lms.servlets.control.MediaHandler class
SAP is trying to server mp3 file via MediaHandler but there is a bug. This is a problematic code:
String range = request.getHeader("Range");
MediaLoader.ByteRange rangeSpec = null;
if ((range != null) && (range.startsWith("bytes=")))
{
range = range.substring(6);
int inx = range.indexOf("-");
if (inx > 0)
{
int start = Integer.parseInt(range.substring(0, inx).trim());
int end = Integer.parseInt(range.substring(inx + 1).trim());
rangeSpec = new MediaLoader.ByteRange(start, end);
}
}
First it extracts "Range" from header and expect to be in format "bytes=-" So valid value could be "bytes=0-100" or bytes=0-200 for example But in our case "Range" has value "bytes=0-" so it fails on parsing on:
int end = Integer.parseInt(range.substring(inx + 1).trim());
Inside catch section during error handling at the end it returns 404:
response.sendError(404, "404 (NOT FOUND): " + path);
which is false information. SAP is handling error on header attribute parsing very simple - it says that such resource not exists! This is very bad. It would be nice to give some feedback to allow users to get info why mp3 is not playing. So definitelly this is SAP content player BUG.
回答1:
You can check out this course:
I've added most pages that have an mp3
You can download the course package here:
https://ihrdc.securevdr.com/share?#/view/seef68cbe2bb439c9
A SCORM course - in this case SCORM 1.2, with an MP3 is not any different from a standard HTML course. I just added the following in most pages:
<audio controls>
<source src="../golf.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
But I think I understand what you are thinking about, most scorm courses you see online you see a lot of Flash. You can find all HTML examples of SCORM courses both 1.2 and 2004 in the link below:
http://scorm.com/scorm-explained/technical-scorm/golf-examples/
回答2:
As I understand the question, you're just looking for a single example course rather than an authoring tool. There's actually nothing special about embedding mp3s in a SCORM package vs. embedding mp3s in any html page.
I'm not aware of any sample SCORM courses containing mp3 files, but what you could do is take a sample HTML SCORM course and then add any mp3 file in the html.
I hope these links are helpful.
来源:https://stackoverflow.com/questions/27428165/looking-for-scorm-compliant-course-example-in-pure-html-with-mp3-without-flash