Skip to content

Commit e3c7abb

Browse files
author
dularion
committed
add timeout to toggleControls to prevent code executing twice
1 parent 4e46054 commit e3c7abb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/scripts/directives/streamaVideoPlayer.directive.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ angular.module('streama.videoPlayer').directive('streamaVideoPlayer', [
224224
}
225225

226226
function toggleControls(){
227-
$scope.isMobileControlsVisible = !$scope.isMobileControlsVisible;
227+
$timeout(function () {
228+
$scope.isMobileControlsVisible = !$scope.isMobileControlsVisible;
229+
});
228230
}
229231

230232
function clickVideo() {

0 commit comments

Comments
 (0)