Scorm播放器 - 设置一个进度栏以完成

发布于 2025-02-05 07:30:08 字数 634 浏览 3 评论 0 原文

我正在参加使用SCORM播放器的驱动程序ED课程,并且痛苦地慢 - 它需要一个进度栏才能填写,然后才能进步到下一张幻灯片,只要我需要阅读,它通常需要2-3倍。我使用了检查元素来尝试了解进度栏的工作原理以及完成幻灯片后如何设置它以完成。这是它在检查元素中显示的内容:

<div tabindex="-1" aria-hidden="false" aria-label="slide progress" data-ref="progressBar" class="cs-fill cs-brandhighlight-bg progress-bar-fill" style="width: 100%;" role="slider" aria-valuemin="0" aria-valuenow="23.04" aria-valuemax="23" data-tabindex="-1" aria-valuetext="100%">
        <div class="prev-progress-bar-fill-preview cs-fill" data-ref="prevProgressPreview"></div>
      </div>

因此,我的问题:有没有办法将进度栏设置为在控制台中完成的进度栏以使我可以进步到下一张幻灯片?

I'm taking a drivers ed course which uses Scorm player and is painfully slow - it requires a progress bar to fill before I can progress to the next slide which often takes 2-3x as long as I need to read it. I've used inspect element to try to understand how the progress bar works and how I can set it to complete once I finish the slide. Here is what it shows in inspect element:

<div tabindex="-1" aria-hidden="false" aria-label="slide progress" data-ref="progressBar" class="cs-fill cs-brandhighlight-bg progress-bar-fill" style="width: 100%;" role="slider" aria-valuemin="0" aria-valuenow="23.04" aria-valuemax="23" data-tabindex="-1" aria-valuetext="100%">
        <div class="prev-progress-bar-fill-preview cs-fill" data-ref="prevProgressPreview"></div>
      </div>

So, my question: is there a way I can set the progress bar to complete in the console to allow me to progress to the next slide?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

哭了丶谁疼 2025-02-12 07:30:08

我找到了一种跳过Adobe Caintivate课程(使用SCORM Player)的幻灯片的方法,该课程以HTML5出版。基本上是这样:

为方便起见,我制作了一个书签,上面有以下地址以一键执行该代码,而不必每次都在控制台中重新键入该代码:

javascript:window.frames[0].cpAPIInterface.next()

只有一个>在我的情况下,页面上的iframe ,这就是为什么索引为0。

I found a way to skip through slides in Adobe Captivate courses (which use Scorm player) published as HTML5. Basically this: https://medium.com/@barsh/adobe-captivate-how-to-cheat-9bdbb34121f0

For convenience I made a bookmark with following address to execute that code in one click instead of having to re-type it in console every time:

javascript:window.frames[0].cpAPIInterface.next()

There is only one iframe on page in my case, which is why index is 0.

恋你朝朝暮暮 2025-02-12 07:30:08

以下代码完成相关的进度。 SetScore第二参数和第三个参数确定最大和最低分数。

javascript:window.frames.SetScore(100,100,0)
javascript:window.frames.SetPassed()

如果您想要更多的安全性,则可以设置超时并添加一些随机性。

setTimeout(() => {
    const randomScore = Math.floor(Math.random() * (100 - 80 + 1)) + 80; // between 80-100
    window.frames.SetScore(randomScore, 100, 0);
    window.frames.SetPassed();
}, 1 * 60 * 1000); // 1 minute

Following code completes related progress. SetScore second and third parameters determines max and min score.

javascript:window.frames.SetScore(100,100,0)
javascript:window.frames.SetPassed()

If you want more safety you can set timeout and add some randomness.

setTimeout(() => {
    const randomScore = Math.floor(Math.random() * (100 - 80 + 1)) + 80; // between 80-100
    window.frames.SetScore(randomScore, 100, 0);
    window.frames.SetPassed();
}, 1 * 60 * 1000); // 1 minute
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文