Note: You are currently viewing documentation for Moodle 2.3. Up-to-date documentation for the latest stable version is available here: MP3 player.

MP3 player: Difference between revisions

From MoodleDocs
(rewording and removing out-of-date info - please re-add any info if deleted by mistake)
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Working with media}}
{{Working with media}}
{{Update}}
The multimedia filter embeds MP3 files in a streaming player made with Flash. A larger MP3 player is used when an MP3 file is added as a [[File module settings|file]] or [[URL module settings|URL resource]] and a smaller MP3 player is used when an MP3 file is linked to from within a forum post or any other text area using the Moodle media button in the [[Text editor|text editor]] or by typing the URL of the MP3 file.
The multimedia filter embeds MP3 files in a streaming player made with Flash. The big MP3 player is used when an MP3 file is added as a [[Resources|resource]]. The small player is used when an MP3 file is linked to from within a forum post or another resource or activity using the [[HTML editor]].
 
==MP3 sample rates==
 
11.025, 22.050 and 44.100 kHz are acceptable sample rates but it is recommended to  use only 44.100 kHz (for both, music and speech recordings). The reason is that using a lower sampling rate will have very little effect on the final mp3 file size (bit rates have a bigger impact) but quality will decrease noticeably.
 
==MP3 bit rates==
Flash player 9 is no longer limited and can play audio files with the maximum MP3 bit rate, that is 320 kbps.
 
==Flash security settings==
 
Security changes in Flash player 7 may result in the MP3 player not playing MP3 files hosted on a remote server. This issue may be resolved by writing a cross-domain policy for the remote server and/or each user changing their global security settings in the Flash player settings manager.
 
===Cross-domain policy===
 
To create a cross-domain policy, save the code below as ''crossdomain.xml'' and place the file at the root (public_html or httpdocs) of the remote server.
 
<pre>
<?xml version="1.0" encoding="utf-8"?>
<cross-domain-policy>
<!-- Place top level domain name -->
<allow-access-from domain="www.yoursite.com" secure="false"/>
<allow-access-from domain="www.yoursite.com" to-ports="80,443"/>
<allow-http-request-headers-from domain="yoursite.com" headers="*" />
<!-- use if you need access from subdomains. testing/www/staging.domain.com -->
<allow-access-from domain="*.yoursite.com" secure="false" />
<allow-access-from domain="*.yoursite.com" to-ports="80,443" />
<allow-http-request-headers-from domain="*.yoursite.com" headers="*" />
</cross-domain-policy>
</pre>
 
Please refer to [http://www.macromedia.com/devnet/flash/articles/fplayer_security.html Macromedia - Developer Center: Security Changes in Macromedia Flash Player 7] for further details.
 
===Global security settings===
 
Please refer to [http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager02.html Macromedia - Flash Player Help: Global Privacy Settings Panel].


==MP3 player customisation==
==MP3 player customisation==
Line 50: Line 14:
For accessibility reasons it is not allowed to initiate an automatic playback.
For accessibility reasons it is not allowed to initiate an automatic playback.


==Inserting sounds into questions==
==Tips and tricks==


See [[Audio in Moodle]]
===Inserting sounds into questions===


Method to get the Flash player only, and no link to open an external player
[[Image:Quiz question MP3 example.JPG|thumb||Quiz question with sound]]
Method to get the Flash player only, and no link to open an external player:


#In the question text, type "Listen to this sound xxx and say what you heard."
#In the question text, type "Listen to this sound xxx and say what you heard."
#Select xxx
#Select xxx
#Click on the Insert Web Link button
#Click on the Insert Web Link button
#Give the address of your MP3 file, either a web address or an internal address of a file located in the moodledata directory of your Moodle course.
#Give the address of your MP3 file
#Toggle HTML source and view the result, something like this: Listen to <nowiki>< a href="http://moodle/file.php/2/audio/trumpet.mp3" >xxx< /a > </nowiki> and say what you heard.
#Toggle HTML source and view the result, something like this: Listen to <nowiki>< a href="http://moodle/file.php/2/audio/trumpet.mp3" >xxx< /a > </nowiki> and say what you heard.
#Delete xxx
#Delete xxx
#The result will look something like (2) in screen dump below.
#The student can only use the Flash player.


[[Image:Quiz question MP3 example.JPG|thumb|center|Example of Quiz Question with Sound]]
The student can then only use the Flash player.


==Tips and tricks==
===Temporarily disable the MP3 player ===
===Temporarily disable the MP3 player ===
* You can surround your link with <nowiki><nolink></nolink></nowiki> tags to stop any kind of processing including the multimedia filters that create the MP3 player. This may be useful when linking to external MP3 files with characters in their name that Flash cannot understand.
* You can surround your link with <nowiki><nolink></nolink></nowiki> tags to stop any kind of processing including the multimedia filters that create the MP3 player. This may be useful when linking to external MP3 files with characters in their name that Flash cannot understand.
:''TIP:''  Be careful with the no link tags or any user written HTML code.  The [[HTML editor]] may eliminate some of your work if you use the HTML editor in the future.  The HTML editor tries to tidy things up for the new user but this can frustrate an experienced user of HTML code.
:''TIP:''  Be careful with the no link tags or any user written HTML code.  The [[Text editor]] may eliminate some of your work if you use the editor in the future.  The text editor tries to tidy things up for the new user but this can frustrate an experienced user of HTML code.
:''NOTE:'' This does not work for something like the following inserted into a page resource.
:''NOTE:'' This does not work for something like the following inserted into a page resource.
<nowiki><nolink><a href="http://theExampleServer.com/file.php/55/mp3_2/mt16/The_file.mp3"> The_file.mp3</a></nolink></nowiki> , however you can stop the multimedia filter from showing when linking to files by adding ?forcedownload=1 to the end of the link.
<nowiki><nolink><a href="http://theExampleServer.com/file.php/55/mp3_2/mt16/The_file.mp3"> The_file.mp3</a></nolink></nowiki> , however you can stop the multimedia filter from showing when linking to files by adding ?forcedownload=1 to the end of the link.
Line 76: Line 38:
==See also==
==See also==
* [[Audio in Moodle]] for  links to audio MP3 encoders, audio programs, modules and plugins for Moodle
* [[Audio in Moodle]] for  links to audio MP3 encoders, audio programs, modules and plugins for Moodle
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=43297 Multimedia resource filtering on the course page] forum discussion
*[http://moodle.org/mod/forum/discuss.php?d=199218#p869558  Useful forum post regarding mp3s] (with thanks to Guillermo Madero S
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=14663 mp3 player rates] forum discussion
 
* [[Podcasting]]


[[Category:Administrator]]
[[Category:Teacher]]
[[Category:Filter]]
[[Category:Filter]]
[[Category:Audio]]
[[Category:Audio]]


[[pl:Odtwarzacz_MP3]]
[[ja:MP3プレイヤー]]
[[ja:MP3プレイヤー]]

Latest revision as of 16:49, 18 July 2012

The multimedia filter embeds MP3 files in a streaming player made with Flash. A larger MP3 player is used when an MP3 file is added as a file or URL resource and a smaller MP3 player is used when an MP3 file is linked to from within a forum post or any other text area using the Moodle media button in the text editor or by typing the URL of the MP3 file.

MP3 player customisation

It is possible to customise the colours of the the MP3 player via CSS included in the theme. For example

.mp3flowplayer_backgroundColor {color: #000000;}

modifies the background colour, see http://flowplayer.org/documentation/skinning/controlbar.html?skin=default for more colour properties, any property that ends with '...Color' can be overridden via CSS.

For accessibility reasons it is not allowed to initiate an automatic playback.

Tips and tricks

Inserting sounds into questions

Quiz question with sound

Method to get the Flash player only, and no link to open an external player:

  1. In the question text, type "Listen to this sound xxx and say what you heard."
  2. Select xxx
  3. Click on the Insert Web Link button
  4. Give the address of your MP3 file
  5. Toggle HTML source and view the result, something like this: Listen to < a href="http://moodle/file.php/2/audio/trumpet.mp3" >xxx< /a > and say what you heard.
  6. Delete xxx

The student can then only use the Flash player.

Temporarily disable the MP3 player

  • You can surround your link with <nolink></nolink> tags to stop any kind of processing including the multimedia filters that create the MP3 player. This may be useful when linking to external MP3 files with characters in their name that Flash cannot understand.
TIP: Be careful with the no link tags or any user written HTML code. The Text editor may eliminate some of your work if you use the editor in the future. The text editor tries to tidy things up for the new user but this can frustrate an experienced user of HTML code.
NOTE: This does not work for something like the following inserted into a page resource.

<nolink><a href="http://theExampleServer.com/file.php/55/mp3_2/mt16/The_file.mp3"> The_file.mp3</a></nolink> , however you can stop the multimedia filter from showing when linking to files by adding ?forcedownload=1 to the end of the link.

See also