After using the Video.SetPlaybackTime method with the video object, the following error occurs:
Uncaught InvalidStateError: Failed to set the "CurrentTime" property on "HTMLMediaElement": The element's
readyState is HAVE_NOTHING, line 686 (col 3)
If this method is not used, the video object works fine and plays the video within my game.
Attach a Capx
Description of Capx
Steps to Reproduce Bug
the video.setplaybacktime method is removed from the code (video plays normally after
using video.play method).
Video should play back faster than normal (video lasts 2 minutes, but set playback time to 15 seconds for testing purposes)
Operating System and Service Pack
Windows 7 Professional, latest service pack
Construct 2 Version ID
Construct 2, Release 178 (64 bit)
OpenGL information: Rendering with OpenGL 4.4.0, with NVidia GTX 770 card (using latest NVidia driver, ver 340.52)
Develop games in your browser. Powerful, performant & highly capable.
Noticed after further researching this error that the problem is that when the js video plugin tries to set the
video's current time, there's no control to ensure the video is ready (hence the HAVE_NOTHING status which is returned).
C:\Program Files\Construct 2\exporters\html5\plugins\video\runtime.js :
Acts.prototype.SetPlaybackTime = function (s)
this.video.currentTime = s; >> Need to add some control here to only set this property once video information is known
You can workaround using "IsPlaying" event. Just set it to "Trigger once" then, set playback time.
Thanks onurdogan07, this works fine.
Closing, a .capx is required or we won't investigate issues. Please submit a new report with a .capx demonstrating the problem as per the guidelines.