@@ -14,7 +14,7 @@ export class PLAYER_MODULE_BRIGHTCOVE {
14
14
constructor ( options = { } ) {
15
15
16
16
// Set Version.
17
- this . VERSION = '2.0.12 ' ;
17
+ this . VERSION = '2.1.0 ' ;
18
18
19
19
// Use for discrimination by URL.
20
20
this . currentUrl = location . href ;
@@ -427,6 +427,9 @@ export class PLAYER_MODULE_BRIGHTCOVE {
427
427
}
428
428
}
429
429
430
+ /**
431
+ * When dragging a seek bar(time).
432
+ */
430
433
EventSeekbarTime ( ) {
431
434
let _that = this ;
432
435
@@ -598,20 +601,26 @@ export class PLAYER_MODULE_BRIGHTCOVE {
598
601
let _that = this ;
599
602
if ( this . $uiBtnPlay !== null && this . $uiBtnPlay . length !== 0 ) {
600
603
if ( this . Player . paused ( ) ) {
601
- // 停止状態の場合
604
+ // When the player is stopped.
605
+
602
606
this . Player . play ( ) ;
607
+
608
+ // Add className Play-Button.
603
609
if ( this . $uiBtnPlay !== null && this . $uiBtnPlay . length !== 0 ) {
604
610
for ( var i = 0 ; i < this . $uiBtnPlay . length ; ++ i ) {
605
611
this . $uiBtnPlay [ i ] . addClass ( 'active' ) ;
606
612
}
607
613
}
614
+
615
+ // Add className Pause-Button.
608
616
if ( this . $uiBtnPause !== null && this . $uiBtnPause . length !== 0 ) {
609
617
for ( var i = 0 ; i < this . $uiBtnPause . length ; ++ i ) {
610
618
this . $uiBtnPause [ i ] . addClass ( 'active' ) ;
611
619
}
612
620
}
613
621
} else {
614
- // 再生状態の場合
622
+ // When the player is playing.
623
+
615
624
_that . Pause ( ) ;
616
625
if ( this . $uiBtnPlay !== null && this . $uiBtnPlay . length !== 0 ) {
617
626
for ( var i = 0 ; i < this . $uiBtnPlay . length ; ++ i ) {
@@ -634,21 +643,21 @@ export class PLAYER_MODULE_BRIGHTCOVE {
634
643
this . Player . pause ( ) ;
635
644
this . Player . currentTime ( 0 ) ;
636
645
637
- // 再生中のPLAYボタンのhtml-classを削除
646
+ // Remove className Play-Button.
638
647
if ( this . $uiBtnPlay !== null && this . $uiBtnPlay . length !== 0 ) {
639
648
for ( var i = 0 ; i < this . $uiBtnPlay . length ; ++ i ) {
640
649
this . $uiBtnPlay [ i ] . removeClass ( 'active' ) ;
641
650
}
642
651
}
643
652
644
- // 再生中のPAUSEボタンのhtml-classを削除
653
+ // Remove className Pause-Button.
645
654
if ( this . $uiBtnPause !== null && this . $uiBtnPause . length !== 0 ) {
646
655
for ( var i = 0 ; i < this . $uiBtnPause . length ; ++ i ) {
647
656
this . $uiBtnPause [ i ] . removeClass ( 'active' ) ;
648
657
}
649
658
}
650
659
651
- // メディア変更ボタンのhtml-classを削除
660
+ // Remove className MediaChange-Button.
652
661
let clickElemAll = Array . prototype . slice . call ( document . querySelectorAll ( '[data-PMB-id]' ) ) ;
653
662
if ( clickElemAll ) {
654
663
clickElemAll . forEach ( function ( elem , i ) {
@@ -664,21 +673,21 @@ export class PLAYER_MODULE_BRIGHTCOVE {
664
673
665
674
this . Player . pause ( ) ;
666
675
667
- // 再生中のPLAYボタンのhtml-classを削除
676
+ // Remove className Play-Button.
668
677
if ( this . $uiBtnPlay !== null && this . $uiBtnPlay . length !== 0 ) {
669
678
for ( var i = 0 ; i < this . $uiBtnPlay . length ; ++ i ) {
670
679
this . $uiBtnPlay [ i ] . removeClass ( 'active' ) ;
671
680
}
672
681
}
673
682
674
- // 再生中のPAUSEボタンのhtml-classを削除
683
+ // Remove className Pause-Button.
675
684
if ( this . $uiBtnPause !== null && this . $uiBtnPause . length !== 0 ) {
676
685
for ( var i = 0 ; i < this . $uiBtnPause . length ; ++ i ) {
677
686
this . $uiBtnPause [ i ] . removeClass ( 'active' ) ;
678
687
}
679
688
}
680
689
681
- // メディア変更ボタンのhtml-classを削除
690
+ // Remove className MediaChange-Button.
682
691
let clickElemAll = Array . prototype . slice . call ( document . querySelectorAll ( '[data-PMB-id]' ) ) ;
683
692
if ( clickElemAll ) {
684
693
clickElemAll . forEach ( function ( elem , i ) {
@@ -690,6 +699,12 @@ export class PLAYER_MODULE_BRIGHTCOVE {
690
699
if ( this . on . Pause && typeof ( this . on . Pause ) === 'function' ) this . on . Pause ( ) ;
691
700
}
692
701
702
+ /**
703
+ * When Media change.
704
+ *
705
+ * id | str | media-id.
706
+ * callback | function | callback function after changed.
707
+ */
693
708
Change ( id , callback ) {
694
709
let _that = this ;
695
710
0 commit comments