Various Live stream improvements, streamed directly without local proxy, attempt to reduce errors and stutters.

This commit is contained in:
Brahim Hadriche committed 2026-10-07 17:59:50 -04:00
1 parent 2dbd5840c0
commit 2bdcd0007d
27 files changed
+1360 -946

No files matched your search

@@ -24,6 +24,7 @@ namespace Tests
content.addField("playletStreamUrls", "array", false)
content.addField("playletStreamUrlIndex", "integer", false)
content.addField("playletStreamSource", "string", false)
content.addField("videoLoadId", "string", false)
content.setFields({
videoId: "vid1"
backend: "playlet"
@@ -31,6 +32,7 @@ namespace Tests
playletStreamUrls: urls
playletStreamUrlIndex: 0
playletStreamSource: "adaptiveFormats"
videoLoadId: "load1"
})
m.top.content = content
end function
@@ -107,7 +109,7 @@ namespace Tests
m.State(VideoState.Error)
report = m.global.telemetry.LogEvent
m.assertEqual(report.level, "warning", "retried: not shown to the viewer")
m.assertTrue(report.message.InStr("Url: http://a") > 0 and report.message.InStr("Url index: 0") > 0, "got: " + report.message)
m.assertTrue(report.message.InStr("Url: http://a") > 0 and report.message.InStr("Url index: 0") > 0, `got: ${report.message}`)
m.State(VideoState.Playing)
summary = m.Close()
m.assertEqual(summary.error_count, 1)
@@ -115,6 +117,17 @@ namespace Tests
m.assertEqual(summary.outcome, "closed")
end function
@it("the video load id joins the error report to the summary")
function _()
m.SetContent(["http://stream"])
m.HttpError()
m.State(VideoState.Error)
report = m.global.telemetry.LogEvent
m.assertTrue(report.message.InStr("video_load_id: load1") > 0, `got: ${report.message}`)
summary = m.Close()
m.assertEqual(summary.video_load_id, "load1")
end function
@it("an error with no retry left ends in error")
function _()
m.SetContent(["http://stream"])
@@ -115,13 +115,12 @@ function TestSetControl(value as string) as void
m.top.control = value
end function
' TestSetLive — flip the loaded content to a rewindable live stream with a known edge: what
' TestSetLive — flip the loaded content to a live stream with a known edge: what
' OnVideoContentJobDone does for real live content (SetContent + DVR window + bar fields), minus the job.
function TestSetLive(edgeMs as integer) as void
m.transport.SetContent(true, 2000, false)
m.transport.SetLiveDvrWindow(4 * 3600 * 1000) ' 4h window -> rewindable
m.transport.SetLiveDvrWindow(4 * 3600 * 1000)
m.trickPlayBar.isLive = true
m.trickPlayBar.canRewind = m.transport.CanRewindLive()
m.transport.OnLiveEdge(edgeMs)
m.transport.OnPosition(edgeMs)
end function