re-add the option, comment confusing part of setAudio
This commit is contained in:
parent
5405d391c6
commit
14e6c0354d
2 changed files with 8 additions and 0 deletions
|
@ -58,6 +58,11 @@
|
||||||
{{ $t('settings.emoji_reactions_on_timeline') }}
|
{{ $t('settings.emoji_reactions_on_timeline') }}
|
||||||
</Checkbox>
|
</Checkbox>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<Checkbox v-model="virtualScrolling">
|
||||||
|
{{ $t('settings.virtual_scrolling') }}
|
||||||
|
</Checkbox>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ const VideoAttachment = {
|
||||||
this.setHasAudio(e)
|
this.setHasAudio(e)
|
||||||
if (this.loopVideo) {
|
if (this.loopVideo) {
|
||||||
this.$emit('play', { looping: true })
|
this.$emit('play', { looping: true })
|
||||||
|
return
|
||||||
}
|
}
|
||||||
this.$emit('play')
|
this.$emit('play')
|
||||||
},
|
},
|
||||||
|
@ -28,6 +29,8 @@ const VideoAttachment = {
|
||||||
},
|
},
|
||||||
setHasAudio (e) {
|
setHasAudio (e) {
|
||||||
const target = e.srcElement || e.target
|
const target = e.srcElement || e.target
|
||||||
|
// If hasAudio is true, we've already marked this video to have audio,
|
||||||
|
// videos can never lose audio so don't bother checking again.
|
||||||
if (this.hasAudio) return
|
if (this.hasAudio) return
|
||||||
if (typeof target.webkitAudioDecodedByteCount !== 'undefined') {
|
if (typeof target.webkitAudioDecodedByteCount !== 'undefined') {
|
||||||
// non-zero if video has audio track
|
// non-zero if video has audio track
|
||||||
|
|
Loading…
Add table
Reference in a new issue