So, lets see I have a quiz setup and the quiz outputs a string of numbers.
Each number corresponds to the choice taken by the viewer. I have the setup in place and I just use divs that show or hide based on the numbers. This is all fun and easy to do.
Now for the fun part. Each block of text is now recorded into an audio, I need to assemble the answers and play them in a sequence.
1 = Q1-Audio
1 = Q2-Audio
Right, using Jwplayer, I am need to make a playlist so it plays it in the exact sequence.
So, far JWplayer have given me this hint:http://support.jwplayer.com/customer/portal/articles/1439570-example-loading-new-playlists
But it doesn't mention a list of files.
I dug around and found .smil but it's used for RTMP which doesn't work for mobile.
So, after digging more, I found a way. To make this work I need to create an RSS file which saves the file. That can later be accessed later on. It has to be backward compatible in a way.http://support.jwplayer.com/customer/portal/articles/1413113-configuration-options-referencehttp://support.jwplayer.com/customer/portal/articles/1403635-media-format-reference
Above are some reference articles.
So, lets talk about psuedo code.
User takes the quiz > Reaches the confirmation page > Results are send to the script > User opted in/results details send as well.
User opens e-mail > Clicks link > Gets taken to result page > page shows information based on the results.
Okay that is already working and in place
The script that opts users in and does the processing is the same one slarti help me create, you know the image thingy. Yep this the exact one.
Parse Query String
answers = filename;
answers = playlist;
loop for playlist;
takes number [1024 or something] and assigns them file name.
q1 = 2 choices = 2 audio files, values 0 1
q2 = 3 choices = 3 audio files values 0 1 2
q3- 4 choices = 4 audio files values 0 1 2 3
q4 - 4 choices = 4 audio files values 0 1 2 3
So, if the value is 1 2 1 3
Array has the values stored in, it takes the values and makes and RSS file in the correct syntax (this is will be difficult)
saves the file in the correct folder.
fp create file 'quiz+filename', a; //embeds the quiz type [MM/PENG/EX] + filename 
fp saves the rss the file and is later called in the result file.
takes answers and quiz type.
Links to to the domain with rss files saved.
So it will be unique and won't get duplicated
JWPLAYER loads the files and simply plays it.
title: "Sintel Movie Trailer",
Now this is the hard part, how I can make a file like that save it? Not really sure on this, Slarti any comments?