Skip to content

Commit

Permalink
Fixed playback in background
Browse files Browse the repository at this point in the history
  • Loading branch information
chiefMarlin committed Sep 1, 2023
1 parent 985880e commit 5561622
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions pkg/firescrewServe/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,5 +296,7 @@ span.onclick = function () {
window.onclick = function (event) {
if (event.target == modal) {
modal.style.display = "none";
videoPlayer.pause(); // Pause the video
videoPlayer.currentTime = 0; // Reset video time
}
}
12 changes: 6 additions & 6 deletions pkg/objectPredict/example/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,21 +96,21 @@ func runExample() {
func main() {
args := os.Args[1:]
if len(args) < 1 {
fmt.Println("Usage: example <bench_cpu|bench_coreml|bench_cuda|run>")
fmt.Println("Usage: example <bench_cpu|bench_coreml|bench_cuda/gpu|run>")
return
}

switch args[0] {
case "bench_cpu":
bench(objectPredict.Config{Model: "yolov8s", EnableCoreMl: false, EnableCuda: false}, 5)
bench(objectPredict.Config{Model: "yolov8s", EnableCoreMl: false, EnableCuda: false}, 50)
case "bench_coreml":
bench(objectPredict.Config{Model: "yolov8s", EnableCoreMl: true, EnableCuda: false}, 5)
case "bench_cuda":
bench(objectPredict.Config{Model: "yolov8s", EnableCoreMl: false, EnableCuda: true}, 5)
bench(objectPredict.Config{Model: "yolov8s", EnableCoreMl: true, EnableCuda: false}, 50)
case "bench_cuda", "bench_gpu":
bench(objectPredict.Config{Model: "yolov8s", EnableCoreMl: false, EnableCuda: true}, 50)
case "run":
runExample()
default:
fmt.Println("Usage: example <bench_cpu|bench_coreml|bench_cuda|run>")
fmt.Println("Usage: example <bench_cpu|bench_coreml|bench_cuda/gpu|run>")
return
}
}

0 comments on commit 5561622

Please sign in to comment.