Get time in seconds from iFrame mp4 Video?

0 favourites
  • 2 posts
From the Asset Store
8-bit retro-style music and sound effects: 10 loops-able music tracks and 301 individual SFX!
  • Hey guys! In my project I have an layout that plays an mp4 video from a iFrame.

    I need to check when the video ends playing so I can move the game forward to the next layout.

    I can not make any alterations server-side...

    Does anyone know how could I access the time in seconds of the video being played from the iFrame? It would be awesome! I've been searching a lot, but didn't found anything.

    Thank you!!

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [DOUBLE POST, sorry]

    Well, I didn't figured out how to access the data from the iFrame... But I did a workaround without using the iFrame Object.

    For anyone interested (sorry if I get any terms wrongly, I use Construct in portuguese):

    -----

    -Using AJAX, BinaryData and Video game objects.

    -On Start of Layout, set AJAX binary response to BinaryData Game Object.

    -Still on Start of Layout, request via AJAX the URL "https://link.com/video.mp4" with the tag "videotest" or anything else.

    -AJAX On "videotest" completed, set Video source (H.264) to BinaryData.GetURL. Don't know if it works using WebM or Ogg Theora, but it probably does)

    -----

    This will make the video play after the time it takes to download (you can see if it's downloading using the Video On Progress event).

    Doing this way I can use On Video Ended to trigger the action to change the Layout.

    See y'all!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)