mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 04:04:20 +00:00 
			
		
		
		
	Can play forever songs
This commit is contained in:
		@@ -29,6 +29,23 @@ class SongPlayer {
 | 
			
		||||
	 * Play audio just once
 | 
			
		||||
	 */
 | 
			
		||||
	playOnce(){
 | 
			
		||||
		this.songElem.loop = false;
 | 
			
		||||
		this.songElem.play();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Play song forever
 | 
			
		||||
	 */
 | 
			
		||||
	playForever(){
 | 
			
		||||
		this.songElem.loop = true;
 | 
			
		||||
		this.songElem.play();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Stop song
 | 
			
		||||
	 */
 | 
			
		||||
	stop(){
 | 
			
		||||
		this.songElem.pause();
 | 
			
		||||
		this.songElem.currentTime = 0;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user