Giter Club home page Giter Club logo

Comments (1)

otacke avatar otacke commented on July 18, 2024 1

@andrea-daru
Hi!

I think the H5P developers forum at https://h5p.org/forum/2 would be the right place for your question.

Having said that: $(this) will (of course) only give you access to the DOM of the video element that you selected yourself ($('video.h5p-video')). What you'd need is a reference to the Interactive Video instance which you can get via the array at H5P.instances. Just setting preventSkipping to false will not be enough though, because the interface has already been initialized and does not get updated.

Other trouble that you will run into: You should listen on the H5P.Video instance (that you can retrieve via the H5P.InteractiveVideo instance) for an 'ended' event, not the DOM, because a) you might run into trouble if there are multiple videos in the DOM which could happen in InteractiveBook and b) otherwise your customization will for instance not work for YouTube videos that do not provide access to the video DOM.

Not sure if there's a convenient way to achieve what you want using the overrides. What about contributing an option to Interactive Video instead? Cannot say, however, if the H5P core team would support that change You should pre-qualify it with them if you don't want your work to be rejected potentially.

from h5p-interactive-video.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.