universalviewer icon indicating copy to clipboard operation
universalviewer copied to clipboard

V4 set target accepts #t=1.1 but does not accept #t=1.1,2.2

Open benwbrum opened this issue 3 years ago • 6 comments

UV version:

 [email protected]

I'm submitting a:

  • [x] bug report
  • [ ] feature request => please use the user stories repo
  • [ ] support request => Please do not submit support requests here, use stackoverflow

Current behavior:

If uv.set is called with a time fragment containing a single point, UV will play the canvas at that point, as expected. However, calling uv.set with a range fragment causes the following error:

Uncaught TypeError: Failed to set the 'currentTime' property on 'HTMLMediaElement': The provided double value is non-finite.
    at HTMLAudioElement.u.<computed> [as setCurrentTime]

Expected behavior:

Calling set with a fragment should play from the beginning of the range, stopping at the end of the range.

Steps to reproduce:

This is duplicated in this sandbox: https://codesandbox.io/s/uv-set-target-example-pn504?file=/index.html

Related code: Real-world target example:

https://sizemoec.github.io/FFPC-FF010-FFPC_OVERVIEW_PT1/ff010/canvas-1/canvas#t=774.851273,794.572929

benwbrum avatar Dec 01 '21 14:12 benwbrum

Could we fix this for now so that if you include both values it doesn't break?

edsilv avatar Jan 19 '22 16:01 edsilv

Absolutely. We'd really love to support stop times, but that at least will keep things from breaking.

benwbrum avatar Jan 27 '22 20:01 benwbrum

That should be it patched for now to prevent breaking: https://github.com/UniversalViewer/universalviewer/commit/f7786ddfdff4ffc80544b8b424b948736b3950f9#diff-cb64973a8a5a2e0eac4714d6ee79b3016b2f2e7b76e35a803c9f28b4bf197b16R41-R45

edsilv avatar Mar 10 '22 13:03 edsilv

All issues will be triaged for further investigation or closure by the 28 September 2023. If your issue is still relevant and would like for it be investigated further please comment by 14 September 2023.

LlGC-szw avatar Aug 25 '23 11:08 LlGC-szw

This is still relevant.

benwbrum avatar Jan 30 '24 01:01 benwbrum

@benwbrum, did the patch @edsilv mentioned on March 10, 2022 solve the immediate problem? Is the ticket open to support future clean-up, or is something still completely broken?

demiankatz avatar Jan 30 '24 12:01 demiankatz