Commit edeeeb99 authored by Xiaowu Zhang's avatar Xiaowu Zhang

add mp4 type check when set time

parent b27d7472
...@@ -240,9 +240,11 @@ ...@@ -240,9 +240,11 @@
}), loopEventListener(bar_context, "click", false, function(event) { }), loopEventListener(bar_context, "click", false, function(event) {
g.audio.currentTime = getTime(bar_context, event.clientX); g.audio.currentTime = getTime(bar_context, event.clientX);
bar_context.value = g.audio.currentTime; bar_context.value = g.audio.currentTime;
g.video.currentTime = g.audio.currentTime;
g.audio.play(); g.audio.play();
g.video.play(); if (g.type === "video/mp4") {
g.video.currentTime = g.audio.currentTime;
g.video.play();
}
command_context.innerHTML = "stop"; command_context.innerHTML = "stop";
}), loopEventListener(bar_context, "mousemove", false, function(event) { }), loopEventListener(bar_context, "mousemove", false, function(event) {
var time = getTime(bar_context, event.clientX); var time = getTime(bar_context, event.clientX);
......
...@@ -325,9 +325,11 @@ ...@@ -325,9 +325,11 @@
loopEventListener(bar_context, "click", false, function (event) { loopEventListener(bar_context, "click", false, function (event) {
g.audio.currentTime = getTime(bar_context, event.clientX); g.audio.currentTime = getTime(bar_context, event.clientX);
bar_context.value = g.audio.currentTime; bar_context.value = g.audio.currentTime;
g.video.currentTime = g.audio.currentTime;
g.audio.play(); g.audio.play();
g.video.play(); if (g.type === "video/mp4") {
g.video.currentTime = g.audio.currentTime;
g.video.play();
}
command_context.innerHTML = "stop"; command_context.innerHTML = "stop";
}), }),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment