Millisecond Forums

Playing video in battery

https://forums.millisecond.com/Topic27726.aspx

By jxb - 9/8/2019

Hello,
We are working on a script in which would like to show a video. Our problem is that at the end of the video the user is presented with a blank black screen. If the user presses any key, they will move on from this screen to the next part of the script. Our Band-Aid solution to this has been to add a bit to the end of the video instructing the user to press the spacebar once they see the black screen; however, we would prefer to make this smoother. Possible solutions could be: Is there any way to get the script to move on automatically at the video's end? Is there any way to put a video into a normal /block instead of in its own /video section? Is there any way to put a continue button or instructions to press a key on that black screen?
Thanks
By Dave - 9/8/2019

jxb - 9/9/2019
Hello,
We are working on a script in which would like to show a video. Our problem is that at the end of the video the user is presented with a blank black screen. If the user presses any key, they will move on from this screen to the next part of the script. Our Band-Aid solution to this has been to add a bit to the end of the video instructing the user to press the spacebar once they see the black screen; however, we would prefer to make this smoother. Possible solutions could be: Is there any way to get the script to move on automatically at the video's end? Is there any way to put a video into a normal /block instead of in its own /video section? Is there any way to put a continue button or instructions to press a key on that black screen?
Thanks

You can have a <trial> autmotatically move on at the video's end, yes. Simply set the <video> element's /playthrough attribute to true and set the <trial> displaying the video to a /trialduration or /timeout shorter than the video's duration. I.e.

<video examplevideo>
/ items = ("yourvideo.mp4")
/ playthrough = true
...
</video>

<trial exampletrial>
/ stimulusframes = [1=examplevideo]
/ validresponse = (0)
/ trialduration = 1000
</trial>

<block exampleblock>
/ trials = [1=exampletrial]
</block>
By jxb - 9/8/2019

Dave - 9/9/2019
jxb - 9/9/2019
Hello,
We are working on a script in which would like to show a video. Our problem is that at the end of the video the user is presented with a blank black screen. If the user presses any key, they will move on from this screen to the next part of the script. Our Band-Aid solution to this has been to add a bit to the end of the video instructing the user to press the spacebar once they see the black screen; however, we would prefer to make this smoother. Possible solutions could be: Is there any way to get the script to move on automatically at the video's end? Is there any way to put a video into a normal /block instead of in its own /video section? Is there any way to put a continue button or instructions to press a key on that black screen?
Thanks

You can have a <trial> autmotatically move on at the video's end, yes. Simply set the <video> element's /playthrough attribute to true and set the <trial> displaying the video to a /trialduration or /timeout shorter than the video's duration. I.e.

<video examplevideo>
/ items = ("yourvideo.mp4")
/ playthrough = true
...
</video>

<trial exampletrial>
/ stimulusframes = [1=examplevideo]
/ validresponse = (0)
/ trialduration = 1000
</trial>

<block exampleblock>
/ trials = [1=exampletrial]
</block>

Thank you!
By jxb - 9/9/2019

jxb - 9/9/2019
Dave - 9/9/2019
jxb - 9/9/2019
Hello,
We are working on a script in which would like to show a video. Our problem is that at the end of the video the user is presented with a blank black screen. If the user presses any key, they will move on from this screen to the next part of the script. Our Band-Aid solution to this has been to add a bit to the end of the video instructing the user to press the spacebar once they see the black screen; however, we would prefer to make this smoother. Possible solutions could be: Is there any way to get the script to move on automatically at the video's end? Is there any way to put a video into a normal /block instead of in its own /video section? Is there any way to put a continue button or instructions to press a key on that black screen?
Thanks

You can have a <trial> autmotatically move on at the video's end, yes. Simply set the <video> element's /playthrough attribute to true and set the <trial> displaying the video to a /trialduration or /timeout shorter than the video's duration. I.e.

<video examplevideo>
/ items = ("yourvideo.mp4")
/ playthrough = true
...
</video>

<trial exampletrial>
/ stimulusframes = [1=examplevideo]
/ validresponse = (0)
/ trialduration = 1000
</trial>

<block exampleblock>
/ trials = [1=exampletrial]
</block>

Thank you!

The video works how I want it to, but now I am having a problem where when the video plays on a MacBook laptop, the video is too big for the screen (the video fits the screen perfectly on PC laptops and desktops, only doesn't fit the screen on MacBooks). Is there a way to fix this video display problem for MacBooks? Thanks.
By Dave - 9/9/2019

jxb - 9/9/2019
jxb - 9/9/2019
Dave - 9/9/2019
jxb - 9/9/2019
Hello,
We are working on a script in which would like to show a video. Our problem is that at the end of the video the user is presented with a blank black screen. If the user presses any key, they will move on from this screen to the next part of the script. Our Band-Aid solution to this has been to add a bit to the end of the video instructing the user to press the spacebar once they see the black screen; however, we would prefer to make this smoother. Possible solutions could be: Is there any way to get the script to move on automatically at the video's end? Is there any way to put a video into a normal /block instead of in its own /video section? Is there any way to put a continue button or instructions to press a key on that black screen?
Thanks

You can have a <trial> autmotatically move on at the video's end, yes. Simply set the <video> element's /playthrough attribute to true and set the <trial> displaying the video to a /trialduration or /timeout shorter than the video's duration. I.e.

<video examplevideo>
/ items = ("yourvideo.mp4")
/ playthrough = true
...
</video>

<trial exampletrial>
/ stimulusframes = [1=examplevideo]
/ validresponse = (0)
/ trialduration = 1000
</trial>

<block exampleblock>
/ trials = [1=exampletrial]
</block>

Thank you!

The video works how I want it to, but now I am having a problem where when the video plays on a MacBook laptop, the video is too big for the screen (the video fits the screen perfectly on PC laptops and desktops, only doesn't fit the screen on MacBooks). Is there a way to fix this video display problem for MacBooks? Thanks.

Define a proper /size in percentages in the <video> element.