Previewing audio doesn't change the status of the player, or at least not that Obi can tell, so it cannot be stopped. This is a problem when previewing a selection, which can be arbitrarily long, as the stop button is disabled (although it is possible to press play, then stop again.) I also find the implementation of preview in the audio player complex and confusing.
I think that now that selection and playback are separated, we don't really need a dedicated "preview" feature in the player anymore. We can implement "preview from..." and "preview up to..." by simply playing a dummy selection of the preview duration, and resetting the audio cursor (if we were paused) to the start position in the case of "preview from...". "Preview selection" would just play the current selection and move the cursor back.
Logged In: YES
user_id=1444516
Originator: NO
This was looking as reliable way out at time of implementation. But as audio cursor and selection have improved now. there is no problem if preview moves outside AudioPlayer.
Listing some desired characteristics of preview.
- preview can be invoked in only paused state or stopped state.
- After preview is complete, it brings back audio cursor at
original position i.e. position at which audio cursor was before starting preview.