Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 3:22 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Playing Sound (MP3) in Web/Plexus Pub
PostPosted: February 25th, 2010, 2:46 am 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi,

I haven't used web pubs (depending on the Plexus plug-in) often, so I'm not sure how to re-script a regular pub so that a sound (MP3) file plays when the pub is uploaded to a web site.

The regular pub script is:
Code:
var mySound = OpenSound(SYSTEM_PUBLICATION_DIR + "\\" + "xyz.mp3")


Then to play:
Code:
mySound.Play(1,volume)


I tried uploading the MP3 file into the same directory as the htm and ilm files, based on SYSTEM_PUBLICATION_DIR, but this didn't work, sound didn't play. Then I tried to script the MP3 file's URL directly into the OpenSound, but this also didn't work.

Not sure how to play the sound, script the MP3's location, for a web based pub. Maybe it's not possible?

Any help will be appreciated.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: February 25th, 2010, 5:06 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
try
Code:
var mySound = SYSTEM_PUBLICATION_DIR +"xyz.mp3"

ref: Duncan... viewtopic.php?t=2701&highlight=systempublicationdir


Added info: Does not seem to apply here, but there have been times where I needed to Save the current Opus pub before Previewing in order for it to see or find certain files/resources. I don't recall the scenario, but a simple tip to keep in mind.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: February 25th, 2010, 1:07 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Larry,

I'm beginning to think that a web-based pub, using the Plexus plug-in, cannot play sound. I had scripted in the full path to the MP3 (ie, http://www...), and this also did not get the sound effect to play.

When previewing the project on the desktop, the sound plays OK whether I use SYSTEM_PUBLICATION_DIR + file name, variations of this, or the direct path.

Once I publish as a web pub (after saving the IMP), upload it (and the MP3) to my site, it will no longer play the sound.

Not sure what to do to get the sound to play? Can't find any references about where to locate web pub resources and script paths to them in the help files or on the forum.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: February 25th, 2010, 4:02 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Plexus won't find the SYSTEM_PUBLICATION_DIR.

But if your sound is fixed, the easiest method is to add it to the additional resources and call the alias in the script.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 25th, 2010, 4:23 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Thanks, Mack.

I gave this a try, but am having difficulty publishing.

The file path in the alias box is:
http://www.eLearningprojects.com/SHTest/Exhale.mp3 (I've placed the sound file on my site in a folder called SHTest.

In preview, using this alias, it works OK. I can hear the sound. But when I try to publish, I get an error saying that the file cannot be opened.

Should I use a different way to set up the sound file location?

Not sure how to accomplish this.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject: Sound in Web publications.
PostPosted: February 25th, 2010, 7:23 pm 
Offline

Joined: June 26th, 2007, 11:59 am
Posts: 60
Opus: Opus 9.01
OS: Windows 7
System: Heinz 57
Why not just embed the sound file in the publication using an audio action. I use it all the time without any problems. Or am I missunderstanding your problem?

Dave Bryant

_________________
Opus Pro v7, Windows XP Pro SP2, Intel Core 2 , Quad CPU Q6600 @ 2.4GHz, 1GB RAM, Partitioned HD 10 GB & 30 GB. Internet Explorer 7.


Top
 Profile  
 
 Post subject:
PostPosted: February 25th, 2010, 8:24 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Dave,

Yes, when I went back to follow up on your idea, I noticed that I needed to add the mp3 files as additional resources, then save, thereby embedding them, then publish. Once done correctly, all worked fine. :oops:

Thanks everyone!

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: February 25th, 2010, 8:58 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi Stephen,

The file needs to be local. Opus will include it in the publication - which can then be uploaded.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 25th, 2010, 10:03 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Thanks, Mack.

Yes, that worked.

The ability to change some of my desktop projects into web-based is a great benefit.

The only thing I can't figure out is if there is any way to restrict viewing similar to a desktop's evaluation version which has to be unlocked. I've never seen anything like this for web pubs, but "never say never."

(The LMS that I have used can do this for its companion tool's generated pubs, but not for any third party ones, like Opus web pubs.)

Have you discovered any way to "lock" web pubs?

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: February 25th, 2010, 10:14 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Depends what type of evaluation you want. Given as you have access to an on-line DB, you could simply require the users to register, like the LMS and log access rights to the DB.

Mack

P.S How's the 64bit route going?

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 25th, 2010, 10:46 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Mack,

I was thinking more about restricting access for eCommerce purposes. I can place a link to the Opus web pub in an LMS lesson. The lesson itself would require a micro-payment. However, once the link is used, the web pubs URL could be given to others without payment. And the web pub carries the primary, active learning ingredients.

An item created in the LMS's companion tool can be set to only run if inside the LMS. Unfortunately, no third party pub can be set up similarly to not run, if not in the LMS. So, the challenge is using some of these Opus web pubs in a way that is able to still collect the payment. An age-old challenge for eCommerce.

I can't quite figure any way to configure the web pub to restrict its being run simply by navigating to its URL, once known by the user. Any thoughts?

The 64 bit is working fine. So far, I haven't experienced any limitations. Most programs are automatically installed to its 32 bit directory and run flawlessly.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: February 25th, 2010, 11:08 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
If the LMS web page can handle PHP then I'd use Session variables to set a key, launch the web publication URL and use Opus' PHP to check the session variable key.

Thus, if the publication is launched directly from the URL, the session variable won't be present and the publication can be set to fail.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 25th, 2010, 11:58 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Mack,

Yes, somehow I thought that you may suggest using PHP. My web site is a Windows server (shared hosting using GoDaddy, an ISP), which would be able to have PHP functionality, but I would have to upgrade it, at no cost, from IIS6 to IIS7.

Before doing that, a bigger challenge:

the LMS writes to a MsSQL DB. So, when a payment is made, it gets written to the MsSQL DB.

I think PHP (if I upgrade to IIS7) can be used to read from the LMS's MSSQL DB. So Opus, if I can figure out the correct PHP script, probably can check the LMS's MsSQL DB to see, for example, if a payment was made (if yes, then it runs, if not, it closes). I don't know much about this...

I can check Robin Garrett's excellent DB tutorials on this forum. I am hoping to find a PHP script example that I can modify to test connecting to and reading from an MsSQL DB? I also found 2 web sites but I don't understand PHP, but am about to learn :)

http://www.webcheatsheet.com/PHP/connect_mssql_database.php
http://www.aspfree.com/c/a/MS-SQL-Server/Using-PHP-with-MS-SQL-Server/3/

Thanks for your suggestion.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: February 26th, 2010, 9:33 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi Stephen,


I wasn't referring to DB access. The session variable is stored in memory on the server running the web page.

It's like the windows clipboard. From MS Word you copy some text, then in OO Writer you paste that text.

However, on a different note: If your Opus publication had a login that referenced the LMS DB and checked against the 'paid' lesson - this method would work as well.

I think due to security changes in PHP, Robins tutorials are out of date. Something like the Visual Quick Start range such as the PHP & SQL are good books for beginners. Buy the recent versions though or what matches your Server's configuration.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 26th, 2010, 2:13 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Mack,

It sounds like your method may be a lot easier, but I can't quite understand the process or how I could easily implement it. What I need to accomplish: assure that someone cannot simply navigate to the web pub's URL (which contains an interactive exercise developed in Opus)rather than access it via a link in the lesson.

I took a look at the DB table, and couldn't make much out of it: I thought that if I could figure out which tables entries I would need to check, maybe then I could write a script in ASP or PHP. But, it's far more complicated, at least for me: never did this before.

However, a less elegant solution that so far seems to work is to add a JS script on the Opus web pub htm page checking the referring URL. If not a specified URL, then the page redirects to another page.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group