Read the statement by Michael Teeuw here.
Halloween mirror ghouls anyone?
-
Note from admin: Please use Markdown on code snippets for easier reading!
Markdown is not available from my Android smartphone. I don’t have the correct character available…
And it’s a little too much to ask, to look-up the character on the web, so I can copy it… -
@rvdgeer said in Halloween mirror ghouls anyone?:
Note from admin: Please use Markdown on code snippets for easier reading!
Markdown is not available from my Android smartphone. I don’t have the correct character available…
And it’s a little too much to ask, to look-up the character on the web, so I can copy it…Markdown forms an Android phone -
@Jopyth Have you had any luck with this mate?
I haven’t looked at it for a while, have had a few things going on so haven’t had chance
-
@Mitchfarino did not have the time for it. I will see if I get to it, when I get back from vacation in one week.
-
I experimented with this a bit yesterday. Thanks to @rvdgeer for the hint and @Jopyth for the initial code to start.
I ripped a YouTube video to disk and uploaded it to my Pi, putting it in the
vendorfolder. Adding this to my config.js was surprisingly effective (the rotate 90 is due to the video being designed to be projected on a window):{ module: "helloworld", position: "fullscreen_below", config: { text: "<video src='vendor/halloween.mp4' autoplay loop style='transform:rotate(90deg); position:absolute; top:50%;left:30%; height:50%'></video>" } }, -
@bhepler
What video did you use?Sorry I missed the linkHow did you rip it from YouTube?
-
@Mitchfarino
check your chat ;) -
@yawns Awesome, thank you!
-
@bhepler Is there a way to loop through a number of videos, rather than just the one on repeat?
-
@Mitchfarino Presumably you can inject some scripting to define an array of video files and then call a function to play the next file in the array. If you call that function from the onended() event in the VIDEO tag you should be able to get 90% of the way there.
-
@bhepler Any idea how to do that?
-
@Mitchfarino StackExchange had a pretty good start.
Based upon the fact that the text value includes the HTML tag
-
@bhepler the problem is to get the script tag evaluated, when it gets inserted as text, i have a script that is working, but still stuck on the evaluation. It’s probably easier to just create a new module, than finding another hacky workaround
-
@strawberry-3.141 You’re going to turn me into a Javascript developer with crazy talk like that.
-
@bhepler that’s what i currently come up with
{ module: "helloworld", position: "fullscreen_below", config: { text: "<video id='halloween_player'></video><script>console.log('init'); var halloween_videos = ['http://techslides.com/demos/sample-videos/small.mp4', 'http://vo.fod4.com/v/9727363b6d/v1280-q2.mp4']; var halloween_index = 0; function playHalloweenVideos(){ console.log('play'); if(halloween_index >= halloween_videos.length){ halloween_index = 0; } var player = document.getElementById('halloween_player'); player.src = halloween_videos[halloween_index++]; player.addEventListener('ended', playHalloweenVideos); player.play(); } playHalloweenVideos();</script><img src='test.png' onload='console.log(\"test\"); eval(document.getElementById(\"halloween_player\").nextSibling.innerHTML); document.removeChild(this);'" } }but i’m not able to eval in my fake img tag, however if you enter this command in the electron console it works
eval(document.getElementById("halloween_player").nextSibling.innerHTML); -
This post is deleted! -
I’m trying to loop a video using the following:
{ module: ‘helloworld’, position: ‘fullscreen_below’, config: { text: “<video src=‘vendor/skelloop.mp4’ autoplay loop; position:absolute; top:100%;left:50%; height:200%’></video>” } },but it just stops after the first run. I’m using the OMXplayer which I would have thought would have taken the loop parameter - but it seems it doesn’t. Anyone have an idea how I can fix this?
-
@frog You seem to be missing the
style='position...part.So:
config: { text: “<video src=‘vendor/skelloop.mp4’ autoplay loop style='position:absolute; top:100%;left:50%; height:200%’></video>” } -
@bhepler yup, that dit it. Thanks!
-
is there a way to use a variable in the video file name? This is so close to what I want it hurts. What I want to do is play a random video from a specific location. I will be creating the videos so I will have complete control over the video naming and encoding.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login