Skip to content

Commit 92110d9

Browse files
committed
Add .gitattributes
1 parent 62908d3 commit 92110d9

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lib/* linguist-vendored

src/helper.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
export function skipIfAutoplay(player: YT.Player, playerVars: YT.PlayerVars) {
1+
/**
2+
* seekIfAutoplay seeks to the provided timestamp if autoplay is enabled
3+
* @param player The player instance
4+
* @param playerVars The player vars
5+
*/
6+
export function seekIfAutoplay(player: YT.Player, playerVars: YT.PlayerVars) {
27
if (playerVars.autoplay != undefined && playerVars.autoplay == YT.AutoPlay.AutoPlay) {
38
player.mute();
49

src/player.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineComponent, h, nextTick } from 'vue';
22

3-
import { skipIfAutoplay } from './helper';
3+
import { seekIfAutoplay } from './helper';
44
import { manager } from './manager';
55

66
const player = defineComponent({
@@ -185,7 +185,7 @@ const player = defineComponent({
185185
host,
186186
events: {
187187
onReady: (event: YT.PlayerEvent) => {
188-
skipIfAutoplay(event.target, playerParameters);
188+
seekIfAutoplay(event.target, playerParameters);
189189
this.$emit('ready', event);
190190
},
191191
onStateChange: (event: YT.OnStateChangeEvent) => {

0 commit comments

Comments
 (0)