Add back the Audio Only mode.

This commit is contained in:
FireMasterK 2021-06-08 02:05:45 +05:30
parent a2f95c9d9e
commit b8ac67b7af
No known key found for this signature in database
GPG key ID: 8DFF5DD33E93DB58
2 changed files with 9 additions and 0 deletions

View file

@ -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(

View file

@ -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) {