How to stop a video currently playing from within the engine

  • #1, by htw8849Thursday, 10. March 2016, 13:49 4 years ago
    Background:
    I want to do a "Skip Button" if a full screen video is playing on Android devices.

    For windows it's no problem - usually press the "ESC"-key, but you
    don't have such keys on a mobile phone.
    So I defined a permanent interface which is also visible during video playback.

    But I couldn't find any function in the editor which stops a current running video.
    Audio can be stopped - but for videos there doesn't seem a function existing.

    So I assume you might achieve that via scripting call.
    Unfortunately my scripting skillsare close to zero ... so if someone
    have a hint what lue call could possibly stop a running video that would be quite helpful smile

    Newbie

    41 Posts


  • #2, by afrlmeThursday, 10. March 2016, 14:57 4 years ago
    I can't say I know anything about android devices. I know it's possible to connect mini bluetooth keyboards to them though. Having said that...

    I don't know if it would work but Simon introduced a new event creation function into the latest version of VS (4.2.5) which is supposed to allow you to create instances in which pressing a certain button or whatever will temporarily fire off another key, mouse button or gamepad button etc... Unfortunately I've not gotten round to testing it out so I'm not able to provide a script example at the minute.

    createEvent("eKeyEscape")
    1
    2


    Maybe Simon can provide you with a solution, if he sees this thread later on. If not then I'll ask him about it the next time I sign into skype / steam.

    P.S: it's Lua not lue. grin

    P.P.S: there is actually supposed to be scripting support for touch gestures. Unfortunately I don't know anything much about them as I've not needed to use them.

    Imperator

    6837 Posts

  • #3, by htw8849Thursday, 10. March 2016, 15:48 4 years ago
    Thanks for your quick answer. A bluetooth keyboard wouldn't help the average gamer playing while not at home ... so unfortunately this is not an option wink

    That event creation function is exactly what would help me there. grin

    So thanks in advance for asking Simon in case he won't read this post.

    Oh and I'm very much interested how touch gestures are implemented ... so far I couldn't find anything
    out of the box which would go for having a rightclick emulated via touch gesture.

    Newbie

    41 Posts

  • #4, by afrlmeThursday, 10. March 2016, 16:10 4 years ago
    I seem to recall reading in the changelog that touch support event handling had been added to the engine a few versions back. I don't see anything in the wiki about it though, so maybe Simon or David (whoever implemented it) just forgot to create a page for it. We do have a lot of documentation missing from the wiki to be honest; especially in regards to recent features.

    The createEvent function I showed an example of in my last message should also be able to call a right click instance.

    Imperator

    6837 Posts

Write post