mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	Add back the Audio Only mode.
This commit is contained in:
		
							parent
							
								
									a2f95c9d9e
								
							
						
					
					
						commit
						b8ac67b7af
					
				
					 2 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
					@ -105,6 +105,8 @@ export default {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            this.player = player;
 | 
					            this.player = player;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (localStorage && localStorage.getItem("audioOnly")) this.player.configure("manifest.disableVideo", true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            player.load("data:application/dash+xml;charset=utf-8;base64," + btoa(dash)).then(() => {
 | 
					            player.load("data:application/dash+xml;charset=utf-8;base64," + btoa(dash)).then(() => {
 | 
				
			||||||
                this.video.subtitles.map(subtitle => {
 | 
					                this.video.subtitles.map(subtitle => {
 | 
				
			||||||
                    player.addTextTrackAsync(
 | 
					                    player.addTextTrackAsync(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -34,6 +34,10 @@
 | 
				
			||||||
    <b>Autoplay Video</b>
 | 
					    <b>Autoplay Video</b>
 | 
				
			||||||
    <br />
 | 
					    <br />
 | 
				
			||||||
    <input class="uk-checkbox" v-model="autoPlayVideo" @change="onChange($event)" type="checkbox" />
 | 
					    <input class="uk-checkbox" v-model="autoPlayVideo" @change="onChange($event)" type="checkbox" />
 | 
				
			||||||
 | 
					    <br />
 | 
				
			||||||
 | 
					    <b>Audio Only</b>
 | 
				
			||||||
 | 
					    <br />
 | 
				
			||||||
 | 
					    <input class="uk-checkbox" v-model="audioOnly" @change="onChange($event)" type="checkbox" />
 | 
				
			||||||
    <h2>Instances List</h2>
 | 
					    <h2>Instances List</h2>
 | 
				
			||||||
    <table class="uk-table">
 | 
					    <table class="uk-table">
 | 
				
			||||||
        <thead>
 | 
					        <thead>
 | 
				
			||||||
| 
						 | 
					@ -80,6 +84,7 @@ export default {
 | 
				
			||||||
            skipSelfPromo: true,
 | 
					            skipSelfPromo: true,
 | 
				
			||||||
            skipMusicOffTopic: true,
 | 
					            skipMusicOffTopic: true,
 | 
				
			||||||
            autoPlayVideo: true,
 | 
					            autoPlayVideo: true,
 | 
				
			||||||
 | 
					            audioOnly: false,
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    mounted() {
 | 
					    mounted() {
 | 
				
			||||||
| 
						 | 
					@ -141,6 +146,7 @@ export default {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            this.autoPlayVideo =
 | 
					            this.autoPlayVideo =
 | 
				
			||||||
                localStorage.getItem("playerAutoPlay") === null || localStorage.getItem("playerAutoPlay") === "true";
 | 
					                localStorage.getItem("playerAutoPlay") === null || localStorage.getItem("playerAutoPlay") === "true";
 | 
				
			||||||
 | 
					            this.audioOnly = localStorage.getItem("audioOnly") === "true";
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    methods: {
 | 
					    methods: {
 | 
				
			||||||
| 
						 | 
					@ -159,6 +165,7 @@ export default {
 | 
				
			||||||
                localStorage.setItem("selectedSkip", sponsorSelected);
 | 
					                localStorage.setItem("selectedSkip", sponsorSelected);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                localStorage.setItem("playerAutoPlay", this.autoPlayVideo);
 | 
					                localStorage.setItem("playerAutoPlay", this.autoPlayVideo);
 | 
				
			||||||
 | 
					                localStorage.setItem("audioOnly", this.audioOnly);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        sslScore(url) {
 | 
					        sslScore(url) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue