File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -66,13 +66,16 @@ var StreamManager = (function (_super) {
6666 this . __scheduleRestart ( ) ;
6767 } ;
6868 StreamManager . prototype . __onAudioEnded = function ( e ) {
69- this . debug ( 'EOS' ) ;
69+ this . warn ( 'EOS' ) ;
7070 this . __stopPlayback ( ) ;
7171 this . __scheduleRestart ( ) ;
7272 } ;
7373 StreamManager . prototype . __onAudioWaiting = function ( e ) {
7474 this . warn ( 'Waiting' ) ;
7575 } ;
76+ StreamManager . prototype . __onAudioPlaying = function ( e ) {
77+ this . debug ( 'Playing' ) ;
78+ } ;
7679 StreamManager . prototype . __onAudioStalled = function ( e ) {
7780 this . warn ( 'Stalled' ) ;
7881 } ;
@@ -112,8 +115,8 @@ var StreamManager = (function (_super) {
112115 this . __audio . onwaiting = this . __onAudioWaiting . bind ( this ) ;
113116 this . __audio . onstalled = this . __onAudioStalled . bind ( this ) ;
114117 this . __audio . onsuspend = this . __onAudioSuspended . bind ( this ) ;
118+ this . __audio . onplaying = this . __onAudioPlaying . bind ( this ) ;
115119 this . __audio . play ( ) ;
116- this . _trigger ( 'playback-started' ) ;
117120 } ;
118121 StreamManager . prototype . __stopPlayback = function ( ) {
119122 this . debug ( 'Stopping playback' ) ;
@@ -123,6 +126,7 @@ var StreamManager = (function (_super) {
123126 this . __audio . onwaiting = undefined ;
124127 this . __audio . onstalled = undefined ;
125128 this . __audio . onsuspend = undefined ;
129+ this . __audio . onplaying = undefined ;
126130 if ( this . __audio . readyState == 4 ) {
127131 this . __audio . pause ( ) ;
128132 }
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export class StreamManager extends Base {
8686
8787
8888 private __onAudioEnded ( e ) : void {
89- this . debug ( 'EOS' ) ;
89+ this . warn ( 'EOS' ) ;
9090 this . __stopPlayback ( ) ;
9191 this . __scheduleRestart ( ) ;
9292 }
@@ -97,6 +97,11 @@ export class StreamManager extends Base {
9797 }
9898
9999
100+ private __onAudioPlaying ( e ) : void {
101+ this . debug ( 'Playing' ) ;
102+ }
103+
104+
100105 private __onAudioStalled ( e ) : void {
101106 this . warn ( 'Stalled' ) ;
102107 }
@@ -146,9 +151,8 @@ export class StreamManager extends Base {
146151 this . __audio . onwaiting = this . __onAudioWaiting . bind ( this ) ;
147152 this . __audio . onstalled = this . __onAudioStalled . bind ( this ) ;
148153 this . __audio . onsuspend = this . __onAudioSuspended . bind ( this ) ;
154+ this . __audio . onplaying = this . __onAudioPlaying . bind ( this ) ;
149155 this . __audio . play ( ) ;
150-
151- this . _trigger ( 'playback-started' ) ;
152156 }
153157
154158
@@ -160,6 +164,7 @@ export class StreamManager extends Base {
160164 this . __audio . onwaiting = undefined ;
161165 this . __audio . onstalled = undefined ;
162166 this . __audio . onsuspend = undefined ;
167+ this . __audio . onplaying = undefined ;
163168 if ( this . __audio . readyState == 4 ) {
164169 this . __audio . pause ( ) ;
165170 }
You can’t perform that action at this time.
0 commit comments