add pause function into payer control
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							parent
							
								
									108514aaa4
								
							
						
					
					
						commit
						6b6d3fd3f0
					
				@ -119,8 +119,12 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    play() {
 | 
					    play() {
 | 
				
			||||||
      if (this.audio.paused) {
 | 
					      this.audio.play();
 | 
				
			||||||
        this.audio.play();
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    pause() {
 | 
				
			||||||
 | 
					      if (!this.audio.paused) {
 | 
				
			||||||
 | 
					        this.audio.pause();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    durationChanged() {
 | 
					    durationChanged() {
 | 
				
			||||||
@ -244,10 +248,10 @@ export default {
 | 
				
			|||||||
      if ("mediaSession" in navigator) {
 | 
					      if ("mediaSession" in navigator) {
 | 
				
			||||||
        let me = this;
 | 
					        let me = this;
 | 
				
			||||||
        navigator.mediaSession.setActionHandler("play", function () {
 | 
					        navigator.mediaSession.setActionHandler("play", function () {
 | 
				
			||||||
          me.togglePlaying();
 | 
					          me.play();
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        navigator.mediaSession.setActionHandler("pause", function () {
 | 
					        navigator.mediaSession.setActionHandler("pause", function () {
 | 
				
			||||||
          me.togglePlaying();
 | 
					          me.pause();
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        navigator.mediaSession.setActionHandler("seekto", function (details) {
 | 
					        navigator.mediaSession.setActionHandler("seekto", function (details) {
 | 
				
			||||||
          if (details.fastSeek && "fastSeek" in me.audio) {
 | 
					          if (details.fastSeek && "fastSeek" in me.audio) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user