OJS Supports several techniques of embedding video and audio into HTML articles. The simplest way is to use the <embed> tag, with the name of the file (which has been uploaded in the HTML galley images section) as the src parameter. For example:
- Code: Select all
<embed src="filename.ext" width="300" height="200"></embed>
This will embed the media player appropriate for the file type being played (i.e. Flash player, Quicktime, Windows Media Player). OJS will automatically rewrite the filename to the URL OJS uses internally for that file.
To use a media player with more features, we suggest Flowplayer (http://www.flowplayer.org). To use Flowplayer, you must play your files in a playlist, even if there is only one file in it. This informs Flowplayer what file type is being played, which is necessary for it to function. For example:
- Code: Select all
<head>
<script type="text/javascript" src="http://yourdomain.com/flashembed.min.js"></script>
</head>
<script>
window.onload = function() {
flashembed("example",
{ src:'http://yourdomain.com/FlowPlayerDark.swf',
width: 400,
height: 350
},
{ config: {
playList: [ { url:'video.swf', type: 'swf' } ]
}}
);
}
</script>
<div id="example"></div>
Which will play the file video.swf using the dark Flowplayer skin. The skins and Javascript file are included with Flowplayer, and should be placed somewhere on your web server so that multiple pages can access it.
When using Flowplayer to play audio files (e.g. MP3s), it may be useful to set the height to something smaller, so only the controls are shown.
As always, please let us know if there are any issues you have with this!
Kind regards,
Matt Crider
