纯 javascript 和 html 的开源 scorm 播放器?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17018858/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
open source scorm player pure javascript and html?
提问by Ashisha Nautiyal
Is there any scorm player which is purely based on the javascript and html . i do,t wanna use any server side languages for it . I found an open source Scormpoolbut it is just playing the scorm its not tracking . and no documentation is available . If you guys know any please help .
有没有纯粹基于 javascript 和 html 的 scorm 播放器。我愿意,不想为此使用任何服务器端语言。我找到了一个开源的Scormpool,但它只是在玩 scorm,而不是跟踪。并且没有可用的文档。如果你们知道任何请帮忙。
回答by fsw
I was searching for similar solution myself and was unable to find anything.
我自己正在寻找类似的解决方案,但找不到任何东西。
So after struggling with docs and bits found online I have created this:
因此,在与网上找到的文档和比特作斗争之后,我创建了这个:
https://bitbucket.org/jugger0/tsp
https://bitbucket.org/jugger0/tsp
It is far away from a fully-featured player but can be used as a starting point.
它距离功能齐全的播放器还很远,但可以用作起点。
Maybe someone will find it useful.
也许有人会发现它很有用。
回答by skfriese
This may get you started as well, or you can tailor it to your own needs.
这也可以让您入门,或者您可以根据自己的需要进行调整。
https://github.com/skfriese/simple-scorm-api
https://github.com/skfriese/simple-scorm-api
It's a rudimentarySCORM 1.2-only RTE test environment in a single HTML file that I whipped up for my own needs years ago. I only recently elected to clean it up to share with others. It's easy to throw into your package folder and spin up from there. The SCO will assume it's running in an LMS, which is really all that's necessary for testing most of the time.
这是一个基本的SCORM 1.2-only RTE 测试环境,包含在一个 HTML 文件中,我多年前根据自己的需要创建了这个文件。我最近才选择清理它与他人分享。很容易放入您的包文件夹并从那里旋转。SCO 将假定它在 LMS 中运行,这实际上是大多数时间测试所必需的。
You can update the default values in the Javascript, and the data will be stored in LocalStorage or fall back to cookies if necessary. It will also "attempt" to read some values from a manifest, should one exist. It does not support multi-SCO packages or any other complex organizational features of SCORM.
您可以更新 Javascript 中的默认值,数据将存储在 LocalStorage 中或在必要时回退到 cookie。如果存在,它还会“尝试”从清单中读取一些值。它不支持多 SCO 包或任何其他复杂的 SCORM 组织功能。
The Reload Tools have been embedded into the page as well, so you'll find that most of the data elements will be validated.
重新加载工具也已嵌入到页面中,因此您会发现大多数数据元素都将得到验证。
Hope this helps someone.
希望这可以帮助某人。
回答by brandonbradley
It would be helpful if the desired result was better defined. Do you just want to be able to run scorm content locally without errors?
如果更好地定义所需的结果会很有帮助。您是否只想能够在本地运行 scorm 内容而不会出错?
The initial question mentions that the content is playing but not tracking... where would it track to? Are you looking to have things stored for later retrieval on the same system, or potentially on any system? If this is the case, where would it be stored? In the browser (single system only and prone to deletion with clearing cookies, cache, etc), or to a server (accessible from multiple systems)?
最初的问题提到内容正在播放但没有跟踪......它会跟踪到哪里?您是否希望将内容存储在同一系统上或可能在任何系统上供以后检索?如果是这种情况,它将存储在哪里?在浏览器中(仅单个系统并且易于通过清除 cookie、缓存等进行删除),还是在服务器中(可从多个系统访问)?
If to a server, it is going to require at least some server side language, though you could potentially use something like node.js which would let that language still be javascript.
如果是服务器,它至少需要一些服务器端语言,尽管你可能会使用像 node.js 这样的东西,它会让该语言仍然是 javascript。
回答by Dan Novak
Claude Ostyn's SCORM 1.2 Test Wrap will act as a standalone in-memory "LMS" for SCORM 1.2 courses.
Claude Ostyn 的 SCORM 1.2 Test Wrap 将作为 SCORM 1.2 课程的独立内存“LMS”。
There is some setup required; though it will work if you run it directly in the browser, you may find it more effective running it (and your course) from a webserver.
需要一些设置;虽然如果您直接在浏览器中运行它会起作用,但您可能会发现从网络服务器运行它(和您的课程)更有效。
Available here: https://www.jcasolutions.com/development/code-repository/func-startdown/7/
可在此处获得:https: //www.jcasolutions.com/development/code-repository/func-startdown/7/
This used to be part of a resource kit from Click2Learn. Though Rustici (scorm.com) has adopted some of it, I wasn't able to find the original file there.
这曾经是 Click2Learn 资源工具包的一部分。虽然 Rustici (scorm.com) 已经采用了其中的一些,但我无法在那里找到原始文件。
Instructions and more details may be found by running "launchme.html" directly.
直接运行“launchme.html”可以找到说明和更多详细信息。
I've found this one of my more valuable testing tools.
我发现这是我更有价值的测试工具之一。
A SCORM 2004 version, and many more useful articles and tools may be found at Claude Ostyn's website http://www.ostyn.com. He passed away several years ago, but someone has kindly kept the site up.
可以在 Claude Ostyn 的网站http://www.ostyn.com 上找到 SCORM 2004 版本以及更多有用的文章和工具。他几年前去世了,但有人好心地维护了这个网站。