Add android graceful fallback to transcode & onPlaybackFailed event

This commit is contained in:
advplyr 2022-04-16 13:36:30 -05:00
parent 6cea0ba03d
commit 760d05cf1b
7 changed files with 51 additions and 13 deletions

View file

@ -23,11 +23,11 @@
<div v-if="!hasCover" class="absolute top-0 left-0 right-0 bottom-0 w-full h-full flex items-center justify-center z-10" :style="{ padding: placeholderCoverPadding + 'rem' }">
<div>
<p class="text-center font-book" style="color: rgb(247 223 187)" :style="{ fontSize: titleFontSize + 'rem' }">{{ titleCleaned }}</p>
<p class="text-center font-book truncate leading-none origin-center" style="color: rgb(247 223 187); font-size: 0.8rem" :style="{ transform: `scale(${sizeMultiplier})` }">{{ titleCleaned }}</p>
</div>
</div>
<div v-if="!hasCover" class="absolute left-0 right-0 w-full flex items-center justify-center z-10" :style="{ padding: placeholderCoverPadding + 'rem', bottom: authorBottom + 'rem' }">
<p class="text-center font-book" style="color: rgb(247 223 187); opacity: 0.75" :style="{ fontSize: authorFontSize + 'rem' }">{{ authorCleaned }}</p>
<p class="text-center font-book truncate leading-none origin-center" style="color: rgb(247 223 187); opacity: 0.75; font-size: 0.6rem" :style="{ transform: `scale(${sizeMultiplier})` }">{{ authorCleaned }}</p>
</div>
</div>
</template>
@ -123,7 +123,7 @@ export default {
return !!this.media.coverPath || this.localCover || this.downloadCover
},
sizeMultiplier() {
var baseSize = this.squareAspectRatio ? 192 : 120
var baseSize = this.squareAspectRatio ? 128 : 96
return this.width / baseSize
},
titleFontSize() {
@ -133,7 +133,8 @@ export default {
return 0.6 * this.sizeMultiplier
},
placeholderCoverPadding() {
return 0.8 * this.sizeMultiplier
if (this.sizeMultiplier < 0.5) return 0
return this.sizeMultiplier
},
authorBottom() {
return 0.75 * this.sizeMultiplier