resize video

PennController for IBEX Forums Support resize video

Tagged: , ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5263
    sblanch
    Participant

    Hi
    Is it possible to resize a video file and play without using the play button?
    Thanks
    Sílvia Blanch

    #5264
    Jeremy
    Keymaster

    Hi Sílvia,

    I hope you don’t mind, I moved your question to the Support section of the forums, as I think it’s more appropriate

    How about using the .size and .play commands, like this?

    newTrial(
        newButton("Watch video").print().wait().remove()
        ,
        newVideo("https://upload.wikimedia.org/wikipedia/commons/4/4f/CanoeTacking.webm")
            .size("80vw","auto")
            .print()
            .play()
            .wait()
    )

    Note that most browsers will require a user interaction to happen on the page for play to automatically start the video, hence my Watch video button (but any prior interaction in your experiment will do)

    Jeremy

    #5265
    sblanch
    Participant

    Thanks Jeremy!
    Another question. Do you recommend any video extension (mp4, webm, ..) to load and play it faster?
    Thanks again! and thank you for your quick response
    Sílvia

    #5266
    Jeremy
    Keymaster

    The rule is simple: lighter files will load faster. Both formats (WebM and MP4) tend to produce files on the lighter end, but only MP4 (H.264) is supported by most major browsers, so I’d go with that.

    Jeremy

    #5267
    sblanch
    Participant

    Good morning Jeremy!!!! thank you for your response!!!!
    Sílvia

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.