Skip to content

Commit d7c8284

Browse files
committedFeb 9, 2016
API+Video: no more .unLoad methode
1 parent 4ebb6bb commit d7c8284

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed
 

‎api/video.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
var
66
that,
7-
oldSource,
87
isStopped = true,
98
isLoaded = false,
109
isLoading = false,
@@ -16,18 +15,11 @@ var
1615
api.video = that = {
1716

1817
// Manipulating the src="" attribute.
19-
unLoad: function() {
20-
isLoaded = false;
21-
jqVideo.attr( "src", "" );
22-
if ( api.playlist.selectedFile().mediaType === "video" ) {
23-
jqVideoThumb.attr( "src", "" );
24-
}
25-
return that;
26-
},
2718
load: function( url ) {
28-
oldSource = url;
2919
jqVideo.attr( "src", url );
30-
jqVideoThumb.attr( "src", api.playlist.selectedFile().mediaType === "video" ? url : "" );
20+
if ( api.playlist.selectedFile().mediaType === "video" ) {
21+
jqVideoThumb.attr( "src", url );
22+
}
3123
isLoading = true;
3224
return that;
3325
},
@@ -75,8 +67,12 @@ api.video = that = {
7567
},
7668
stop: function() {
7769
if ( !isStopped ) {
70+
that
71+
.pause()
72+
.currentTime( 0 )
73+
;
7874
isStopped = true;
79-
that.unLoad( "" );
75+
isLoaded = false;
8076
jqVideo.trigger( "stop" );
8177
}
8278
return that;

0 commit comments

Comments
 (0)
Please sign in to comment.