Millisecond Forums

Help incorporating videos in code!

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

By fm323 - 11/5/2020

Hi! In my experiment I have 30 trials, and I would like to be able to insert a video clip after every 5 trials. Would this be possible?
By Dave - 11/5/2020

fm323 - 11/5/2020
Hi! In my experiment I have 30 trials, and I would like to be able to insert a video clip after every 5 trials. Would this be possible?

Yes, that's of course possible. Add a <trial> element that displays the <video> and run that as every 6th trial per your <block>'s /trials.
By fm323 - 11/5/2020

Dave - 11/5/2020
fm323 - 11/5/2020
Hi! In my experiment I have 30 trials, and I would like to be able to insert a video clip after every 5 trials. Would this be possible?

Yes, that's of course possible. Add a <trial> element that displays the <video> and run that as every 6th trial per your <block>'s /trials.

Great! Do you think you could help me a bit writing this section of the code? You would be helping me out so much :)
By Dave - 11/5/2020

fm323 - 11/5/2020
Dave - 11/5/2020
fm323 - 11/5/2020
Hi! In my experiment I have 30 trials, and I would like to be able to insert a video clip after every 5 trials. Would this be possible?

Yes, that's of course possible. Add a <trial> element that displays the <video> and run that as every 6th trial per your <block>'s /trials.

Great! Do you think you could help me a bit writing this section of the code? You would be helping me out so much :)

Provide your code and a sufficiently detailed description of what exactly you want to do then, please. An "experiment [with] 30 trials" can look 500 different ways, I cannot provide any specific guidance based on such a vague description.
By fm323 - 11/5/2020

I'm using the Balloon Analogue Risk Task, the script I have is attached. I would like for the participant to view the first clip after reading the instructions but before starting the trials. Then, after trial 5, a specific video clip is played. Also after trial 10, 15, 20 and 25. Each video is different to the last.  Let me know if there's any more information I can provide. Thanks so much!
By Dave - 11/5/2020

fm323 - 11/5/2020
I'm using the Balloon Analogue Risk Task, the script I have is attached. I would like for the participant to view the first clip after reading the instructions but before starting the trials. Then, after trial 5, a specific video clip is played. Also after trial 10, 15, 20 and 25. Each video is different to the last.  Let me know if there's any more information I can provide. Thanks so much!

So there are five different videos? Are these supposed to be sampled randomly or in some specific order? Are participants supposed to respond to these videos in any way or just passively watch them, with the script just moving on automatically after each clip? Please be precise, your description is still exceedingly vague. Moreover, the script you attached does not contain any provisions at all regarding the videos, not even the names of the respective video files. Provide those, please.
By fm323 - 11/5/2020

Dave - 11/5/2020
fm323 - 11/5/2020
I'm using the Balloon Analogue Risk Task, the script I have is attached. I would like for the participant to view the first clip after reading the instructions but before starting the trials. Then, after trial 5, a specific video clip is played. Also after trial 10, 15, 20 and 25. Each video is different to the last.  Let me know if there's any more information I can provide. Thanks so much!

So there are five different videos? Are these supposed to be sampled randomly or in some specific order? Are participants supposed to respond to these videos in any way or just passively watch them, with the script just moving on automatically after each clip? Please be precise, your description is still exceedingly vague. Moreover, the script you attached does not contain any provisions at all regarding the videos, not even the names of the respective video files. Provide those, please.

These clips are different to each other and are supposed to be watched in order (1-6). The script should move on automatically after each clip has ended, and the video may not be skipped. Participants do not need to respond in any way, just carry on with the study. I can't seem to attach the video clips here, but the file names are as follows; "1.mov", "2.mov", "3.mov", "4.mov", "5.mov" and "6.mov"
By Dave - 11/5/2020

fm323 - 11/5/2020
Dave - 11/5/2020
fm323 - 11/5/2020
I'm using the Balloon Analogue Risk Task, the script I have is attached. I would like for the participant to view the first clip after reading the instructions but before starting the trials. Then, after trial 5, a specific video clip is played. Also after trial 10, 15, 20 and 25. Each video is different to the last.  Let me know if there's any more information I can provide. Thanks so much!

So there are five different videos? Are these supposed to be sampled randomly or in some specific order? Are participants supposed to respond to these videos in any way or just passively watch them, with the script just moving on automatically after each clip? Please be precise, your description is still exceedingly vague. Moreover, the script you attached does not contain any provisions at all regarding the videos, not even the names of the respective video files. Provide those, please.

These clips are different to each other and are supposed to be watched in order (1-6). The script should move on automatically after each clip has ended, and the video may not be skipped. Participants do not need to respond in any way, just carry on with the study. I can't seem to attach the video clips here, but the file names are as follows; "1.mov", "2.mov", "3.mov", "4.mov", "5.mov" and "6.mov"

See attached.
By fm323 - 11/8/2020

Dave - 11/5/2020
fm323 - 11/5/2020
Dave - 11/5/2020
fm323 - 11/5/2020
I'm using the Balloon Analogue Risk Task, the script I have is attached. I would like for the participant to view the first clip after reading the instructions but before starting the trials. Then, after trial 5, a specific video clip is played. Also after trial 10, 15, 20 and 25. Each video is different to the last.  Let me know if there's any more information I can provide. Thanks so much!

So there are five different videos? Are these supposed to be sampled randomly or in some specific order? Are participants supposed to respond to these videos in any way or just passively watch them, with the script just moving on automatically after each clip? Please be precise, your description is still exceedingly vague. Moreover, the script you attached does not contain any provisions at all regarding the videos, not even the names of the respective video files. Provide those, please.

These clips are different to each other and are supposed to be watched in order (1-6). The script should move on automatically after each clip has ended, and the video may not be skipped. Participants do not need to respond in any way, just carry on with the study. I can't seem to attach the video clips here, but the file names are as follows; "1.mov", "2.mov", "3.mov", "4.mov", "5.mov" and "6.mov"

See attached.

When I try to run the experiment, an error message comes up: "'trial.showvideo' Expression contains an invalid identifier" for the element "trial.collect". What can I do to fix this?

Thanks so much for your help Dave, you're saving me right now!
By Dave - 11/9/2020

fm323 - 11/8/2020
Dave - 11/5/2020
fm323 - 11/5/2020
Dave - 11/5/2020
fm323 - 11/5/2020
I'm using the Balloon Analogue Risk Task, the script I have is attached. I would like for the participant to view the first clip after reading the instructions but before starting the trials. Then, after trial 5, a specific video clip is played. Also after trial 10, 15, 20 and 25. Each video is different to the last.  Let me know if there's any more information I can provide. Thanks so much!

So there are five different videos? Are these supposed to be sampled randomly or in some specific order? Are participants supposed to respond to these videos in any way or just passively watch them, with the script just moving on automatically after each clip? Please be precise, your description is still exceedingly vague. Moreover, the script you attached does not contain any provisions at all regarding the videos, not even the names of the respective video files. Provide those, please.

These clips are different to each other and are supposed to be watched in order (1-6). The script should move on automatically after each clip has ended, and the video may not be skipped. Participants do not need to respond in any way, just carry on with the study. I can't seem to attach the video clips here, but the file names are as follows; "1.mov", "2.mov", "3.mov", "4.mov", "5.mov" and "6.mov"

See attached.

When I try to run the experiment, an error message comes up: "'trial.showvideo' Expression contains an invalid identifier" for the element "trial.collect". What can I do to fix this?

Thanks so much for your help Dave, you're saving me right now!

The script works fine and shows no such error under the current Inquisit 6 release. That is what you ought to be using.
By fm323 - 11/9/2020

Dave - 11/9/2020
fm323 - 11/8/2020
Dave - 11/5/2020
fm323 - 11/5/2020
Dave - 11/5/2020
fm323 - 11/5/2020
I'm using the Balloon Analogue Risk Task, the script I have is attached. I would like for the participant to view the first clip after reading the instructions but before starting the trials. Then, after trial 5, a specific video clip is played. Also after trial 10, 15, 20 and 25. Each video is different to the last.  Let me know if there's any more information I can provide. Thanks so much!

So there are five different videos? Are these supposed to be sampled randomly or in some specific order? Are participants supposed to respond to these videos in any way or just passively watch them, with the script just moving on automatically after each clip? Please be precise, your description is still exceedingly vague. Moreover, the script you attached does not contain any provisions at all regarding the videos, not even the names of the respective video files. Provide those, please.

These clips are different to each other and are supposed to be watched in order (1-6). The script should move on automatically after each clip has ended, and the video may not be skipped. Participants do not need to respond in any way, just carry on with the study. I can't seem to attach the video clips here, but the file names are as follows; "1.mov", "2.mov", "3.mov", "4.mov", "5.mov" and "6.mov"

See attached.

When I try to run the experiment, an error message comes up: "'trial.showvideo' Expression contains an invalid identifier" for the element "trial.collect". What can I do to fix this?

Thanks so much for your help Dave, you're saving me right now!

The script works fine and shows no such error under the current Inquisit 6 release. That is what you ought to be using.

Yes, just needed to update! Again, thank you Dave.