xiaoyifang / goldendict-ng

The Next Generation GoldenDict
https://xiaoyifang.github.io/goldendict-ng/
Other
1.58k stars 85 forks source link

Feature request: Support for continuous audio playback & play/pause buttons #1771

Open samvan11 opened 5 days ago

samvan11 commented 5 days ago

Hello,

I use GoldenDict as my primary dictionary tool. It's really great. I would also like to use it with audio resources (stories, songs, poems etc.) prepared in dictionary formats (DSL or MDX) in which lines or passages are paired with separate audio files with their translations beneath. It's already possible to use GoldenDict with such files, but the auto-pronounce option only plays the first item. One needs to click on each of the following items to listen to them which is not very convenient. It would be great if there were an option to allow continuous playback of items along with pause/resume controls on the toolbar. That would allow GoldenDict to be used not only for looking up dictionaries, but with many other audio projects.

I hope you find it worth considering.

shenlebantongying commented 4 days ago

I think for the “play button" we should implement a right click menu which will show a list of available audios and clicking one of them will play the audio, and it won't disappear after clicking.

This will cover

samvan11 commented 4 days ago

That would work well with dictionary items when audios are relatively short (typically of a word or phrase) and belong to different articles, but what if they belong to the same file/article and represent longer strings (like multiple sentences or paragraphs), or if there are numerous items in the article? Wouldn't it be problematic to display/fit and name them on the right click menu?

My idea was GoldenDict to handle audio items in an article or search result similar as how media players do with playlists. That is, when the "continuous playback" option is enabled, the play button on the toolbar would play items consecutively (starting from the first one), and when an audio item is clicked (instead of the main toolbar button), it would skip previous items and start playing from that one and followed by the rest consecutively.