简体   繁体   中英

jPlayer - set to play once and only once

I've been searching for the best way to get a jPlayer instance to allow an audio file to only be played once. I think I could call .jPlayer("destroy"); after the event is completed, but I feel like there must be a better way.

$(id).jPlayer( "clearMedia" ) : jQuery

You can use this to clear your current media after playing one song. After that play button wont play anything untill you use new url by using setmedia method

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM