openzim / youtube

Create a ZIM file from a Youtube channel/username/playlist
GNU General Public License v3.0
52 stars 29 forks source link

Setup ogv.js as a fallback in video.js #230

Closed dan-niles closed 4 months ago

dan-niles commented 4 months ago

The html5 player in video.js is currently used for video playback. However, to support older browsers like Safari for playing webm videos, we need to set up Ogv.js as a fallback.

However, there is an issue with integrating Ogv.js into the Vue.js app. In the ogvs branch, I attempted to configure the videojs-ogvjs plugin, but encountered an error in the console:

TypeError: Cannot read properties of undefined (reading 'getComponent')

It seems that the videojs-ogvjs plugin is attempting to access video.js in a global scope but is unable to locate it.

benoit74 commented 4 months ago

@rgaudin does it reminds you something?

benoit74 commented 4 months ago

(Dan is struggling to setup ogv.js / videojs-ogvjs in the new Vue.JS app)

rgaudin commented 4 months ago

We've never used it inside a Vue.js app. Check first that it's working as expected outside of Vue if not already done.

I think the plugin was outdated at some point and even slightly patched but I don't know if that is still required. I see that I have a gist of it.

Might simply be that Vue is restrictive and the plugin is not compliant.

benoit74 commented 4 months ago

OK, thank you. What Dan has discovered so far (I let you confirm) seems to be more linked to a timing issue / compatibility issue with Vite. You're right it has most probably nothing to do with Vue.

benoit74 commented 4 months ago

See discussion in https://github.com/openzim/overview/issues/36 also