Skip to content

Commit da84e29

Browse files
committed
remove autoplay settings
1 parent a37cb15 commit da84e29

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed

‎README.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,6 @@ The following options are available:
285285
| swipeClose | bool | true | Swipe up to close Tobii. |
286286
| draggable | bool | true | Use dragging and touch swiping. |
287287
| threshold | number | 100 | Touch and mouse dragging threshold (in px). |
288-
| autoplayVideo | bool | false | Videos will automatically start playing as soon as they can do so without stopping to finish loading the data. |
289-
| autoplayAudio | bool | false | Audio will automatically start playing. |
290288

291289
### Data attributes
292290

‎src/js/index.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ export default function Tobii (userOptions) {
127127
threshold: 100,
128128
rtl: false, // TODO
129129
loop: false, // TODO
130-
autoplayVideo: false,
131130
modal: false,
132131
theme: 'tobii--theme-default'
133132
}

‎src/js/types/html.js‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,14 @@ class HtmlType {
3434
VIDEO.currentTime = VIDEO.getAttribute('data-time')
3535
}
3636

37-
if (this.userSettings.autoplayVideo) {
38-
// Start playback (and loading if necessary)
39-
VIDEO.play()
40-
}
37+
// Start playback (and loading if necessary)
38+
VIDEO.play()
4139
}
4240

4341
const audio = container.querySelector('audio')
4442
if (audio) {
45-
if (this.userSettings.autoplayAudio) {
46-
// Start playback (and loading if necessary)
47-
audio.play()
48-
}
43+
// Start playback (and loading if necessary)
44+
audio.play()
4945
}
5046

5147
container.classList.add('tobii-group-' + group)

‎src/js/types/youtube.js‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ class YoutubeType {
4040
}
4141

4242
onLoad (container) {
43-
if (this.userSettings.autoplayVideo) {
44-
this.PLAYER[container.getAttribute('data-player')].playVideo()
45-
}
43+
this.PLAYER[container.getAttribute('data-player')].playVideo()
4644
}
4745

4846
onLeave (container) {

0 commit comments

Comments
 (0)