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;
if (localStorage && localStorage.getItem("audioOnly")) this.player.configure("manifest.disableVideo", true);
player.load("data:application/dash+xml;charset=utf-8;base64," + btoa(dash)).then(() => {
this.video.subtitles.map(subtitle => {
player.addTextTrackAsync(

View file

@ -34,6 +34,10 @@
<b>Autoplay Video</b>
<br />
<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>
<table class="uk-table">
<thead>
@ -80,6 +84,7 @@ export default {
skipSelfPromo: true,
skipMusicOffTopic: true,
autoPlayVideo: true,
audioOnly: false,
};
},
mounted() {
@ -141,6 +146,7 @@ export default {
this.autoPlayVideo =
localStorage.getItem("playerAutoPlay") === null || localStorage.getItem("playerAutoPlay") === "true";
this.audioOnly = localStorage.getItem("audioOnly") === "true";
}
},
methods: {
@ -159,6 +165,7 @@ export default {
localStorage.setItem("selectedSkip", sponsorSelected);
localStorage.setItem("playerAutoPlay", this.autoPlayVideo);
localStorage.setItem("audioOnly", this.audioOnly);
}
},
sslScore(url) {