Skip to content

Commit ab3de1b

Browse files
committed
Remove autplay type
1 parent ff3c335 commit ab3de1b

File tree

8 files changed

+15
-16
lines changed

8 files changed

+15
-16
lines changed

lib/types/manager.d.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
/// <reference types="youtube" />
2-
export declare type ManagerCallbackFunction = (factory: object, uid: string) => void;
1+
export declare type ManagerCallbackFunction = (factory: any, uid: string) => void;
32
export interface Manager {
4-
factory: object | undefined;
3+
factory: any | undefined;
54
players: Array<ManagerCallbackFunction>;
65
events: Record<string, string>;
76
uid: number;
8-
registerFactory(factory: YT.Player): void;
7+
registerFactory(factory: any): void;
98
registerEvents(): void;
109
register(callback: ManagerCallbackFunction): void;
1110
runBacklog(): void;

lib/vue-youtube-iframe.cjs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) 2020-present Techassi
22
// Use of this source code is governed by a MIT-style
33
// license that can be found in the LICENSE file.
4-
// vue-youtube-iframe 1.0.3
4+
// vue-youtube-iframe 1.0.4
55
'use strict';
66

77
Object.defineProperty(exports, '__esModule', { value: true });

lib/vue-youtube-iframe.esm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) 2020-present Techassi
22
// Use of this source code is governed by a MIT-style
33
// license that can be found in the LICENSE file.
4-
// vue-youtube-iframe 1.0.3
4+
// vue-youtube-iframe 1.0.4
55
import { defineComponent, h, nextTick } from 'vue';
66

77
function createManager() {

lib/vue-youtube-iframe.global.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) 2020-present Techassi
22
// Use of this source code is governed by a MIT-style
33
// license that can be found in the LICENSE file.
4-
// vue-youtube-iframe 1.0.3
4+
// vue-youtube-iframe 1.0.4
55
var VueYoutubeIframe = (function (exports, vue) {
66
'use strict';
77

lib/vue-youtube-iframe.umd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) 2020-present Techassi
22
// Use of this source code is governed by a MIT-style
33
// license that can be found in the LICENSE file.
4-
// vue-youtube-iframe 1.0.3
4+
// vue-youtube-iframe 1.0.4
55
(function (global, factory) {
66
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
77
typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) :

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
22
"name": "@techassi/vue-youtube-iframe",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "This plugin makes it easy to integrate the YouTube Iframe API into your Vue app. This plugin is Vue V3 compatible.",
55
"main": "lib/vue-youtube-iframe.umd.js",
66
"module": "lib/vue-youtube-iframe.esm.js",
77
"scripts": {
8-
"test": "echo \"Error: no test specified\" && exit 1",
8+
"test": "echo \"Error: no test specified\" && exit 0",
99
"build": "rollup -c rollup.config.js",
1010
"format": "prettier --write \"src/**/*.ts\"",
1111
"lint": "eslint -c .eslintrc.js src/**",
1212
"prepare": "npm run build",
1313
"prepublishOnly": "npm test && npm run lint",
1414
"preversion": "npm run lint",
15-
"version": "npm run format && git add -A src",
15+
"version": "npm run format && git add -A",
1616
"postversion": "git push && git push --tags"
1717
},
1818
"repository": {

src/helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
export function seekIfAutoplay(player: YT.Player, playerVars: YT.PlayerVars): void {
77
console.log(YT);
88

9-
if (playerVars.autoplay != undefined && playerVars.autoplay == YT.AutoPlay.AutoPlay) {
9+
if (playerVars.autoplay != undefined && playerVars.autoplay == 1) {
1010
player.mute();
1111

1212
if (playerVars.start != undefined && playerVars.start != 0) {

src/manager.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/**
22
* ManagerCallbackFunction defines a callback function which is used when registering a new player
33
*/
4-
export type ManagerCallbackFunction = (factory: object, uid: string) => void;
4+
export type ManagerCallbackFunction = (factory: any, uid: string) => void;
55

66
/**
77
* Manager manages multiple player instances
88
*/
99
export interface Manager {
10-
factory: object | undefined;
10+
factory: any | undefined;
1111
players: Array<ManagerCallbackFunction>;
1212
events: Record<string, string>;
1313
uid: number;
@@ -16,7 +16,7 @@ export interface Manager {
1616
* registerFactory registers the player factory
1717
* @param factory The underlying YT factory (usually window.YT)
1818
*/
19-
registerFactory(factory: YT.Player): void;
19+
registerFactory(factory: any): void;
2020

2121
/**
2222
* registerEvents registers all player state events
@@ -45,7 +45,7 @@ export function createManager(): Manager {
4545
players: [],
4646
events: {},
4747
uid: 0,
48-
registerFactory(factory: object): void {
48+
registerFactory(factory: any): void {
4949
this.factory = factory;
5050
},
5151
registerEvents(): void {

0 commit comments

Comments
 (0)