Hi everyone. I don’t know what I’m doing wrong when loading a video (in order to display it just after loading). Here is my .js and .html code:
js.code
function preload() {
vid = createVideo('videos/20th_Century_Starwars_intro.mp4');
soundtrack = loadSound('sounds/star_wars_opening.mp3');
}
html.code
<html>
<head>
<meta charset="UTF-8">
<!-- PLEASE NO CHANGES BELOW THIS LINE (UNTIL I SAY SO) -->
<script language="javascript" type="text/javascript" src="libraries/p5.js"></script>
<script language="javascript" type="text/javascript" src="libraries/p5.sound.js"></script>
<script language="javascript" type="text/javascript" src="creditsroll3d.js"></script>
<!-- OK, YOU CAN MAKE CHANGES BELOW THIS LINE AGAIN -->
<!-- This line removes any default padding and style.
You might only need one of these values set. -->
<style> body {padding: 0; margin: 0;} </style>
</head>
<body>
</body>
</html>
And I get the following error code (in Chrome debuger):
Uncaught ReferenceError: createVideo is not defined
at preload (creditsroll3d.js:35)
at p5.<anonymous> (p5.js:9038)
at new p5 (p5.js:9323)
at _globalInit (p5.js:5602)
I’ve already done this in the same way in another sketch under Processing ide and Chrome and it works… But here no idea about what’s wrong.
Any insight?
Thanks for your attention!