By audiosophy - 10/13/2015
Hey,
To maximise video compatibility across devices, I was wondering for a web experiment whether it was possible to host a youtube video within, say, an iframe using the html element?
This would be a good way to ensure people lacking codecs to certain videos would see the video.
Thanks,
|
By Dave - 10/13/2015
In theory, that's possible. Whether it turns out to lead to better results in practice, I'm not sure. While it may get around the odd codec issue, embedding streaming videos opens up issues of bandwidth, etc. at runtime. Also, since under Windows, Inquisit embeds Internet Explorer to render HTML content, I'm not sure whether it'll work reliably under all different versions and configurations you may encounter in the wild. In addition, Internet Explorer's embedding has some quirks and imposes a bunch of odd constraints on things like handling of cookies, etc., i.e., it's possible that it would work fine with one streaming platform but not others.
The best thing to do, perhaps, would be a limited test run?
|
By audiosophy - 10/29/2015
So, I made a simple experiment that loads a html page with an iframe embedded in it. The html loads fine when I run it in my browser, but doesn't load when I run it either on Inquisit lab, or from the web-script.
The experiment looks like this:
<html awe_video> / items = ("awe_page.htm") / size = (100%, 100%) / erase = true(255, 255, 255) </html>
<trial awe_video> / stimulustimes = [500=awe_video] / trialduration = 5000 / ontrialend= [trial.awe_video.resetstimulusframes();] </trial>
<block awe_video> / trials = [1=awe_video] </block>
<expt> / blocks = [1=awe_video] </expt>
And the html, called awe_page.htm looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/2099/xhtml" > <head> <title>Task Instructions</title> <style type="text/css"> html { overflow: auto; } </style> </head> <body style="background-color:black; font-family:Arial; color:white; font-size:16pt; border-collapse:collapse; border-style:none; border-width:0px;"> <div style="margin:auto; text-align:center"> <iframe src="https://www.youtube.com/embed/3FZxtZiTvEo?rel=0&autoplay=1&controls=0&showinfo=0" style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:10%; height:9%; border:none; margin:0; padding:0%; overflow:hidden; z-index:999999;"> Your browser doesn't support iframes </iframe> </div> </body> </html>
As I said, this loads fine when run from my browser (the video window is intentionally small btw), but not from Inquisit. Any ideas?
thanks in advance!
|
By Dave - 10/29/2015
That probably means your firewall is blocking Inquisit (Lab) from making outbound and inbound connections. The HTML will load when you allow it to do so. Whether the embedding will work with Youtube is a different matter due to the restrictions mentioned previously.
|
By audiosophy - 10/29/2015
Ok cool - changing my firewall settings sorted out that out for lab. But what about the web player version?
|
By Dave - 10/30/2015
Should make no difference. FWIW, the HTML loads perfectly fine for me when using the web player. Regardless, though, I don't think the approach is generally viable -- while it *might* avoid a codec issue in a few cases, it is likely to run into other issues instead.
|
By audiosophy - 10/30/2015
Oh interesting. Ok well, I will switch to uploading my videos to the Inquisit server, however, I am having trouble with that, but I will leave that for a new post
|
|