File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,9 +172,6 @@ package {
172172
173173 private function playerPlay (url :String = null ):void {
174174 if (! mediaElement) {
175- playbackState = "PLAYING_BUFFERING" ;
176- _triggerEvent ('statechanged' );
177-
178175 if (isLive ) {
179176 urlResource = new StreamingURLResource(url , StreamType. LIVE );
180177 } else {
@@ -216,6 +213,10 @@ package {
216213
217214 addChild (mediaContainer);
218215 resize();
216+
217+ playbackState = "PLAYING_BUFFERING" ;
218+ _triggerEvent ('statechanged' );
219+ _triggerEvent ('playbackready' );
219220 } else {
220221 mediaPlayer. play ();
221222 }
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ export default class RTMP extends Flash {
8686 Mediator . on ( this . uniqueId + ':progress' , this . progress , this )
8787 Mediator . on ( this . uniqueId + ':timeupdate' , this . updateTime , this )
8888 Mediator . on ( this . uniqueId + ':statechanged' , this . checkState , this )
89+ Mediator . on ( this . uniqueId + ':playbackready' , this . playbackReady , this )
8990 Mediator . on ( this . uniqueId + ':onloaded' , this . reporLevels , this )
9091 Mediator . on ( this . uniqueId + ':levelChanging' , this . levelChanging , this )
9192 Mediator . on ( this . uniqueId + ':levelChanged' , this . levelChange , this )
@@ -167,6 +168,12 @@ export default class RTMP extends Flash {
167168 checkState ( ) {
168169 super . checkState ( )
169170
171+ if ( this . el . getState ( ) === "PLAYING" ) {
172+ this . trigger ( Events . PLAYBACK_PLAY , this . name )
173+ }
174+ }
175+
176+ playbackReady ( ) {
170177 this . isReady = true
171178 this . trigger ( Events . PLAYBACK_READY , this . name )
172179 }
You can’t perform that action at this time.
0 commit comments