Giter Site home page Giter Site logo

liqvidjs / liqvid Goto Github PK

View Code? Open in Web Editor NEW
748.0 748.0 38.0 1.38 MB

Library for interactive videos in React

Home Page: https://liqvidjs.org

License: MIT License

TypeScript 91.39% JavaScript 4.24% Stylus 4.24% HTML 0.12% CSS 0.01%
animation javascript liqvid react video

liqvid's People

Contributors

dependabot[bot] avatar ysulyma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

liqvid's Issues

Player pauses when trying to play Video in iOS

The scenario is, there is a Video element which starts at, let's say, 5 second. So, the video plays fine for 5 seconds and suddenly it pauses and never starts again, until manually played again.

This happens in iOS Chrome (and maybe Safari as well).

I think the issue might be the following:
image

@ysulyma can you please let me know how to fix this?

Audio page broken in docs

Hi I noticed that the Audio page, in the API docs won't load, I would be very interested in knowing if there is also a schedulable Audio player object...

TIA, and great job on this softwre...

Fullscreen not working in iOS

I have included this, <script src="https://unpkg.com/@liqvid/host/lv-host.js"></script>, in the index.html <head> tag, but still when I click Fullscreen icon in the player in iOS it is not making the player Fullscreen. It just toggles the icon.

Please help.

package information:
"liqvid": "^2.1.5",
"liqvid-scripts": "0.0.5",

Getting an error when refreshing the player?

I am getting the following error when I refresh the player after a change in the script:

Uncaught TypeError: Cannot read properties of null (reading 'buffered')
    at getBuffers (liqvid.js:895:1)
    at HTMLAudioElement.updateBuffers (liqvid.js:907:1)

What i am doing is, I have a state variable initialized, and i have used useEffect to check when there is a change in the script. In the useEffect i have set the initialized value to false and then to true with a setTimeout so that the player is removed from dom and re-rendered again so that the script change is reflected.

const [initialized, setInitialized] = useState(false);

useEffect(() => {
  setInitialized(false);
  setTimeout(() => {
    setInitialized(true);
  }, 0);
}, [script]);

if (!initialized) {
  return null;
}

return <Player ... ></Player>

Can you please tell if I am doing anything wrong, or is there a way to resolve the issue?

Add support to GSAP

I know that liqvid has animation support. However, I think that can be enhanced/simplified supporting GSAP, even the community (free) version)

[feature request] Add function to import mp4 as background video.

[feature request] Add function to import mp4 as background video.

That way this could be used to (background) embed youtube/video.
It would be very helpful to add additional information to or add clickable links to resources etc.

Thank you for your consideration.

Resizeable video canvas

In the demo video at the project homepage, it's possible to e.g. resize the text box that appears to demonstrate how to edit the video's subtitle; however, the video's canvas does not change when the content gets larger, so the additional content overflows and gets hidden. Like this:

image

Some possible solutions:

  • Make the video canvas a scrollable container
  • Allow the video canvas to be resized, with a handle similar to that of the textarea
  • Automatically grow the video canvas so that all content within is visible

new Script() not working with number duration

when calling new Script(markers) with the markers having durations as number instead of string, it is throwing error.

I think in the following code the parseTime function should check if the duration is of type number or string before operating on the duration.

      if (marker.length === 2) {
        const [, duration] = marker;
        marker[1] = time;
        marker[2] = time + parseTime(duration);
      } else {
        const [, begin, end] = marker;
        marker[1] = parseTime(begin);
        marker[2] = parseTime(end);
      }

      time = marker[2];
    }

The error is following:

       
      Uncaught (in promise) TypeError: str.split is not a function
   at parseTime (liqvid.mjs:887:1)
   at new Script (liqvid.mjs:3251:1)

@ysulyma please check.

How to deploy to a static site?

If I use create-react-app I use npm build, but in this case, how do I do it?
If I don't need to record audio, do I still need install Express?

Is it possible to have a child playback?

@ysulyma I have a query regarding one use case in my application. Is it possible to have a child playback inside a playback, so that when the child playback is playing the parent playback will be paused and when the child playback ends then the parent will play again?

If this is not present at the moment, can you please recommend a hack or something to achieve this?

Consider an integration with Temml

Now that chrome based browsers (from chrome 109) (as well as firefox) support mathml (core), maybe consider an integration with temml.

I think it will work as a drop in replacement for katex.

I found it renders much faster without "flashing".

I recommend the latin modern woff2 font from gust.

Video element issue

When adding a Video element which has duration less than the total duration of the playback, then the playback is pausing when the video ends. @ysulyma Can you please check?

You can reproduce the issue by the following steps:

  1. Go to https://liqvidjs.org/docs/reference/Video.
  2. Change the line 7 in the code segement from ["train/", "0:20"] to ["train/", "0:30"]
  3. Then run the video, you will see that at 23s, when the video ends the player will pause automatically.

Liqvid version upgrade issue

I upgraded the Liqvid package in my React project from 2.0 to 2.1 and now when I try to run the project using npm start it is throwing the following error in the command line:

SyntaxError: ..\node_modules\liqvid\dist\liqvid.mjs: Support for the experimental syntax 'classProperties' isn't currently enabled (2052:12)

@ysulyma can you please check this?

Keyboard shortcut to skip back

It seems like it's possible to skip ahead by pressing the right arrow key, but the left arrow key doesn't do anything. It would be nice if it skipped the video back a few seconds (ideally less than the amount that's skipped forward; as a data point, Google Podcasts' player skips ahead by 30 seconds and back by 10 seconds).

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.