Skip to content

Commit 8d83e88

Browse files
authored
Merge pull request #48 from yama-dev/v6.1.0
V6.1.0
2 parents 3540492 + 0952bd8 commit 8d83e88

File tree

8 files changed

+35
-27
lines changed

8 files changed

+35
-27
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
SLUG=js-player-module-brightcove
2-
VERSION=6.0.1
2+
VERSION=6.1.0

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ _*/
2020

2121
examples/
2222
webpack.config.js
23-
23+
.env
24+
Makefile

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ install:
2323
$(PROGRAM) install
2424

2525
bookmark:
26-
open '$(URL_DOC)/'
26+
open '$(URL_DOC)'
2727

2828
editor:
2929
$(VIM) './'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The official document is here. -> https://docs.brightcove.com/brightcove-player/
1919

2020
- npm -> [https://www.npmjs.com/package/js-player-module-brightcove](https://www.npmjs.com/package/js-player-module-brightcove)
2121

22-
- Standalone(CDN) -> [https://cdn.jsdelivr.net/gh/yama-dev/js-player-module-brightcove@v6.0.1/dist/js-player-module-brightcove.js](https://cdn.jsdelivr.net/gh/yama-dev/js-player-module-brightcove@v6.0.1/dist/js-player-module-brightcove.js)
22+
- Standalone(CDN) -> [https://cdn.jsdelivr.net/gh/yama-dev/js-player-module-brightcove@v6.1.0/dist/js-player-module-brightcove.js](https://cdn.jsdelivr.net/gh/yama-dev/js-player-module-brightcove@v6.1.0/dist/js-player-module-brightcove.js)
2323

2424
- Zip -> [yama-dev/js-player-module-brightcove](https://github.com/yama-dev/js-player-module-brightcove/releases/latest)
2525

dist/js-player-module-brightcove.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-player-module-brightcove",
3-
"version": "6.0.1",
3+
"version": "6.1.0",
44
"description": "Brightcove custom player using the Brightcove Player API.",
55
"keywords": [
66
"Brightcove",

src/js-player-module-brightcove.ts

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ export class PLAYER_MODULE_BRIGHTCOVE implements PlayerModuleBrightcoveInterface
302302
this._setInfo();
303303
this._setPoster();
304304
this.Update();
305-
if(_that.on.PlayerInit && typeof(_that.on.PlayerInit) === 'function') _that.on.PlayerInit(_that, _that.Player);
305+
if(this.on.PlayerInit && typeof(this.on.PlayerInit) === 'function') this.on.PlayerInit(_that, _that.Player);
306306
});
307307
this.Player.on('loadeddata', ()=>{
308308
if(_loadeddata_flg) return false;
@@ -311,7 +311,7 @@ export class PLAYER_MODULE_BRIGHTCOVE implements PlayerModuleBrightcoveInterface
311311
this._setInfo();
312312
this._setPoster();
313313
this.Update();
314-
if(_that.on.PlayerInit && typeof(_that.on.PlayerInit) === 'function') _that.on.PlayerInit(_that, _that.Player);
314+
if(this.on.PlayerInit && typeof(this.on.PlayerInit) === 'function') this.on.PlayerInit(_that, _that.Player);
315315
});
316316

317317
// For Timeupdate.
@@ -321,13 +321,13 @@ export class PLAYER_MODULE_BRIGHTCOVE implements PlayerModuleBrightcoveInterface
321321

322322
// For Volume change.
323323
this.Player.on('volumechange', ()=>{
324-
// 音量バーの更新(%)
324+
// update(%)
325325
let _volume = this.Player.volume();
326326

327327
DOM.setStyle( this.$.uiSeekbarVolCover, { width : (_volume * 100) + '%' } );
328328

329-
if(_that.on.VolumeChange && typeof(_that.on.VolumeChange) === 'function'){
330-
_that.on.VolumeChange({
329+
if(this.on.VolumeChange && typeof(this.on.VolumeChange) === 'function'){
330+
this.on.VolumeChange({
331331
volume: PLAYER_MODULE_BRIGHTCOVE.toFixedNumber(_volume, 3),
332332
par : PLAYER_MODULE_BRIGHTCOVE.toFixedNumber(_volume * 100, 1)
333333
});
@@ -337,17 +337,17 @@ export class PLAYER_MODULE_BRIGHTCOVE implements PlayerModuleBrightcoveInterface
337337
// For Ended movie paly.
338338
this.Player.on('ended', ()=>{
339339
this.Stop();
340-
if(_that.on.PlayerEnded && typeof(_that.on.PlayerEnded) === 'function') _that.on.PlayerEnded(_that, _that.Player);
340+
if(this.on.PlayerEnded && typeof(this.on.PlayerEnded) === 'function') this.on.PlayerEnded(_that, _that.Player);
341341
});
342342

343343
this.Player.on('play', ()=>{
344344
this.ClassOn();
345-
if(_that.on.PlayerPlay && typeof(_that.on.PlayerPlay) === 'function') _that.on.PlayerPlay(_that, _that.Player);
345+
if(this.on.PlayerPlay && typeof(this.on.PlayerPlay) === 'function') this.on.PlayerPlay(_that, _that.Player);
346346
});
347347

348348
this.Player.on('pause', ()=>{
349349
this.ClassOff();
350-
if(_that.on.PlayerPause && typeof(_that.on.PlayerPause) === 'function') _that.on.PlayerPause(_that, _that.Player);
350+
if(this.on.PlayerPause && typeof(this.on.PlayerPause) === 'function') this.on.PlayerPause(_that, _that.Player);
351351
});
352352

353353
// For Error
@@ -712,9 +712,10 @@ export class PLAYER_MODULE_BRIGHTCOVE implements PlayerModuleBrightcoveInterface
712712
* When Media change.
713713
*
714714
* id | str | media-id.
715-
* callback | function | callback function after changed.
715+
* isplay | boolean | auto start after changed media.
716+
* callback | function | callback function after changed media.
716717
*/
717-
Change(id: any, callback?: ()=>{}){
718+
Change(id: any, isplay : boolean = true, callback?: ()=>{}){
718719

719720
// 動画IDが取得出来ない場合は処理を中止
720721
if(id == '' || id == null || id == undefined) return;
@@ -735,8 +736,10 @@ export class PLAYER_MODULE_BRIGHTCOVE implements PlayerModuleBrightcoveInterface
735736
}
736737

737738
// Run playback start processing once in the click event propagation.
738-
// this.Player.muted(true);
739-
this.Player.play();
739+
if(isplay){
740+
this.Player.play();
741+
this.Player.muted(true);
742+
}
740743

741744
this.Player.catalog.getVideo(id, (error: any, video: any) => {
742745

@@ -748,12 +751,14 @@ export class PLAYER_MODULE_BRIGHTCOVE implements PlayerModuleBrightcoveInterface
748751
this._setPoster();
749752

750753
// replay after data change.
751-
setTimeout( () => {
752-
this.Player.play();
753-
// this.Player.muted(false);
754-
this.ClassOff();
755-
this.ClassOn();
756-
}, 100);
754+
if(isplay){
755+
setTimeout( () => {
756+
this.Player.muted(false);
757+
this.Player.play();
758+
this.ClassOff();
759+
this.ClassOn();
760+
}, 100);
761+
}
757762

758763
setTimeout( () => {
759764
this.PlayerChangeLoadFlg = true;
@@ -772,7 +777,9 @@ export class PLAYER_MODULE_BRIGHTCOVE implements PlayerModuleBrightcoveInterface
772777

773778

774779
} else {
775-
this.Play();
780+
if(isplay){
781+
this.Play();
782+
}
776783

777784
if(!this.on.Change && callback) this.on.Change = callback;
778785
if(this.on.Change && typeof(this.on.Change) === 'function') this.on.Change(this, this.Player);

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const config = {
5454
comments: false,
5555
},
5656
compress: {
57-
drop_console: true
57+
drop_console: false
5858
}
5959
},
6060
}),

0 commit comments

Comments
 (0)