File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,7 @@ Player.prototype.getFileExtension = function(filePath) {
180180Player . prototype . setSource = function ( url ) {
181181 this . ui . ready = false
182182 this . _extension = this . getFileExtension ( url )
183+ this . _storedSrc = ""
183184 if ( url && this . _xhr && ( this . _extension === ".m3u8" || this . _extension === ".m3u" ) ) {
184185 this . _xhr . open ( 'GET' , url ) ;
185186 this . _xhr . send ( )
@@ -188,10 +189,15 @@ Player.prototype.setSource = function(url) {
188189 var source = url
189190 if ( this . ui . startPosition )
190191 source += "#t=" + this . ui . startPosition
192+
191193 this . element . dom . src = source
192194}
193195
194196Player . prototype . play = function ( ) {
197+ if ( this . _storedSrc ) {
198+ this . element . dom . src = this . _storedSrc
199+ this . _storedSrc = ""
200+ }
195201 this . element . dom . play ( )
196202}
197203
@@ -200,8 +206,11 @@ Player.prototype.pause = function() {
200206}
201207
202208Player . prototype . stop = function ( ) {
203- //where is no 'stop' method in html5 video player just pause instead
204- this . pause ( )
209+ this . _storedSrc = this . element . dom . src
210+ this . element . dom . pause ( )
211+ this . element . dom . src = ""
212+ this . element . dom . load ( )
213+ this . ui . ready = false
205214}
206215
207216Player . prototype . seek = function ( delta ) {
You can’t perform that action at this time.
0 commit comments