Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLS issues with dynamic -> static manifest #4431

Closed
fredrik-telia opened this issue Aug 23, 2022 · 10 comments · Fixed by #4483 or #4424
Closed

HLS issues with dynamic -> static manifest #4431

fredrik-telia opened this issue Aug 23, 2022 · 10 comments · Fixed by #4483 or #4424
Labels
component: HLS The issue involves Apple's HLS manifest format status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@fredrik-telia
Copy link
Contributor

fredrik-telia commented Aug 23, 2022

Have you read the FAQ and checked for duplicate open issues?
Yes

What version of Shaka Player are you using?
4.2.0

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from main?
Yes

Are you using the demo app or your own custom app?
Both

If custom app, can you reproduce the issue using our demo app?
Yes

What browser and OS are you using?
Chrome, macOS

For embedded devices (smart TVs, etc.), what model and firmware version are you using?
n/a

What are the manifest and license server URIs?

Will provide manifest link in separate email

What configuration are you using? What is the output of player.getConfiguration()?

player config
{
  "drm": {
    "retryParameters": {
      "maxAttempts": 2,
      "baseDelay": 1000,
      "backoffFactor": 2,
      "fuzzFactor": 0.5,
      "timeout": 30000,
      "stallTimeout": 5000,
      "connectionTimeout": 10000
    },
    "servers": {},
    "clearKeys": {},
    "advanced": {},
    "delayLicenseRequestUntilPlayed": false,
    "logLicenseExchange": false,
    "updateExpirationTime": 1
  },
  "manifest": {
    "retryParameters": {
      "maxAttempts": 2,
      "baseDelay": 1000,
      "backoffFactor": 2,
      "fuzzFactor": 0.5,
      "timeout": 30000,
      "stallTimeout": 5000,
      "connectionTimeout": 10000
    },
    "availabilityWindowOverride": null,
    "disableAudio": false,
    "disableVideo": false,
    "disableText": false,
    "disableThumbnails": false,
    "defaultPresentationDelay": 0,
    "dash": {
      "clockSyncUri": "",
      "ignoreDrmInfo": false,
      "disableXlinkProcessing": false,
      "xlinkFailGracefully": false,
      "ignoreMinBufferTime": false,
      "autoCorrectDrift": true,
      "initialSegmentLimit": 1000,
      "ignoreSuggestedPresentationDelay": false,
      "ignoreEmptyAdaptationSet": false,
      "ignoreMaxSegmentDuration": false,
      "keySystemsByURI": {
        "urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b": "org.w3.clearkey",
        "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed": "com.widevine.alpha",
        "urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95": "com.microsoft.playready",
        "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95": "com.microsoft.playready",
        "urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb": "com.adobe.primetime"
      }
    },
    "hls": {
      "ignoreTextStreamFailures": false,
      "useFullSegmentsForStartTime": false
    }
  },
  "streaming": {
    "retryParameters": {
      "maxAttempts": 2,
      "baseDelay": 1000,
      "backoffFactor": 2,
      "fuzzFactor": 0.5,
      "timeout": 30000,
      "stallTimeout": 5000,
      "connectionTimeout": 10000
    },
    "rebufferingGoal": 2,
    "bufferingGoal": 10,
    "bufferBehind": 30,
    "ignoreTextStreamFailures": false,
    "alwaysStreamText": false,
    "startAtSegmentBoundary": false,
    "gapDetectionThreshold": 0.1,
    "smallGapLimit": 0.5,
    "jumpLargeGaps": false,
    "durationBackoff": 1,
    "forceTransmuxTS": false,
    "safeSeekOffset": 5,
    "stallEnabled": true,
    "stallThreshold": 1,
    "stallSkip": 0.1,
    "useNativeHlsOnSafari": true,
    "inaccurateManifestTolerance": 2,
    "lowLatencyMode": false,
    "autoLowLatencyMode": false,
    "forceHTTPS": false,
    "preferNativeHls": false
  },
  "offline": {
    "usePersistentLicense": true
  },
  "abr": {
    "enabled": true,
    "useNetworkInformation": true,
    "defaultBandwidthEstimate": 1000000,
    "switchInterval": 8,
    "bandwidthUpgradeTarget": 0.85,
    "bandwidthDowngradeTarget": 0.95,
    "restrictions": {
      "minWidth": 0,
      "maxWidth": null,
      "minHeight": 0,
      "maxHeight": null,
      "minPixels": 0,
      "maxPixels": null,
      "minFrameRate": 0,
      "maxFrameRate": null,
      "minBandwidth": 0,
      "maxBandwidth": null
    }
  },
  "preferredAudioLanguage": "",
  "preferredTextLanguage": "",
  "preferredVariantRole": "",
  "preferredTextRole": "",
  "preferredAudioChannelCount": 2,
  "preferForcedSubs": false,
  "restrictions": {
    "minWidth": 0,
    "maxWidth": null,
    "minHeight": 0,
    "maxHeight": null,
    "minPixels": 0,
    "maxPixels": null,
    "minFrameRate": 0,
    "maxFrameRate": null,
    "minBandwidth": 0,
    "maxBandwidth": null
  },
  "playRangeStart": 0,
  "playRangeEnd": null,
  "useMediaCapabilities": false
}

What did you do?

Play a manifest that is dynamic, but will turn static in the future (this is accomplished by using start and stop query parameters )
I use setInterval(() => console.log( player.seekRange()), 1000) to see the values of seekRange().end update

What did you expect to happen?
The content should play all the way to the end.
seekRange().end should increment until the content turns static, and then stay at the max value

What actually happened?

When the content turns static, seekRange.end() will revert back to what it was when the stream started, this could be observed by using setInterval(() => console.log( player.seekRange()), 1000) in the console.

Here's an example scenario:

Program A starts at 10:00 and ends at 11:00
I start the program from the beginning at wall clock time 10:40, the live point in the progress bar is now at 40 minutes, seekRange().end is at 40 minutes.

I'm watching the program, and the live point (seekRange().end) increases as expected.

At 11:00 the recording ends, and the manifest goes static, the playhead is at 20 minutes. The live point will now "snap back" to what it was when I started playing, so back to 40 minutes.

When the playhead later on reaches this point, the buffer will drop to 0 and the stream will stall.

image

In trying to understand this problem, I've changed the Math.min... in getSegmentAvailabilityEnd() in presentation_timeline.js to be a Math.max... and that will allow me to play the content all the way through.

Maybe this means that this.maxSegmentEndTime_ is not updated correctly when HLS manifests go from dynamic to static?

@fredrik-telia fredrik-telia added the type: bug Something isn't working correctly label Aug 23, 2022
@github-actions github-actions bot added this to the v4.3 milestone Aug 23, 2022
@avelad avelad added the component: HLS The issue involves Apple's HLS manifest format label Aug 25, 2022
@joeyparrish
Copy link
Member

Yes, it appears that maxSegmentEndTime_ is the value that's breaking the seek range. But it doesn't appear to get broken in the transition from dynamic to static. Instead, it seems it is not being updated at all.

@joeyparrish
Copy link
Member

It appears that the behavior of maxSegmentEndTime_ changed in releases 3.2.2, 3.1.4, and 3.0.15, in commit 9220c1f. Even before that change, the seek range was not "sane", though, so there may be more than one layer to this problem.

@joeyparrish
Copy link
Member

I think I've found three changes needed to fix this:

  1. Update maxSegmentEndTime_ by restoring missing calls to notifySegments
  2. Wait to change the presentation type until we have ENDLIST on all playlists, not just the first one, otherwise we miss the last segment of audio, for example
  3. Update the MSE duration at exactly the same time we change the presentation type, or else there's a loophole where the UI shows an insane end time until the final segments are buffered for all types

I have this working locally with your test content (thank you for sending that!) but I still need to clean up the change, update tests, and write a few new ones.

@joeyparrish
Copy link
Member

There's one caveat so far. The test content you sent us privately does something odd, and this results in an odd UI. With the parameters I'm giving for start and end times (now - 30s, now + 30s), when the ENDLIST tags are appended to the playlists, there is one more video segment than audio segment. This results in a weird UI. For example, the duration may be 1:01 (the max of what was appended), but playback stops at 0:57 (the min of what was appended, the max of what can be played).

The state and the rest of the UI is still correct (ended state, replay button showing). It also seems like a quirk of the content simulator rather than a realistic issue, so unless someone objects, I'm going to call that good enough.

@martinstark
Copy link
Contributor

martinstark commented Sep 13, 2022

@joeyparrish thanks for looking into this.

We're aware of this bug and it's being worked on by the provider, we have it on some of our content and it causes the issues you describe. I don't think it should affect the maxSegmentEndTime_ issue, though?

(sidenote: it would be great if Shaka threw when that type of a/v segment mismatch causes a stall, it took us quite some time to discover it)

@joeyparrish
Copy link
Member

With the fixes I'm polishing up right now, there is no stall. I just wanted to point out that I'm aware of the weird UI, and that I believe it's caused by the off-by-one issue in the content itself, so I'm not putting any extra effort into that.

joeyparrish added a commit to joeyparrish/shaka-player that referenced this issue Sep 13, 2022
 - Keep maxSegmentEndTime_ updated in PresentationTimeline by calling
   notifySegments on each HLS playlist update, so that the seek range
   doesn't revert to the original playlist size when it becomes
   static.
 - Wait to change the presentation type to VOD until after _all_
   active playlists have an ENDLIST tag, to avoid missing the final
   segments in one type or the other.
 - Stop updating the playlists after transition to VOD.
 - Update the MSE duration at exactly the same time as we transition
   to VOD, to avoid a loophole where the UI knows it's VOD, but
   doesn't have any way to get the correct duration.  Previously, this
   state would persist until the final segments were appended.

Closes shaka-project#4431
joeyparrish added a commit that referenced this issue Sep 13, 2022
fix: Fix HLS dynamic to static transition

 - Keep maxSegmentEndTime_ updated in PresentationTimeline by calling
   notifySegments on each HLS playlist update, so that the seek range
   doesn't revert to the original playlist size when it becomes
   static.
 - Wait to change the presentation type to VOD until after _all_
   active playlists have an ENDLIST tag, to avoid missing the final
   segments in one type or the other.
 - Stop updating the playlists after transition to VOD.
 - Update the MSE duration at exactly the same time as we transition
   to VOD, to avoid a loophole where the UI knows it's VOD, but
   doesn't have any way to get the correct duration.  Previously, this
   state would persist until the final segments were appended.

Closes #4431
@fredrik-telia
Copy link
Contributor Author

fredrik-telia commented Sep 15, 2022

I'm having issues when testing from main

When the ongoing recording ends and I get the EXT-X-ENDLIST, I get this error in the console with debugging turned on:
Error might have been due to local changes, newer debug logs with unmodified mainbelow

image

The buffer drops to zero and playback stalls.

edit: I'll do some more tests and see if I can get more debug logging

debug log that didn't get an error, but playback just stalls
[Debug] (video:7) – "buffer behind too large:" – "presentationTime=708.2871865326168" – "bufferedBehind=32.4471865326168" – "bufferBehind=30" – "overflow=2.447186532616797" (bundle.js, line 145463)
[Debug] (video:7) – "evicted 2.447186532616797 seconds" (bundle.js, line 145468)
[Debug] (video:7) – "appending media segment at" – 1663316804.639983 (bundle.js, line 145377)
[Debug] (video:7) – "finished fetch and append" – "[{\"start\":679.68,\"end\":771.84}]" (bundle.js, line 145221)
[Debug] (audio:1) – "fetchAndAppend_:" – "presentationTime=708.4424873239583" – "reference.startTime=768.0199999809272" – "reference.endTime=771.8599999809272" (bundle.js, line 145156)
[Debug] (audio:1) – "buffer behind too large:" – "presentationTime=708.4424873239583" – "bufferedBehind=33.86248732395825" – "bufferBehind=30" – "overflow=3.8624873239582485" (bundle.js, line 145463)
[Debug] (audio:1) – "evicted 3.8624873239582485 seconds" (bundle.js, line 145468)
[Debug] (audio:1) – "appending media segment at" – 1663316804.659983 (bundle.js, line 145377)
[Debug] (audio:1) – "finished fetch and append" – "[{\"start\":678.932,\"end\":771.86}]" (bundle.js, line 145221)
[Info] Updating manifest... (bundle.js, line 156293)
[Debug] notifySegments: – "maxSegmentDuration=4.800000000000182" (bundle.js, line 143627, x6)
[Debug] (video:7) – "fetchAndAppend_:" – "presentationTime=711.8497863653511" – "reference.startTime=771.8400000000007" – "reference.endTime=775.6800000000007" (bundle.js, line 145156)
[Debug] (video:7) – "buffer behind too large:" – "presentationTime=711.8497863653511" – "bufferedBehind=32.169786365351115" – "bufferBehind=30" – "overflow=2.169786365351115" (bundle.js, line 145463)
[Debug] (video:7) – "evicted 2.169786365351115 seconds" (bundle.js, line 145468)
[Debug] (video:7) – "appending media segment at" – 1663316808.4799829 (bundle.js, line 145377)
[Debug] (video:7) – "finished fetch and append" – "[{\"start\":683.52,\"end\":775.68}]" (bundle.js, line 145221)
[Debug] (audio:1) – "fetchAndAppend_:" – "presentationTime=712.0093663653652" – "reference.startTime=771.8599999809272" – "reference.endTime=775.6999999809273" (bundle.js, line 145156)
[Debug] (audio:1) – "buffer behind too large:" – "presentationTime=712.0093663653652" – "bufferedBehind=33.07736636536515" – "bufferBehind=30" – "overflow=3.077366365365151" (bundle.js, line 145463)
[Debug] (audio:1) – "evicted 3.077366365365151 seconds" (bundle.js, line 145468)
[Debug] (audio:1) – "appending media segment at" – 1663316808.4999828 (bundle.js, line 145377)
[Debug] (audio:1) – "finished fetch and append" – "[{\"start\":682.26,\"end\":775.7}]" (bundle.js, line 145221)
[Debug] (video:7) – "fetchAndAppend_:" – "presentationTime=715.9160767814892" – "reference.startTime=775.6800000000007" – "reference.endTime=779.5200000000008" (bundle.js, line 145156)
[Log] Calling switch_(), bandwidth=249223 kbps (bundle.js, line 138650)
[Log] switch_ (bundle.js, line 149230)
[Debug] (video:7) – "buffer behind too large:" – "presentationTime=715.9160767814892" – "bufferedBehind=32.39607678148923" – "bufferBehind=30" – "overflow=2.396076781489228" (bundle.js, line 145463)
[Debug] (video:7) – "evicted 2.396076781489228 seconds" (bundle.js, line 145468)
[Debug] (video:7) – "appending media segment at" – 1663316812.3199828 (bundle.js, line 145377)
[Debug] (video:7) – "finished fetch and append" – "[{\"start\":687.36,\"end\":779.52}]" (bundle.js, line 145221)
[Debug] (audio:1) – "fetchAndAppend_:" – "presentationTime=716.0406965311754" – "reference.startTime=775.6999999809273" – "reference.endTime=779.5399999809273" (bundle.js, line 145156)
[Debug] (audio:1) – "buffer behind too large:" – "presentationTime=716.0406965311754" – "bufferedBehind=33.78069653117541" – "bufferBehind=30" – "overflow=3.7806965311754084" (bundle.js, line 145463)
[Debug] (audio:1) – "evicted 3.7806965311754084 seconds" (bundle.js, line 145468)
[Debug] (audio:1) – "appending media segment at" – 1663316812.3399827 (bundle.js, line 145377)
[Debug] (audio:1) – "finished fetch and append" – "[{\"start\":686.1,\"end\":779.54}]" (bundle.js, line 145221)
[Info] Updating manifest... (bundle.js, line 156293)
[Debug] notifySegments: – "maxSegmentDuration=4.800000000000182" (bundle.js, line 143627, x6)
[Debug] (audio:1) – "fetchAndAppend_:" – "presentationTime=719.6218069073799" – "reference.startTime=779.5399999809273" – "reference.endTime=783.3799999809273" (bundle.js, line 145156)
[Debug] (audio:1) – "buffer behind too large:" – "presentationTime=719.6218069073799" – "bufferedBehind=33.52180690737987" – "bufferBehind=30" – "overflow=3.521806907379869" (bundle.js, line 145463)
[Debug] (audio:1) – "evicted 3.521806907379869 seconds" (bundle.js, line 145468)
[Debug] (audio:1) – "appending media segment at" – 1663316816.1799827 (bundle.js, line 145377)
[Debug] (audio:1) – "finished fetch and append" – "[{\"start\":689.94,\"end\":783.38}]" (bundle.js, line 145221)
[Debug] (video:7) – "fetchAndAppend_:" – "presentationTime=720.015614698319" – "reference.startTime=779.5200000000008" – "reference.endTime=783.3600000000008" (bundle.js, line 145156)
[Log] Calling switch_(), bandwidth=249494 kbps (bundle.js, line 138650)
[Log] switch_ (bundle.js, line 149230)
[Debug] (video:7) – "buffer behind too large:" – "presentationTime=720.015614698319" – "bufferedBehind=32.65561469831903" – "bufferBehind=30" – "overflow=2.6556146983190274" (bundle.js, line 145463)
[Debug] (video:7) – "evicted 2.6556146983190274 seconds" (bundle.js, line 145468)
[Debug] (video:7) – "appending media segment at" – 1663316816.1599827 (bundle.js, line 145377)
[Debug] (video:7) – "finished fetch and append" – "[{\"start\":691.2,\"end\":783.36}]" (bundle.js, line 145221)
[Debug] (video:7) – "fetchAndAppend_:" – "presentationTime=723.5864781570739" – "reference.startTime=783.3600000000008" – "reference.endTime=787.2000000000008" (bundle.js, line 145156)
[Debug] (video:7) – "buffer behind too large:" – "presentationTime=723.5864781570739" – "bufferedBehind=32.38647815707384" – "bufferBehind=30" – "overflow=2.3864781570738387" (bundle.js, line 145463)
[Debug] (video:7) – "evicted 2.3864781570738387 seconds" (bundle.js, line 145468)
[Debug] (video:7) – "appending media segment at" – 1663316819.9999826 (bundle.js, line 145377)
[Debug] (audio:1) – "fetchAndAppend_:" – "presentationTime=723.649536948756" – "reference.startTime=783.3799999809273" – "reference.endTime=787.2199999809274" (bundle.js, line 145156)
[Debug] (video:7) – "finished fetch and append" – "[{\"start\":695.04,\"end\":787.2}]" (bundle.js, line 145221)
[Debug] (audio:1) – "buffer behind too large:" – "presentationTime=723.649536948756" – "bufferedBehind=33.709536948755954" – "bufferBehind=30" – "overflow=3.7095369487559537" (bundle.js, line 145463)
[Debug] (audio:1) – "evicted 3.7095369487559537 seconds" (bundle.js, line 145468)
[Debug] (audio:1) – "appending media segment at" – 1663316820.0199826 (bundle.js, line 145377)
[Debug] (audio:1) – "finished fetch and append" – "[{\"start\":693.78,\"end\":787.22}]" (bundle.js, line 145221)
[Info] Updating manifest... (bundle.js, line 156293)
[Debug] notifySegments: – "maxSegmentDuration=4.800000000000182" (bundle.js, line 143627, x6)
[Debug] (video:7) – "fetchAndAppend_:" – "presentationTime=727.2119237824456" – "reference.startTime=787.2000000000008" – "reference.endTime=791.0400000000009" (bundle.js, line 145156)
[Log] Calling switch_(), bandwidth=246209 kbps (bundle.js, line 138650)
[Log] switch_ (bundle.js, line 149230)
[Debug] (video:7) – "buffer behind too large:" – "presentationTime=727.2119237824456" – "bufferedBehind=32.171923782445674" – "bufferBehind=30" – "overflow=2.171923782445674" (bundle.js, line 145463)
[Debug] (audio:1) – "fetchAndAppend_:" – "presentationTime=727.7127103653814" – "reference.startTime=787.2199999809274" – "reference.endTime=791.0599999809274" (bundle.js, line 145156)
[Debug] (audio:1) – "buffer behind too large:" – "presentationTime=727.7127103653814" – "bufferedBehind=33.93271036538147" – "bufferBehind=30" – "overflow=3.9327103653814675" (bundle.js, line 145463)
[Debug] Changing effective playback rate to – 0 (bundle.js, line 144449)
[Debug] Changing Player state to – "buffering" (bundle.js, line 146813)
Another log, same issue, buffer drops to zero and playback stalls
[Info] Updating manifest... (bundle.js, line 156293)
[Debug] notifySegments: – "maxSegmentDuration=3.8400000000001455" (bundle.js, line 143627, x6)
[Debug] (video:2) – "fetchAndAppend_:" – "presentationTime=496.8402176916982" – "reference.startTime=556.7999999999989" – "reference.endTime=560.639999999999" (bundle.js, line 145156)
[Log] Calling switch_(), bandwidth=205477 kbps (bundle.js, line 138650)
[Log] switch_ (bundle.js, line 149230)
[Debug] (video:2) – "buffer behind too large:" – "presentationTime=496.8402176916982" – "bufferedBehind=32.200217691698185" – "bufferBehind=30" – "overflow=2.2002176916981853" (bundle.js, line 145463)
[Debug] (video:2) – "evicted 2.2002176916981853 seconds" (bundle.js, line 145468)
[Debug] (video:2) – "appending media segment at" – 1663317825.7409875 (bundle.js, line 145377)
[Debug] (video:2) – "finished fetch and append" – "[{\"start\":468.48,\"end\":560.64}]" (bundle.js, line 145221)
[Debug] (audio:1) – "fetchAndAppend_:" – "presentationTime=497.2941162744343" – "reference.startTime=556.8199999809254" – "reference.endTime=560.6599999809255" (bundle.js, line 145156)
[Debug] (audio:1) – "buffer behind too large:" – "presentationTime=497.2941162744343" – "bufferedBehind=33.91411627443432" – "bufferBehind=30" – "overflow=3.9141162744343205" (bundle.js, line 145463)
[Debug] (audio:1) – "evicted 3.9141162744343205 seconds" (bundle.js, line 145468)
[Debug] (audio:1) – "appending media segment at" – 1663317825.7609875 (bundle.js, line 145377)
[Debug] (audio:1) – "finished fetch and append" – "[{\"start\":467.732,\"end\":560.66}]" (bundle.js, line 145221)
[Debug] (audio:1) – "fetchAndAppend_:" – "presentationTime=500.81912923406384" – "reference.startTime=560.6599999809255" – "reference.endTime=564.4999999809255" (bundle.js, line 145156)
[Debug] (audio:1) – "buffer behind too large:" – "presentationTime=500.81912923406384" – "bufferedBehind=33.08712923406381" – "bufferBehind=30" – "overflow=3.0871292340638092" (bundle.js, line 145463)
[Debug] (audio:1) – "evicted 3.0871292340638092 seconds" (bundle.js, line 145468)
[Debug] (audio:1) – "appending media segment at" – 1663317829.6009874 (bundle.js, line 145377)
[Debug] (audio:1) – "finished fetch and append" – "[{\"start\":471.06,\"end\":564.5}]" (bundle.js, line 145221)
[Debug] (video:2) – "fetchAndAppend_:" – "presentationTime=500.93936977475533" – "reference.startTime=560.639999999999" – "reference.endTime=564.479999999999" (bundle.js, line 145156)
[Log] Calling switch_(), bandwidth=203856 kbps (bundle.js, line 138650)
[Log] switch_ (bundle.js, line 149230)
[Debug] (video:2) – "buffer behind too large:" – "presentationTime=500.93936977475533" – "bufferedBehind=32.45936977475532" – "bufferBehind=30" – "overflow=2.4593697747553165" (bundle.js, line 145463)
[Debug] (video:2) – "evicted 2.4593697747553165 seconds" (bundle.js, line 145468)
[Debug] (video:2) – "appending media segment at" – 1663317829.5809875 (bundle.js, line 145377)
[Debug] (video:2) – "finished fetch and append" – "[{\"start\":472.32,\"end\":564.48}]" (bundle.js, line 145221)
[Debug] (video:2) – "fetchAndAppend_:" – "presentationTime=504.59233719282713" – "reference.startTime=564.479999999999" – "reference.endTime=568.319999999999" (bundle.js, line 145156)
[Debug] (video:2) – "buffer behind too large:" – "presentationTime=504.59233719282713" – "bufferedBehind=32.27233719282714" – "bufferBehind=30" – "overflow=2.2723371928271376" (bundle.js, line 145463)
[Debug] (video:2) – "evicted 2.2723371928271376 seconds" (bundle.js, line 145468)
[Debug] (video:2) – "appending media segment at" – 1663317833.4209874 (bundle.js, line 145377)
[Debug] (video:2) – "finished fetch and append" – "[{\"start\":476.16,\"end\":568.32}]" (bundle.js, line 145221)
[Debug] (audio:1) – "fetchAndAppend_:" – "presentationTime=504.8430585251238" – "reference.startTime=564.4999999809255" – "reference.endTime=568.3399999809255" (bundle.js, line 145156)
[Debug] (audio:1) – "buffer behind too large:" – "presentationTime=504.8430585251238" – "bufferedBehind=33.783058525123806" – "bufferBehind=30" – "overflow=3.7830585251238062" (bundle.js, line 145463)
[Debug] (audio:1) – "evicted 3.7830585251238062 seconds" (bundle.js, line 145468)
[Debug] (audio:1) – "appending media segment at" – 1663317833.4409873 (bundle.js, line 145377)
[Debug] (audio:1) – "finished fetch and append" – "[{\"start\":474.9,\"end\":568.34}]" (bundle.js, line 145221)
[Info] Updating manifest... (bundle.js, line 156293)
[Debug] notifySegments: – "maxSegmentDuration=3.8400000000001455" (bundle.js, line 143627, x6)
[Debug] (audio:1) – "fetchAndAppend_:" – "presentationTime=508.3644968173513" – "reference.startTime=568.3399999809255" – "reference.endTime=572.1799999809256" (bundle.js, line 145156)
[Log] Calling switch_(), bandwidth=205150 kbps (bundle.js, line 138650)
[Log] switch_ (bundle.js, line 149230)
[Debug] (audio:1) – "buffer behind too large:" – "presentationTime=508.3644968173513" – "bufferedBehind=33.464496817351346" – "bufferBehind=30" – "overflow=3.464496817351346" (bundle.js, line 145463)
[Debug] (video:2) – "fetchAndAppend_:" – "presentationTime=508.65447998391375" – "reference.startTime=568.319999999999" – "reference.endTime=572.1599999999991" (bundle.js, line 145156)
[Debug] (video:2) – "buffer behind too large:" – "presentationTime=508.65447998391375" – "bufferedBehind=32.49447998391372" – "bufferBehind=30" – "overflow=2.4944799839137204" (bundle.js, line 145463)
> $("video").currentTime
< 562.1145970242811
[Debug] Changing effective playback rate to – 0 (bundle.js, line 144449)
[Debug] Changing Player state to – "buffering" (bundle.js, line 146813)
> $("video").duration
< 3928.3399999809785
Another log with V2-logging
[Info] Updating manifest... (bundle.js, line 156293)
[Debug] notifySegments: – "maxSegmentDuration=3.8400000000001455" (bundle.js, line 143627, x6)
[Debug] (audio:1) – "timeNeeded=503.0599999809251" (bundle.js, line 145092)
[Debug] (audio:1) – "update_:" – "presentationTime=440.5255072865258" – "bufferedAhead=62.53449271347421" (bundle.js, line 145094)
[Debug] (audio:1) – "buffering goal met" (bundle.js, line 145098)
[Debug] (audio:1) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (video:8) – "timeNeeded=503.0399999999986" (bundle.js, line 145092)
[Debug] (video:8) – "update_:" – "presentationTime=440.6958360788794" – "bufferedAhead=62.34416392112064" (bundle.js, line 145094)
[Debug] (video:8) – "buffering goal met" (bundle.js, line 145098)
[Debug] (video:8) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (audio:1) – "timeNeeded=503.0599999809251" (bundle.js, line 145092)
[Debug] (audio:1) – "update_:" – "presentationTime=441.02636553698835" – "bufferedAhead=62.03363446301165" (bundle.js, line 145094)
[Debug] (audio:1) – "buffering goal met" (bundle.js, line 145098)
[Debug] (audio:1) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (video:8) – "timeNeeded=503.0399999999986" (bundle.js, line 145092)
[Debug] (video:8) – "update_:" – "presentationTime=441.19663770348876" – "bufferedAhead=61.84336229651126" (bundle.js, line 145094)
[Debug] (video:8) – "buffering goal met" (bundle.js, line 145098)
[Debug] (video:8) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (audio:1) – "timeNeeded=503.0599999809251" (bundle.js, line 145092)
[Debug] (audio:1) – "update_:" – "presentationTime=441.52716766170835" – "bufferedAhead=61.532832338291655" (bundle.js, line 145094)
[Debug] (audio:1) – "buffering goal met" (bundle.js, line 145098)
[Debug] (audio:1) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (video:8) – "timeNeeded=503.0399999999986" (bundle.js, line 145092)
[Debug] (video:8) – "update_:" – "presentationTime=441.69692920439314" – "bufferedAhead=61.34307079560688" (bundle.js, line 145094)
[Debug] (video:8) – "buffering goal met" (bundle.js, line 145098)
[Debug] (video:8) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (audio:1) – "timeNeeded=503.0599999809251" (bundle.js, line 145092)
[Debug] (audio:1) – "update_:" – "presentationTime=442.0280618703976" – "bufferedAhead=61.031938129602395" (bundle.js, line 145094)
[Debug] (audio:1) – "buffering goal met" (bundle.js, line 145098)
[Debug] (audio:1) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (video:8) – "timeNeeded=503.0399999999986" (bundle.js, line 145092)
[Debug] (video:8) – "update_:" – "presentationTime=442.19743007881283" – "bufferedAhead=60.84256992118719" (bundle.js, line 145094)
[Debug] (video:8) – "buffering goal met" (bundle.js, line 145098)
[Debug] (video:8) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (audio:1) – "timeNeeded=503.0599999809251" (bundle.js, line 145092)
[Debug] (audio:1) – "update_:" – "presentationTime=442.52894874535934" – "bufferedAhead=60.53105125464066" (bundle.js, line 145094)
[Debug] (audio:1) – "buffering goal met" (bundle.js, line 145098)
[Debug] (audio:1) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (video:8) – "timeNeeded=503.0399999999986" (bundle.js, line 145092)
[Debug] (video:8) – "update_:" – "presentationTime=442.6979687861094" – "bufferedAhead=60.34203121389061" (bundle.js, line 145094)
[Debug] (video:8) – "buffering goal met" (bundle.js, line 145098)
[Debug] (video:8) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (audio:1) – "timeNeeded=503.0599999809251" (bundle.js, line 145092)
[Debug] (audio:1) – "update_:" – "presentationTime=443.02941678635614" – "bufferedAhead=60.030583213643865" (bundle.js, line 145094)
[Debug] (audio:1) – "buffering goal met" (bundle.js, line 145098)
[Debug] (audio:1) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (video:8) – "timeNeeded=503.0399999999986" (bundle.js, line 145092)
[Debug] (video:8) – "update_:" – "presentationTime=443.1985054124834" – "bufferedAhead=59.84149458751659" (bundle.js, line 145094)
[Debug] (video:8) – "fetchAndAppend_:" – "presentationTime=443.1985054124834" – "reference.startTime=503.0399999999986" – "reference.endTime=506.8799999999986" (bundle.js, line 145156)
[Debug] (video:8) – "fetching segment" (bundle.js, line 145167)
[Debug] fetching: reference= – {startTime: 503.0399999999986, endTime: 506.8799999999986, trueEndTime: 506.8799999999986, …} (bundle.js, line 145488)
{startTime: 503.0399999999986, endTime: 506.8799999999986, trueEndTime: 506.8799999999986, getUrisInner: function, startByte: 0, …}Object
[Debug] Segment downloaded: – "deltaTimeMs=130" – "numBytes=569804" – "lastTimeChosenMs=1663328099250" – "enabled=true" (bundle.js, line 138597)
[Debug] Suggesting Streams... (bundle.js, line 138631)
[Debug] Still within switch interval... (bundle.js, line 138642)
[Debug] Segment downloaded: – "deltaTimeMs=124" – "numBytes=1609244" – "lastTimeChosenMs=1663328099250" – "enabled=true" (bundle.js, line 138597)
[Debug] Suggesting Streams... (bundle.js, line 138631)
[Debug] Still within switch interval... (bundle.js, line 138642)
[Debug] Segment downloaded: – "deltaTimeMs=2" – "numBytes=525550" – "lastTimeChosenMs=1663328099250" – "enabled=true" (bundle.js, line 138597)
[Debug] Suggesting Streams... (bundle.js, line 138631)
[Debug] Still within switch interval... (bundle.js, line 138642)
[Debug] (video:8) – "checking buffer length" (bundle.js, line 145456)
[Debug] (video:8) – "buffer behind too large:" – "presentationTime=443.1985054124834" – "bufferedBehind=32.31850541248343" – "bufferBehind=30" – "overflow=2.3185054124834323" (bundle.js, line 145463)
[Debug] (video:8) – "evicted 2.3185054124834323 seconds" (bundle.js, line 145468)
[Debug] (video:8) – "appending media segment at" – 1663326501.6389887 (bundle.js, line 145377)
[Debug] (video:8) – "appended media segment" (bundle.js, line 145379)
[Debug] (video:8) – "advancing to next segment" – {startTime: 506.8799999999986, endTime: 510.71999999999855, trueEndTime: 510.71999999999855, …} (bundle.js, line 145216)
{startTime: 506.8799999999986, endTime: 510.71999999999855, trueEndTime: 510.71999999999855, getUrisInner: function, startByte: 0, …}Object
[Debug] (video:8) – "finished fetch and append" – "[{\"start\":414.72,\"end\":506.88}]" (bundle.js, line 145221)
[Debug] (video:8) – "updating in 0 seconds" (bundle.js, line 145523)
[Debug] (video:8) – "timeNeeded=506.8799999999986" (bundle.js, line 145092)
[Debug] (video:8) – "update_:" – "presentationTime=443.46134220424136" – "bufferedAhead=63.418657795758634" (bundle.js, line 145094)
[Debug] (video:8) – "buffering goal met" (bundle.js, line 145098)
[Debug] (video:8) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (audio:1) – "timeNeeded=503.0599999809251" (bundle.js, line 145092)
[Debug] (audio:1) – "update_:" – "presentationTime=443.5303540375273" – "bufferedAhead=59.52964596247273" (bundle.js, line 145094)
[Debug] (audio:1) – "fetchAndAppend_:" – "presentationTime=443.5303540375273" – "reference.startTime=503.0599999809251" – "reference.endTime=506.8999999809251" (bundle.js, line 145156)
[Debug] (audio:1) – "fetching segment" (bundle.js, line 145167)
[Debug] fetching: reference= – {startTime: 503.0599999809251, endTime: 506.8999999809251, trueEndTime: 506.8999999809251, …} (bundle.js, line 145488)
{startTime: 503.0599999809251, endTime: 506.8999999809251, trueEndTime: 506.8999999809251, getUrisInner: function, startByte: 0, …}Object
[Debug] Segment downloaded: – "deltaTimeMs=13" – "numBytes=77101" – "lastTimeChosenMs=1663328099250" – "enabled=true" (bundle.js, line 138597)
[Debug] Suggesting Streams... (bundle.js, line 138631)
[Debug] Bandwidth ranges: – "0.548" – "0.609" – "1.412" (bundle.js, line 138580)
[Debug] Bandwidth ranges: – "1.059" – "1.177" – "2.868" (bundle.js, line 138580)
[Debug] Bandwidth ranges: – "2.151" – "2.390" – "5.824" (bundle.js, line 138580)
[Debug] Bandwidth ranges: – "4.368" – "4.853" – "8.144" (bundle.js, line 138580)
[Debug] Bandwidth ranges: – "6.108" – "6.787" – "Infinity" (bundle.js, line 138580)
[Log] Calling switch_(), bandwidth=203812 kbps (bundle.js, line 138650)
[Log] switch_ (bundle.js, line 149230)
[Debug] (audio:1) – "checking buffer length" (bundle.js, line 145456)
[Debug] (audio:1) – "buffer behind too large:" – "presentationTime=443.5303540375273" – "bufferedBehind=33.91035403752727" – "bufferBehind=30" – "overflow=3.91035403752727" (bundle.js, line 145463)
[Debug] (audio:1) – "evicted 3.91035403752727 seconds" (bundle.js, line 145468)
[Debug] (audio:1) – "appending media segment at" – 1663326501.6589887 (bundle.js, line 145377)
[Debug] (audio:1) – "appended media segment" (bundle.js, line 145379)
[Debug] (audio:1) – "advancing to next segment" – {startTime: 506.8999999809251, endTime: 510.73999998092506, trueEndTime: 510.73999998092506, …} (bundle.js, line 145216)
{startTime: 506.8999999809251, endTime: 510.73999998092506, trueEndTime: 510.73999998092506, getUrisInner: function, startByte: 0, …}Object
[Debug] (audio:1) – "finished fetch and append" – "[{\"start\":413.972,\"end\":506.9}]" (bundle.js, line 145221)
[Debug] (audio:1) – "updating in 0 seconds" (bundle.js, line 145523)
[Debug] (audio:1) – "timeNeeded=506.8999999809251" (bundle.js, line 145092)
[Debug] (audio:1) – "update_:" – "presentationTime=443.54562491259566" – "bufferedAhead=63.35437508740432" (bundle.js, line 145094)
[Debug] (audio:1) – "buffering goal met" (bundle.js, line 145098)
[Debug] (audio:1) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (video:8) – "timeNeeded=506.8799999999986" (bundle.js, line 145092)
[Debug] (video:8) – "update_:" – "presentationTime=443.962339620467" – "bufferedAhead=62.917660379533004" (bundle.js, line 145094)
[Debug] (video:8) – "buffering goal met" (bundle.js, line 145098)
[Debug] (video:8) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (audio:1) – "timeNeeded=506.8999999809251" (bundle.js, line 145092)
[Debug] (audio:1) – "update_:" – "presentationTime=444.046694996395" – "bufferedAhead=62.85330500360499" (bundle.js, line 145094)
[Debug] (audio:1) – "buffering goal met" (bundle.js, line 145098)
[Debug] (audio:1) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (video:8) – "timeNeeded=506.8799999999986" (bundle.js, line 145092)
[Debug] (video:8) – "update_:" – "presentationTime=444.463507870381" – "bufferedAhead=62.41649212961897" (bundle.js, line 145094)
[Debug] (video:8) – "buffering goal met" (bundle.js, line 145098)
[Debug] (video:8) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Info] Updating manifest... (bundle.js, line 156293)
[Debug] notifySegments: – "maxSegmentDuration=3.8400000000001455" (bundle.js, line 143627, x6)
[Debug] (audio:1) – "timeNeeded=506.8999999809251" (bundle.js, line 145092)
[Debug] (audio:1) – "update_:" – "presentationTime=444.54704820358313" – "bufferedAhead=62.352951796416846" (bundle.js, line 145094)
[Debug] (audio:1) – "buffering goal met" (bundle.js, line 145098)
[Debug] (audio:1) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (video:8) – "timeNeeded=506.8799999999986" (bundle.js, line 145092)
[Debug] (video:8) – "update_:" – "presentationTime=444.9642320782813" – "bufferedAhead=61.91576792171867" (bundle.js, line 145094)
[Debug] (video:8) – "buffering goal met" (bundle.js, line 145098)
[Debug] (video:8) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (audio:1) – "timeNeeded=506.8999999809251" (bundle.js, line 145092)
[Debug] (audio:1) – "update_:" – "presentationTime=445.04746849508314" – "bufferedAhead=61.85253150491684" (bundle.js, line 145094)
[Debug] (audio:1) – "buffering goal met" (bundle.js, line 145098)
[Debug] (audio:1) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (video:8) – "timeNeeded=506.8799999999986" (bundle.js, line 145092)
[Debug] (video:8) – "update_:" – "presentationTime=445.4655104946594" – "bufferedAhead=61.41448950534061" (bundle.js, line 145094)
[Debug] (video:8) – "buffering goal met" (bundle.js, line 145098)
[Debug] (video:8) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (audio:1) – "timeNeeded=506.8999999809251" (bundle.js, line 145092)
[Debug] (audio:1) – "update_:" – "presentationTime=445.54818691165116" – "bufferedAhead=61.35181308834882" (bundle.js, line 145094)
[Debug] (audio:1) – "buffering goal met" (bundle.js, line 145098)
[Debug] (audio:1) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (video:8) – "timeNeeded=506.8799999999986" (bundle.js, line 145092)
[Debug] (video:8) – "update_:" – "presentationTime=445.96595087009786" – "bufferedAhead=60.91404912990214" (bundle.js, line 145094)
[Debug] (video:8) – "buffering goal met" (bundle.js, line 145098)
[Debug] (video:8) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (audio:1) – "timeNeeded=506.8999999809251" (bundle.js, line 145092)
[Debug] (audio:1) – "update_:" – "presentationTime=446.0489977867373" – "bufferedAhead=60.85100221326269" (bundle.js, line 145094)
[Debug] (audio:1) – "buffering goal met" (bundle.js, line 145098)
[Debug] (audio:1) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (video:8) – "timeNeeded=506.8799999999986" (bundle.js, line 145092)
[Debug] (video:8) – "update_:" – "presentationTime=446.4667262453415" – "bufferedAhead=60.41327375465852" (bundle.js, line 145094)
[Debug] (video:8) – "buffering goal met" (bundle.js, line 145098)
[Debug] (video:8) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (audio:1) – "timeNeeded=506.8999999809251" (bundle.js, line 145092)
[Debug] (audio:1) – "update_:" – "presentationTime=446.54946874522756" – "bufferedAhead=60.35053125477242" (bundle.js, line 145094)
[Debug] (audio:1) – "buffering goal met" (bundle.js, line 145098)
[Debug] (audio:1) – "updating in 0.5 seconds" (bundle.js, line 145523)
[Debug] (video:8) – "timeNeeded=506.8799999999986" (bundle.js, line 145092)
[Debug] (video:8) – "update_:" – "presentationTime=446.9670710782819" – "bufferedAhead=59.912928921718105" (bundle.js, line 145094)
[Debug] (video:8) – "fetchAndAppend_:" – "presentationTime=446.9670710782819" – "reference.startTime=506.8799999999986" – "reference.endTime=510.71999999999855" (bundle.js, line 145156)
[Debug] (video:8) – "fetching segment" (bundle.js, line 145167)
[Debug] fetching: reference= – {startTime: 506.8799999999986, endTime: 510.71999999999855, trueEndTime: 510.71999999999855, …} (bundle.js, line 145488)
{startTime: 506.8799999999986, endTime: 510.71999999999855, trueEndTime: 510.71999999999855, getUrisInner: function, startByte: 0, …}Object
[Debug] Segment downloaded: – "deltaTimeMs=59" – "numBytes=3013802" – "lastTimeChosenMs=1663328103273" – "enabled=true" (bundle.js, line 138597)
[Debug] Suggesting Streams... (bundle.js, line 138631)
[Debug] Still within switch interval... (bundle.js, line 138642)
[Debug] (video:8) – "checking buffer length" (bundle.js, line 145456)
[Debug] (video:8) – "buffer behind too large:" – "presentationTime=446.9670710782819" – "bufferedBehind=32.24707107828186" – "bufferBehind=30" – "overflow=2.247071078281863" (bundle.js, line 145463)
[Debug] (audio:1) – "timeNeeded=506.8999999809251" (bundle.js, line 145092)
[Debug] (audio:1) – "update_:" – "presentationTime=447.05050545328487" – "bufferedAhead=59.84949454671511" (bundle.js, line 145094)
[Debug] (audio:1) – "fetchAndAppend_:" – "presentationTime=447.05050545328487" – "reference.startTime=506.8999999809251" – "reference.endTime=510.73999998092506" (bundle.js, line 145156)
[Debug] (audio:1) – "fetching segment" (bundle.js, line 145167)
[Debug] fetching: reference= – {startTime: 506.8999999809251, endTime: 510.73999998092506, trueEndTime: 510.73999998092506, …} (bundle.js, line 145488)
{startTime: 506.8999999809251, endTime: 510.73999998092506, trueEndTime: 510.73999998092506, getUrisInner: function, startByte: 0, …}Object
[Debug] Segment downloaded: – "deltaTimeMs=13" – "numBytes=77092" – "lastTimeChosenMs=1663328103273" – "enabled=true" (bundle.js, line 138597)
[Debug] Suggesting Streams... (bundle.js, line 138631)
[Debug] Still within switch interval... (bundle.js, line 138642)
[Debug] (audio:1) – "checking buffer length" (bundle.js, line 145456)
[Debug] (audio:1) – "buffer behind too large:" – "presentationTime=447.05050545328487" – "bufferedBehind=33.07850545328489" – "bufferBehind=30" – "overflow=3.0785054532848903" (bundle.js, line 145463)
[Debug] Player changing buffering state to – true (bundle.js, line 149128)
[Debug] Changing effective playback rate to – 0 (bundle.js, line 144449)
[Debug] Changing Player state to – "buffering" (bundle.js, line 146813)
> $("video").currentTime
< 506.479720412
> $("video").duration
< 2100.4999999809093

I can verify that the player.seekRange().end is indeed correct, but for some reason the playhead is stuck right when the final (static) manifest is downloaded

@avelad
Copy link
Collaborator

avelad commented Sep 15, 2022

@joeyparrish can you review it? Thanks!

@fredrik-telia
Copy link
Contributor Author

fredrik-telia commented Sep 20, 2022

Interestingly enough this only happens in Safari, not in Chrome.

player.getConfiguration() output (taken from Chrome)
{
    "drm": {
        "retryParameters": {
            "maxAttempts": 5,
            "baseDelay": 1200,
            "backoffFactor": 2,
            "fuzzFactor": 0.4,
            "timeout": 40000,
            "stallTimeout": 18000,
            "connectionTimeout": 6000
        },
        "servers": {
            "com.widevine.alpha": "https://lic.drmtoday.com/license-proxy-widevine/cenc/?specConform=true"
        },
        "clearKeys": {},
        "advanced": {},
        "delayLicenseRequestUntilPlayed": false,
        "logLicenseExchange": false,
        "updateExpirationTime": 1,
        "preferredKeySystems": [],
        "keySystemsMapping": {}
    },
    "manifest": {
        "retryParameters": {
            "maxAttempts": 5,
            "baseDelay": 1500,
            "backoffFactor": 2.2,
            "fuzzFactor": 0.4,
            "timeout": 40000,
            "stallTimeout": 18000,
            "connectionTimeout": 12000
        },
        "availabilityWindowOverride": null,
        "disableAudio": false,
        "disableVideo": false,
        "disableText": false,
        "disableThumbnails": false,
        "defaultPresentationDelay": 20,
        "segmentRelativeVttTiming": false,
        "dash": {
            "clockSyncUri": "https://time.akamai.com/?iso",
            "ignoreDrmInfo": false,
            "disableXlinkProcessing": false,
            "xlinkFailGracefully": false,
            "ignoreMinBufferTime": true,
            "autoCorrectDrift": true,
            "initialSegmentLimit": 1000,
            "ignoreSuggestedPresentationDelay": false,
            "ignoreEmptyAdaptationSet": false,
            "ignoreMaxSegmentDuration": false,
            "keySystemsByURI": {
                "urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b": "org.w3.clearkey",
                "urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e": "org.w3.clearkey",
                "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed": "com.widevine.alpha",
                "urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95": "com.microsoft.playready",
                "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95": "com.microsoft.playready",
                "urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb": "com.adobe.primetime"
            }
        },
        "hls": {
            "ignoreTextStreamFailures": false,
            "ignoreImageStreamFailures": false,
            "defaultAudioCodec": "mp4a.40.2",
            "defaultVideoCodec": "avc1.42E01E",
            "ignoreManifestProgramDateTime": false,
            "mediaPlaylistFullMimeType": "video/mp2t; codecs=\"avc1.42E01E, mp4a.40.2\""
        }
    },
    "streaming": {
        "retryParameters": {
            "maxAttempts": 6,
            "baseDelay": 1500,
            "backoffFactor": 2.4,
            "fuzzFactor": 0.4,
            "timeout": 40000,
            "stallTimeout": 18000,
            "connectionTimeout": 12000
        },
        "rebufferingGoal": 6,
        "bufferingGoal": 60,
        "bufferBehind": 30,
        "ignoreTextStreamFailures": true,
        "alwaysStreamText": false,
        "startAtSegmentBoundary": false,
        "gapDetectionThreshold": 0.5,
        "durationBackoff": 1,
        "forceTransmuxTS": true,
        "safeSeekOffset": 5,
        "stallEnabled": true,
        "stallThreshold": 1,
        "stallSkip": 0.1,
        "useNativeHlsOnSafari": false,
        "inaccurateManifestTolerance": 2,
        "lowLatencyMode": false,
        "autoLowLatencyMode": false,
        "forceHTTPS": false,
        "preferNativeHls": false,
        "updateIntervalSeconds": 1,
        "dispatchAllEmsgBoxes": false,
        "observeQualityChanges": false,
        "maxDisabledTime": 30,
        "parsePrftBox": false
    },
    "offline": {
        "usePersistentLicense": true,
        "numberOfParallelDownloads": 5
    },
    "abr": {
        "enabled": true,
        "useNetworkInformation": true,
        "defaultBandwidthEstimate": 5000000,
        "switchInterval": 4,
        "bandwidthUpgradeTarget": 0.75,
        "bandwidthDowngradeTarget": 0.9,
        "restrictions": {
            "minWidth": 0,
            "maxWidth": null,
            "minHeight": 0,
            "maxHeight": null,
            "minPixels": 0,
            "maxPixels": null,
            "minFrameRate": 0,
            "maxFrameRate": null,
            "minBandwidth": 0,
            "maxBandwidth": null
        },
        "advanced": {
            "minTotalBytes": 128000,
            "minBytes": 16000,
            "fastHalfLife": 2,
            "slowHalfLife": 5
        },
        "restrictToElementSize": false,
        "ignoreDevicePixelRatio": false
    },
    "preferredAudioLanguage": "sv",
    "preferredTextLanguage": "sv",
    "preferredVariantRole": "",
    "preferredTextRole": "",
    "preferredAudioChannelCount": 2,
    "preferredVideoCodecs": [],
    "preferredAudioCodecs": [],
    "preferForcedSubs": false,
    "preferredDecodingAttributes": [],
    "restrictions": {
        "minWidth": 0,
        "maxWidth": null,
        "minHeight": 0,
        "maxHeight": null,
        "minPixels": 0,
        "maxPixels": null,
        "minFrameRate": 0,
        "maxFrameRate": null,
        "minBandwidth": 0,
        "maxBandwidth": null
    },
    "playRangeStart": 0,
    "playRangeEnd": null,
    "cmcd": {
        "enabled": false,
        "sessionId": "",
        "contentId": "",
        "useHeaders": false
    }
}
player.getConfiguration() (taken from Safari)
{
  "drm": {
    "retryParameters": {
      "maxAttempts": 5,
      "baseDelay": 1200,
      "backoffFactor": 2,
      "fuzzFactor": 0.4,
      "timeout": 40000,
      "stallTimeout": 18000,
      "connectionTimeout": 6000
    },
    "servers": {
      "com.apple.fps": "https://lic.drmtoday.com/license-server-fairplay"
    },
    "clearKeys": {},
    "advanced": {
      "com.apple.fps": {
        "distinctiveIdentifierRequired": false,
        "persistentStateRequired": false,
        "videoRobustness": "",
        "audioRobustness": "",
        "sessionType": "",
        "serverCertificate": {},
        "serverCertificateUri": "https://lic.drmtoday.com/license-server-fairplay/cert/tvm1",
        "individualizationServer": ""
      }
    },
    "delayLicenseRequestUntilPlayed": false,
    "logLicenseExchange": false,
    "updateExpirationTime": 1,
    "preferredKeySystems": [],
    "keySystemsMapping": {}
  },
  "manifest": {
    "retryParameters": {
      "maxAttempts": 5,
      "baseDelay": 1500,
      "backoffFactor": 2.2,
      "fuzzFactor": 0.4,
      "timeout": 40000,
      "stallTimeout": 18000,
      "connectionTimeout": 12000
    },
    "availabilityWindowOverride": null,
    "disableAudio": false,
    "disableVideo": false,
    "disableText": false,
    "disableThumbnails": false,
    "defaultPresentationDelay": 20,
    "segmentRelativeVttTiming": false,
    "dash": {
      "clockSyncUri": "https://time.akamai.com/?iso",
      "ignoreDrmInfo": false,
      "disableXlinkProcessing": false,
      "xlinkFailGracefully": false,
      "ignoreMinBufferTime": true,
      "autoCorrectDrift": true,
      "initialSegmentLimit": 1000,
      "ignoreSuggestedPresentationDelay": false,
      "ignoreEmptyAdaptationSet": false,
      "ignoreMaxSegmentDuration": false,
      "keySystemsByURI": {
        "urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b": "org.w3.clearkey",
        "urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e": "org.w3.clearkey",
        "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed": "com.widevine.alpha",
        "urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95": "com.microsoft.playready",
        "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95": "com.microsoft.playready",
        "urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb": "com.adobe.primetime"
      }
    },
    "hls": {
      "ignoreTextStreamFailures": false,
      "ignoreImageStreamFailures": false,
      "defaultAudioCodec": "mp4a.40.2",
      "defaultVideoCodec": "avc1.42E01E",
      "ignoreManifestProgramDateTime": false,
      "mediaPlaylistFullMimeType": "video/mp2t; codecs=\"avc1.42E01E, mp4a.40.2\""
    }
  },
  "streaming": {
    "retryParameters": {
      "maxAttempts": 6,
      "baseDelay": 1500,
      "backoffFactor": 2.4,
      "fuzzFactor": 0.4,
      "timeout": 40000,
      "stallTimeout": 18000,
      "connectionTimeout": 12000
    },
    "rebufferingGoal": 6,
    "bufferingGoal": 60,
    "bufferBehind": 30,
    "ignoreTextStreamFailures": true,
    "alwaysStreamText": false,
    "startAtSegmentBoundary": false,
    "gapDetectionThreshold": 0.5,
    "durationBackoff": 1,
    "forceTransmuxTS": true,
    "safeSeekOffset": 5,
    "stallEnabled": true,
    "stallThreshold": 1,
    "stallSkip": 0.1,
    "useNativeHlsOnSafari": false,
    "inaccurateManifestTolerance": 2,
    "lowLatencyMode": false,
    "autoLowLatencyMode": false,
    "forceHTTPS": false,
    "preferNativeHls": false,
    "updateIntervalSeconds": 1,
    "dispatchAllEmsgBoxes": false,
    "observeQualityChanges": false,
    "maxDisabledTime": 30,
    "parsePrftBox": false
  },
  "offline": {
    "usePersistentLicense": true,
    "numberOfParallelDownloads": 5
  },
  "abr": {
    "enabled": true,
    "useNetworkInformation": true,
    "defaultBandwidthEstimate": 5000000,
    "switchInterval": 4,
    "bandwidthUpgradeTarget": 0.75,
    "bandwidthDowngradeTarget": 0.9,
    "restrictions": {
      "minWidth": 0,
      "maxWidth": null,
      "minHeight": 0,
      "maxHeight": null,
      "minPixels": 0,
      "maxPixels": null,
      "minFrameRate": 0,
      "maxFrameRate": null,
      "minBandwidth": 0,
      "maxBandwidth": null
    },
    "advanced": {
      "minTotalBytes": 128000,
      "minBytes": 16000,
      "fastHalfLife": 2,
      "slowHalfLife": 5
    },
    "restrictToElementSize": false,
    "ignoreDevicePixelRatio": false
  },
  "preferredAudioLanguage": "sv",
  "preferredTextLanguage": "sv",
  "preferredVariantRole": "",
  "preferredTextRole": "",
  "preferredAudioChannelCount": 2,
  "preferredVideoCodecs": [],
  "preferredAudioCodecs": [],
  "preferForcedSubs": false,
  "preferredDecodingAttributes": [],
  "restrictions": {
    "minWidth": 0,
    "maxWidth": null,
    "minHeight": 0,
    "maxHeight": null,
    "minPixels": 0,
    "maxPixels": null,
    "minFrameRate": 0,
    "maxFrameRate": null,
    "minBandwidth": 0,
    "maxBandwidth": null
  },
  "playRangeStart": 0,
  "playRangeEnd": null,
  "cmcd": {
    "enabled": false,
    "sessionId": "",
    "contentId": "",
    "useHeaders": false
  }
}

@fredrik-telia
Copy link
Contributor Author

fredrik-telia commented Sep 27, 2022

This is also reproducible in the shaka demo app, running locally from main using the url provided in a separate email.

Generating a fresh url using updateUrl(<url from email>) with the following function:

const updateUrl = (url) => {
  const start = Math.floor((Date.now() / 1000) - 120);
  const stop = Math.floor((Date.now() / 1000) + 60);

  return `${url}?start=${start}&stop=${stop}`
}

and playing in Safari with useNativeHlsOnSafari set to false, the stream will stall after one minute, instead of playing all the way to the end.

JulianDomingo pushed a commit that referenced this issue Oct 6, 2022
fix: Fix HLS dynamic to static transition

 - Keep maxSegmentEndTime_ updated in PresentationTimeline by calling
   notifySegments on each HLS playlist update, so that the seek range
   doesn't revert to the original playlist size when it becomes
   static.
 - Wait to change the presentation type to VOD until after _all_
   active playlists have an ENDLIST tag, to avoid missing the final
   segments in one type or the other.
 - Stop updating the playlists after transition to VOD.
 - Update the MSE duration at exactly the same time as we transition
   to VOD, to avoid a loophole where the UI knows it's VOD, but
   doesn't have any way to get the correct duration.  Previously, this
   state would persist until the final segments were appended.

Closes #4431
JulianDomingo pushed a commit that referenced this issue Oct 6, 2022
fix: Fix HLS dynamic to static transition

 - Keep maxSegmentEndTime_ updated in PresentationTimeline by calling
   notifySegments on each HLS playlist update, so that the seek range
   doesn't revert to the original playlist size when it becomes
   static.
 - Wait to change the presentation type to VOD until after _all_
   active playlists have an ENDLIST tag, to avoid missing the final
   segments in one type or the other.
 - Stop updating the playlists after transition to VOD.
 - Update the MSE duration at exactly the same time as we transition
   to VOD, to avoid a loophole where the UI knows it's VOD, but
   doesn't have any way to get the correct duration.  Previously, this
   state would persist until the final segments were appended.

Closes #4431
JulianDomingo pushed a commit that referenced this issue Oct 7, 2022
🤖 I have created a release *beep* *boop*
---


##
[4.1.5](v4.1.4...v4.1.5)
(2022-10-07)


### Bug Fixes

* allow build without text
([#4506](#4506))
([1db6265](1db6265))
* allow the playback on platforms when low latency APIs are not
supported
([#4485](#4485))
([55d1390](55d1390))
* check for negative rows before moving
([#4510](#4510))
([31abae3](31abae3)),
closes
[#4508](#4508)
* Filter unsupported H.264 streams in Xbox
([#4493](#4493))
([1ecede6](1ecede6))
* Fix choppy HLS startup
([#4553](#4553))
([1675bff](1675bff)),
closes
[#4516](#4516)
* Fix errors with TS segments on Chromecast
([#4543](#4543))
([15a1c60](15a1c60))
* Fix hang when seeking to the last segment
([#4537](#4537))
([72a119d](72a119d))
* Fix HLS dynamic to static transition
([932d37c](932d37c))
* Fix HLS dynamic to static transition
([#4483](#4483))
([932d37c](932d37c)),
closes
[#4431](#4431)
* Fix in-band key rotation on Xbox One
([#4478](#4478))
([5a8f09c](5a8f09c)),
closes
[#4401](#4401)
* Respect existing app usage of Cast SDK
([#4523](#4523))
([9c3a494](9c3a494)),
closes
[#4521](#4521)
* **ttml:** Default TTML background color to transparent if unspecified
([#4496](#4496))
([16da1e7](16da1e7)),
closes
[#4468](#4468)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
JulianDomingo pushed a commit that referenced this issue Oct 7, 2022
🤖 I have created a release *beep* *boop*
---


##
[4.2.2](v4.2.1...v4.2.2)
(2022-10-07)


### Bug Fixes

* allow build without text
([#4506](#4506))
([7e93720](7e93720))
* allow the playback on platforms when low latency APIs are not
supported
([#4485](#4485))
([cf8c857](cf8c857))
* check for negative rows before moving
([#4510](#4510))
([23f39d7](23f39d7)),
closes
[#4508](#4508)
* Filter unsupported H.264 streams in Xbox
([#4493](#4493))
([914a08a](914a08a))
* Fix choppy HLS startup
([#4553](#4553))
([950ce69](950ce69)),
closes
[#4516](#4516)
* Fix errors with TS segments on Chromecast
([#4543](#4543))
([8204db6](8204db6))
* Fix hang when seeking to the last segment
([#4537](#4537))
([3d6c768](3d6c768))
* Fix HLS dynamic to static transition
([d9ecbf3](d9ecbf3))
* Fix HLS dynamic to static transition
([#4483](#4483))
([d9ecbf3](d9ecbf3)),
closes
[#4431](#4431)
* Fix in-band key rotation on Xbox One
([#4478](#4478))
([bc0a588](bc0a588)),
closes
[#4401](#4401)
* Missing AES-128 key of last HLS segment
([#4519](#4519))
([2c2677f](2c2677f)),
closes
[#4517](#4517)
* Respect existing app usage of Cast SDK
([#4523](#4523))
([3db2568](3db2568)),
closes
[#4521](#4521)
* **ttml:** Default TTML background color to transparent if unspecified
([#4496](#4496))
([0b5c985](0b5c985)),
closes
[#4468](#4468)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Nov 12, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: HLS The issue involves Apple's HLS manifest format status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
4 participants