Skip to content

Commit ae1c643

Browse files
committed
Update documentation
1 parent 186c1d8 commit ae1c643

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ At the moment, the following resources are recognized:
1414
4 | links finished by webm, mp4 | video | full
1515
5 | gfycat links finished with a token | video | full
1616
6 | redgifs links finished with a token | video | full
17-
7 | reddit links finished with a token | video | limited
18-
8 | reddit image galleries | image | limited
17+
7 | reddit links finished with a token | video | limited (no audio)
18+
8 | reddit image galleries | image | full
1919
9 | imgur image galleries | image | full with API client id; partial without
2020

2121
## Configuration
@@ -43,12 +43,12 @@ Imgur client id | Imgur API client id | _none_
4343
- not compatible with PHP 5
4444
- loaded content can not be reprocessed
4545
- code is still hackish
46-
- videos extracted from v.redd.it do not have audio. The audio is added by the current extension but is not linked to the video (and will never be). You can still enjoy the audio by linking it yourself with the help of the CustomJS extension. Here is a quick snippet to trigger the sound with the video (tested only in Firefox console):
46+
- videos extracted from v.redd.it do not have audio. The audio is added by the current extension but is not linked to the video (and will never be). You can still enjoy the audio by linking it yourself with the help of the CustomJS extension. Here is a quick snippet to sync the sound with the video (tested only in Firefox console):
4747
```js
4848
document.querySelectorAll('video.reddit-image').forEach(element => {
49-
element.addEventListener('play', event => {
50-
event.target.querySelector('audio').play();
51-
})
49+
element.addEventListener('play', event => { event.target.querySelector('audio').play(); })
50+
element.addEventListener('pause', event => { event.target.querySelector('audio').pause(); })
51+
element.addEventListener('seeking', event => { event.target.querySelector('audio').currentTime = event.target.currentTime })
5252
});
5353
```
54-
**Note**: This is only an example. It does not support videos loaded after the initial call. It does not support other actions on the video. If you need to make it work, you'll have to figure how. You can still provide a documentation PR if you have something worth sharing.
54+
**Note**: This is only an example. It might not supports every scenarii. If you need to make it work, you'll have to figure how. You can still provide a documentation PR if you have something worth sharing.

0 commit comments

Comments
 (0)