Skip to content

Commit

Permalink
Merge pull request #1316 from canalplus/misc/more-readable-buffer-graph
Browse files Browse the repository at this point in the history
Debug: update buffer graph maximum size so it becomes more readable for lengthy contents
  • Loading branch information
peaBerberian authored Nov 22, 2023
2 parents da7efb6 + d3ccc85 commit ff213e1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/core/api/debug/buffer_graph.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Representation } from "../../../manifest";
import { IBufferedChunk } from "../../segment_buffers";

const BUFFER_WIDTH_IN_SECONDS = 10000;
const BUFFER_WIDTH_IN_SECONDS = 30 * 60;

const COLORS = [
"#2ab7ca",
Expand Down Expand Up @@ -95,10 +95,7 @@ export default class SegmentBufferGraph {
let minimumPosition;
let maximumPosition;
if (maximumPoint - minimumPoint > BUFFER_WIDTH_IN_SECONDS) {
if (currentTime === undefined) {
minimumPosition = minimumPoint;
maximumPosition = maximumPoint;
} else if (maximumPoint - currentTime < BUFFER_WIDTH_IN_SECONDS / 2) {
if (maximumPoint - currentTime < BUFFER_WIDTH_IN_SECONDS / 2) {
maximumPosition = maximumPoint;
minimumPosition = maximumPoint - BUFFER_WIDTH_IN_SECONDS;
} else if (currentTime - minimumPoint < BUFFER_WIDTH_IN_SECONDS / 2) {
Expand Down

0 comments on commit ff213e1

Please sign in to comment.