Page 1 of 1

Music while playing slideshow

Posted: Wed Feb 14, 2018 7:16 am
by Zedd8888
Hi all,

i'd like to play a complete music-file while displaying a slideshow...but the moment the page changes, the music stops :(
Is there a way to do it??

Best ,
Zedd

Re: Music while playing slideshow

Posted: Wed Feb 14, 2018 8:03 am
by FATALES
In Nyx probably not.

Powerpoint - YES :D

Re: Music while playing slideshow

Posted: Wed Feb 14, 2018 8:09 am
by Zedd8888
:-D
And TeaseMe?

Re: Music while playing slideshow

Posted: Wed Feb 14, 2018 7:09 pm
by philo
Zedd8888 wrote: Wed Feb 14, 2018 8:09 am :-D
And TeaseMe?
I don't think so for TeaseMe as the music would stop on change of page.
GuideMe it is possible, you would need a single page that played the music file and use java script and a timer to change the image.

Re: Music while playing slideshow

Posted: Wed Feb 14, 2018 7:39 pm
by Zedd8888
Thanx philo!

Javascript is too complicated for me.... so i'll try to change my tease :\'-(

Best,
Zedd

Re: Music while playing slideshow

Posted: Wed Feb 14, 2018 11:30 pm
by Shattered
Not ideal, but you could request that the user open a link to your music. That's about as good as it gets.

Re: Music while playing slideshow

Posted: Thu Feb 15, 2018 11:22 pm
by Ambossli
you can use teasme and let's say start the audio on the first page for 30 sec and then on the next page the audio starts at 30 sec and so on

is not optimal but should work
GuideMe it is possible, you would need a single page that played the music file and use java script and a timer to change the image.
That should 1 or 2 lines maybe someone can provide it

Re: Music while playing slideshow

Posted: Sun Feb 18, 2018 3:44 am
by PlayfulGuy
Zedd8888 wrote: Wed Feb 14, 2018 7:16 am Hi all,

i'd like to play a complete music-file while displaying a slideshow...but the moment the page changes, the music stops :(
Is there a way to do it??

Best ,
Zedd
This idea intrigued me so I threw together this working sample for Guideme that does exactly what you want. It includes a simple random slideshow with background music, and another example showing sequential images with background music. I've made it easy enough to customize and (hopefully) put in enough comments for you to figure it out.

The zip file was too big to attach, so here's a Mega link.
Slideshow With Music.zip

In the XML file you'll find three pages defined. The first is named "start" and just provides you with a description and a couple buttons you can use to choose the slideshow you want to see. The other two are the slideshow pages.

Something I thought of after uploading it:

If you look at the code for the SlideshowWithMusic page the first few lines of it look like this:

Code: Select all

    <Page id="SlideshowWithMusic">
      <!-- In the following Audio element the target="start" attribute makes Guideme go back
            to the start page when the music ends -->
      <Audio id="Music/*.mp3" target="start" />
In the last line there if you change target="start" to target="SlideshowWithMusic" you will get a page that just keeps looping, starting another random song and playing the random slideshow until you click the End button.

The same can be done with the sequential images one of course.

Enjoy!

PG

Re: Music while playing slideshow

Posted: Sun Feb 18, 2018 2:32 pm
by Zedd8888
Cool - i'll try it ASAP!!

Re: Music while playing slideshow

Posted: Sat Nov 17, 2018 9:57 pm
by Pseudonym
Thanks PlayfulGuy! This looks very useful.

I have a question. Do you think it's possible to break the loop and go to different page after x repetitions rather than using a button?

Re: Music while playing slideshow

Posted: Sun Nov 18, 2018 9:48 am
by philo
Simplified version of the play a random picture
The main difference is the timer is set as xml not javascript
It play a random audio file then changes the image every 5 to 11 seconds
When the audio finishes it loops back to the same page and plays another random audio file
In the folder where the xml file is you need a slideshow folder and within that an audio folder and an images folder.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<Tease id="37050" scriptVersion="v0.1">
	<MediaDirectory>slideshow</MediaDirectory>
	<Pages>
		<Page id="start">
			<Text></Text>
			<Image id="images/*" />
			<Audio id="audio/*" target="start"/>
			<Timer seconds="5" imageId="images/*" onTriggered="timer1()" id="imgchng"/>
		  <javascript><![CDATA[
			function timer1() {
				guide.resetTimer("imgchng", "(5..11)");
			}
			]]></javascript>	
		</Page>
	</Pages>
</Tease>