gdcc / dataverse-previewers

A collection of Datafile Previewers that can be configured to work with Dataverse
MIT License
5 stars 15 forks source link

dataverse video visualizer issue with 4k clips. #16

Open joelfan opened 1 year ago

joelfan commented 1 year ago

We have dataverse 4.20, and when uploading a video clip with very high definition (4K), we cannot go forward and backward or jump from one point in time to another point. It seems that the visualizer loses the synchronization and it suddenly stops playing.

qqmyers commented 1 year ago

FWIW: All the video previewer is doing is to put a <video controls='true'><source src='<url of your file>'/></video> in the page. Support for the HTML \<video> element is built into the browser so whether it works or not depends on whether your system and browser can handle the video. It's possible that there are some optional parameters for the \<video> element the previewer could use that would improve playback.

If you can find any other website that plays your file in your browser, we might be able to look at the page's source code and see what they're doing and see if it can be applied to the Dataverse previewer.

joelfan commented 1 year ago

Thx for your feedback. I do not have other website that plays that file, eapart from VIMEO tha can play it correctly.

I will be looking for HTML

qqmyers commented 1 year ago

Looking at a random video on Vimeo - they also use the <video> element. The one addition I see is that they use a preload attribute. That would be easy to add if it helps.

A simple test would be to copy the content of the previewer page, add the preload attribute and try that in your browser.

Alternately, just change the previewer to add it, e.g. in https://github.com/gdcc/dataverse-previewers/blob/b3f8928da1bf69f4d19db99ef00d2f3476c1726f/previewers/v1.3/js/video.js#L12 add a .prop('preload', true) .

If those don't make sense - if you can post/publish a sample video on demo.dataverse.org, I can send you a web page to try. If it works better, I can update the previewer.