From efda2ca3f5dcae8ff40ae5b935d5451bf7427dae Mon Sep 17 00:00:00 2001 From: Techywarrior Date: Wed, 3 Apr 2013 15:55:28 -0700 Subject: [PATCH] fixed bug when you play a video and one is already playing --- dashboard-ui/scripts/mediaplayer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 66c22730b..5d2c48741 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -169,6 +169,8 @@ }, playVideo: function (items, startPosition) { + //stop/kill videoJS + if (MediaPlayer.mediaElement) MediaPlayer.stop(); var item = items[0]; @@ -248,7 +250,7 @@ localStorage.setItem("volume", (this).volume()); }); - (this).addEvent("play", MediaPlayer.updateProgress); + (this).addEvent("play", MediaPlayer.updateProgress); ApiClient.reportPlaybackStart(Dashboard.getCurrentUserId(), item.Id); });