wmsgva's Recent Forum Activity

  • 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

    };

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Problem Description

    After using the Video.SetPlaybackTime method with the video object, the following error occurs:

    Javascript error

    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

    Not needed

    Description of Capx

    N/A

    Steps to Reproduce Bug

    • Use the SetPlaybackTime method with the video object

    Observed Result

    Javascript error displayed (see error in first part of this template). Error doesn't occur if

    the video.setplaybacktime method is removed from the code (video plays normally after

    using video.play method).

    Expected Result

    Video should play back faster than normal (video lasts 2 minutes, but set playback time to 15 seconds for testing purposes)

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (Not Tested)
    • Internet Explorer: (YES)

    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)

  • I am using a video object in my game which plays two different videos at different stages.

    I detect when the first video being played is finished using the "video.has ended" property. This works fine and allows the player to move

    to the next stage in the game.

    Later on, another video is to be played and there's an issue. Despite changing the video source (video.Set video source to...) to another

    mp4 file, the "video.has ended" property still seems to be set to True, meaning when I enter this part of my code, the program thinks the player

    has already viewed the second video and it moves onto the next stage.

    Do I need to use two different video objects (not convenient, as I call a function to play the video, as it does other things before executing

    the video.play method) or is there any way other than just changing the video object's source to reset its "has ended" property to false?

wmsgva's avatar

wmsgva

Member since 4 Sep, 2014

None one is following wmsgva yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies