The duration property of the media object used in setMedia only affects the display. You could say the media is 30 seconds long, but if it is really 3 minutes long then it will go up to 3 minutes and the GUI will just look odd with the bar and odd times.
Example use so duration shows on page load... In the example, the piece of audio is 3 minutes, 29 seconds long:
$("#jquery_jplayer_1").jPlayer({
ready: function (event) {
$(this).jPlayer("setMedia", {
title: "Bubble",
duration: 209,
m4a: "http://jplayer.org/audio/m4a/Miaow-07-Bubble.m4a",
oga: "http://jplayer.org/audio/ogg/Miaow-07-Bubble.ogg"
});
},
swfPath: "js",
solution: "flash,html",
supplied: "m4a, oga",
wmode: "window"
});
To do what you want though, you need to use the timeupdate event.
timeupdate: function (event) {
if(event.jPlayer.status.currentTime > 45) {
$(this).jPlayer("stop");
});
},