Toggle also returns promise
This commit is contained in:
		@ -371,7 +371,7 @@ class Plyr {
 | 
				
			|||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.media.pause();
 | 
					        return this.media.pause();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
@ -411,9 +411,9 @@ class Plyr {
 | 
				
			|||||||
        const toggle = is.boolean(input) ? input : !this.playing;
 | 
					        const toggle = is.boolean(input) ? input : !this.playing;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (toggle) {
 | 
					        if (toggle) {
 | 
				
			||||||
            this.play();
 | 
					            return this.play();
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            this.pause();
 | 
					            return this.pause();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user