global sound option
This commit is contained in:
parent
9ca9360ffd
commit
07d5b9eeb8
@ -182,7 +182,8 @@
|
|||||||
'Fappe Tyme': [false, 'Hide posts without images. *hint* *hint*'],
|
'Fappe Tyme': [false, 'Hide posts without images. *hint* *hint*'],
|
||||||
'Werk Tyme': [false, 'Hide all post images.'],
|
'Werk Tyme': [false, 'Hide all post images.'],
|
||||||
'Autoplay': [true, 'Videos begin playing immediately when opened inline.'],
|
'Autoplay': [true, 'Videos begin playing immediately when opened inline.'],
|
||||||
'Show Controls': [true, 'Show native seek and volume controls on videos. Contract videos when dragged to the left.']
|
'Show Controls': [true, 'Show native seek and volume controls on videos. Contract videos when dragged to the left.'],
|
||||||
|
'Allow Sound': [true, 'Allow sound in inline videos.']
|
||||||
},
|
},
|
||||||
'Menu': {
|
'Menu': {
|
||||||
'Menu': [true, 'Add a drop-down menu to posts.'],
|
'Menu': [true, 'Add a drop-down menu to posts.'],
|
||||||
@ -7732,7 +7733,7 @@
|
|||||||
file = post.file;
|
file = post.file;
|
||||||
video = file.fullImage;
|
video = file.fullImage;
|
||||||
file.videoControls = [];
|
file.videoControls = [];
|
||||||
video.muted = true;
|
video.muted = !Conf['Allow Sound'];
|
||||||
if (video.controls) {
|
if (video.controls) {
|
||||||
contract = $.el('a', {
|
contract = $.el('a', {
|
||||||
textContent: 'contract',
|
textContent: 'contract',
|
||||||
@ -7907,7 +7908,7 @@
|
|||||||
if (isVideo) {
|
if (isVideo) {
|
||||||
el.loop = true;
|
el.loop = true;
|
||||||
el.controls = false;
|
el.controls = false;
|
||||||
el.muted = true;
|
el.muted = !Conf['Allow Sound'];
|
||||||
if (Conf['Autoplay']) {
|
if (Conf['Autoplay']) {
|
||||||
el.play();
|
el.play();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -158,7 +158,8 @@
|
|||||||
'Fappe Tyme': [false, 'Hide posts without images. *hint* *hint*'],
|
'Fappe Tyme': [false, 'Hide posts without images. *hint* *hint*'],
|
||||||
'Werk Tyme': [false, 'Hide all post images.'],
|
'Werk Tyme': [false, 'Hide all post images.'],
|
||||||
'Autoplay': [true, 'Videos begin playing immediately when opened inline.'],
|
'Autoplay': [true, 'Videos begin playing immediately when opened inline.'],
|
||||||
'Show Controls': [true, 'Show native seek and volume controls on videos. Contract videos when dragged to the left.']
|
'Show Controls': [true, 'Show native seek and volume controls on videos. Contract videos when dragged to the left.'],
|
||||||
|
'Allow Sound': [true, 'Allow sound in inline videos.']
|
||||||
},
|
},
|
||||||
'Menu': {
|
'Menu': {
|
||||||
'Menu': [true, 'Add a drop-down menu to posts.'],
|
'Menu': [true, 'Add a drop-down menu to posts.'],
|
||||||
@ -7751,7 +7752,7 @@
|
|||||||
file = post.file;
|
file = post.file;
|
||||||
video = file.fullImage;
|
video = file.fullImage;
|
||||||
file.videoControls = [];
|
file.videoControls = [];
|
||||||
video.muted = true;
|
video.muted = !Conf['Allow Sound'];
|
||||||
if (video.controls) {
|
if (video.controls) {
|
||||||
contract = $.el('a', {
|
contract = $.el('a', {
|
||||||
textContent: 'contract',
|
textContent: 'contract',
|
||||||
@ -7915,7 +7916,7 @@
|
|||||||
if (isVideo) {
|
if (isVideo) {
|
||||||
el.loop = true;
|
el.loop = true;
|
||||||
el.controls = false;
|
el.controls = false;
|
||||||
el.muted = true;
|
el.muted = !Conf['Allow Sound'];
|
||||||
if (Conf['Autoplay']) {
|
if (Conf['Autoplay']) {
|
||||||
el.play();
|
el.play();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -191,6 +191,10 @@ Config =
|
|||||||
true
|
true
|
||||||
'Show native seek and volume controls on videos. Contract videos when dragged to the left.'
|
'Show native seek and volume controls on videos. Contract videos when dragged to the left.'
|
||||||
]
|
]
|
||||||
|
'Allow Sound': [
|
||||||
|
true
|
||||||
|
'Allow sound in inline videos.'
|
||||||
|
]
|
||||||
|
|
||||||
'Menu':
|
'Menu':
|
||||||
'Menu': [
|
'Menu': [
|
||||||
|
|||||||
@ -144,7 +144,7 @@ ImageExpand =
|
|||||||
{file} = post
|
{file} = post
|
||||||
video = file.fullImage
|
video = file.fullImage
|
||||||
file.videoControls = []
|
file.videoControls = []
|
||||||
video.muted = true
|
video.muted = not Conf['Allow Sound']
|
||||||
if video.controls
|
if video.controls
|
||||||
# contract link in file info
|
# contract link in file info
|
||||||
contract = $.el 'a',
|
contract = $.el 'a',
|
||||||
|
|||||||
@ -26,7 +26,7 @@ ImageHover =
|
|||||||
if isVideo
|
if isVideo
|
||||||
el.loop = true
|
el.loop = true
|
||||||
el.controls = false
|
el.controls = false
|
||||||
el.muted = true
|
el.muted = not Conf['Allow Sound']
|
||||||
el.play() if Conf['Autoplay']
|
el.play() if Conf['Autoplay']
|
||||||
naturalHeight = if post.file.isVideo then 'videoHeight' else 'naturalHeight'
|
naturalHeight = if post.file.isVideo then 'videoHeight' else 'naturalHeight'
|
||||||
UI.hover
|
UI.hover
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user