Skip to content

Commit 51f97c2

Browse files
authored
Merge pull request #46 from yama-dev/v6.0.0
V6.0.0
2 parents 4145002 + 6c65749 commit 51f97c2

File tree

11 files changed

+453
-266
lines changed

11 files changed

+453
-266
lines changed

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SLUG=js-player-module-brightcove
2+
VERSION=6.0.0

@types/index.d.ts

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
2+
declare function test(): string;
3+
4+
interface MyInterface{
5+
name: string
6+
init(): any
7+
}
8+
9+
interface PlayerModuleBrightcoveInterface {
10+
VERSION: any
11+
PlayerChangeLoadFlg: boolean
12+
CONFIG: {
13+
mode: string
14+
id : string
15+
16+
player_id: string
17+
player_id_wrap: string
18+
player_ui_id: string
19+
player_style_id: string
20+
21+
videoid: string | number
22+
account: string | number
23+
width: string | number
24+
height: string | number
25+
26+
player: string | number
27+
volume: number
28+
29+
playsinline: string
30+
loop: string
31+
muted: string // '' | 'muted'
32+
33+
ui_controls: string
34+
ui_autoplay: string
35+
ui_default: boolean
36+
ui_default_css: boolean
37+
38+
stop_outfocus: boolean
39+
poster: boolean
40+
41+
add_style: string
42+
classname_active_wrap: string
43+
classname_active: string
44+
}
45+
PlayerMediaInfo: any
46+
Player: any
47+
$: {
48+
playerElem : any
49+
playerElemMain : any
50+
playerElemMainWrap : any
51+
uiBtnPlay : any
52+
uiBtnStop : any
53+
uiBtnPause : any
54+
uiBtnMute : any
55+
uiBtnVolon : any
56+
uiBtnVoloff : any
57+
uiDisplayTime : any
58+
uiDisplayTimeNow : any
59+
uiDisplayTimeTotal : any
60+
uiDisplayTimeDown : any
61+
uiDisplayTimePar : any
62+
uiDisplayPoster : any
63+
uiDisplayPosterBg : any
64+
uiDisplayName : any
65+
uiSeekbarVol : any
66+
uiSeekbarVolBg : any
67+
uiSeekbarVolCover : any
68+
uiSeekbarTime : any
69+
uiSeekbarTimeBg : any
70+
uiSeekbarTimeCover : any
71+
uiBtnChange : any
72+
uiBtnChangeDisplayTime : any
73+
uiBtnChangeDisplayTimeDown : any
74+
uiBtnDataId : any
75+
}
76+
playerHtml: any
77+
playerCss: any
78+
playerScriptCode: any
79+
playerUiHtml: string
80+
playerCssOption: string
81+
on: any
82+
PlayerJson?: any
83+
PlayerChangeSeekingFlg: boolean
84+
85+
state: {
86+
poster: string
87+
}
88+
}
89+
90+
declare function videojs(id: string): void
91+
92+
interface Window {
93+
PLAYER_MODULE_ALL_PLATLIST: any
94+
}
95+

Makefile

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
include .env
2+
3+
VIM := mvim
4+
5+
PROGRAM := npm
6+
RM := rm -rf
7+
MK := mkdir
8+
CP := cp
9+
ZIP := zip
10+
11+
ZIP_FOLDER := _v$(VERSION)
12+
13+
ENV_DEV := NODE_ENV=development
14+
ENV_PROD := NODE_ENV=production
15+
16+
URL_DOC := https://ja.apis.support.brightcove.com/
17+
18+
all: bookmark editor serve
19+
20+
build: clean prod
21+
22+
install:
23+
$(PROGRAM) install
24+
25+
bookmark:
26+
open '$(URL_DOC)/'
27+
28+
editor:
29+
$(VIM) './'
30+
31+
clean:
32+
$(RM) dist
33+
34+
serve:
35+
$(ENV_DEV) $(PROGRAM) run dev
36+
37+
prod:
38+
$(ENV_PROD) $(PROGRAM) run prod
39+
40+
zip:
41+
$(RM) $(ZIP_FOLDER)
42+
$(MK) $(ZIP_FOLDER)
43+
$(CP) dist/js-player-module-brightcove.js examples/index.html $(ZIP_FOLDER)/
44+
sed -i "" "s/..\/dist\//.\//g" "$(ZIP_FOLDER)/index.html"
45+
$(ZIP) $(ZIP_FOLDER)/$(VERSION).zip -r $(ZIP_FOLDER)/*
46+
47+
.PHONY: all build bookmark editor serve clean prod zip install

dist/js-player-module-brightcove.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-player-module-brightcove",
3-
"version": "5.4.2",
3+
"version": "6.0.0",
44
"description": "Brightcove custom player using the Brightcove Player API.",
55
"keywords": [
66
"Brightcove",
@@ -17,10 +17,10 @@
1717
"scripts": {
1818
"start": "npm install && npm run dev",
1919
"dev": "npm-run-all -p webpack:develop server",
20-
"prod": "npm-run-all -p webpack:build server",
20+
"prod": "npm-run-all -p webpack:build",
2121
"server": "browser-sync start --server ./ --directory ./examples --files **/*.css **/*.js **/*.html",
22-
"webpack:develop": "webpack --progress --colors --watch",
23-
"webpack:build": "webpack --mode=production --progress --colors"
22+
"webpack:develop": "webpack --progress --color --watch",
23+
"webpack:build": "webpack --mode=production --progress --color"
2424
},
2525
"repository": {
2626
"type": "git",
@@ -31,59 +31,15 @@
3131
"email": "[email protected]"
3232
},
3333
"devDependencies": {
34-
"@babel/cli": "^7.2.3",
35-
"@babel/core": "^7.2.2",
36-
"@babel/plugin-transform-object-assign": "^7.2.0",
37-
"@babel/preset-env": "^7.3.1",
38-
"babel-loader": "^8.0.5",
39-
"browser-sync": "^2.23.6",
40-
"eslint": "^5.12.0",
41-
"eslint-loader": "^2.1.1",
42-
"mocha": "^5.2.0",
43-
"npm-run-all": "^4.1.2",
44-
"terser-webpack-plugin": "^4.1.0",
45-
"webpack": "^4.28.4",
46-
"webpack-cli": "^3.2.1"
34+
"browser-sync": "^2.27.4",
35+
"npm-run-all": "^4.1.5",
36+
"ts-loader": "^9.2.3",
37+
"typescript": "^4.3.5",
38+
"webpack": "^5.44.0",
39+
"webpack-cli": "^4.7.2"
4740
},
4841
"dependencies": {
49-
"@yama-dev/js-dom": "^0.1.0",
42+
"@yama-dev/js-dom": "^0.1.1",
5043
"@yama-dev/js-parse-module": "^0.2.1"
51-
},
52-
"eslintConfig": {
53-
"env": {
54-
"browser": true,
55-
"commonjs": true,
56-
"es6": true,
57-
"jquery": true,
58-
"node": true
59-
},
60-
"extends": "eslint:recommended",
61-
"parserOptions": {
62-
"ecmaFeatures": {
63-
"jsx": true
64-
},
65-
"ecmaVersion": 2018,
66-
"sourceType": "module"
67-
},
68-
"plugins": [],
69-
"rules": {
70-
"indent": [
71-
"error",
72-
2,
73-
{
74-
"outerIIFEBody": 0
75-
}
76-
],
77-
"quotes": [
78-
"error",
79-
"single"
80-
],
81-
"semi": [
82-
"error",
83-
"always"
84-
],
85-
"no-console": "warn",
86-
"no-unused-vars": "warn"
87-
}
8844
}
8945
}

src/common.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
export let viewPlayerScriptcode = '//players.brightcove.net/{{ account }}/{{ player }}_default/index.min.js';
3+

0 commit comments

Comments
 (0)