shaka-project / shaka-player

JavaScript player library / DASH & HLS client / MSE-EME player
Apache License 2.0
6.93k stars 1.31k forks source link

HLS Stream gets stuck after adapdation in Safari #6897

Open lucasreppewelander opened 1 week ago

lucasreppewelander commented 1 week ago

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

If the problem is related to FairPlay, have you read the tutorial?

What version of Shaka Player are you using? 4.7.13

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

Can you reproduce the issue with the latest code from main? yes, tested against nightly

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

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

What browser and OS are you using? safari & macOS

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

What are the manifest and license server URIs? https://f60b57cb294f259103c7dee6117c6351.egress.mediapackage-vod.eu-north-1.amazonaws.com/out/v1/86b99ce7b71b404fb8dbdcde762273c5/f163c5cb820b454488bd9ca790f8f631/0e9da5790da1449dad1bb75c98e14217/index.m3u8

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

{
  "drm": {},
  "manifest": {
    "availabilityWindowOverride": null
  },
  "streaming": {
    "useNativeHlsOnSafari": false,
    "useNativeHlsForFairPlay": false
  },
  "mediaSource": {},
  "offline": {},
  "abr": {
    "enabled": false,
    "defaultBandwidthEstimate": 10000000000
  },
  "preferredAudioLanguage": "en-US",
  "preferredTextLanguage": "en-US"
}

What did you do?

  1. Load the manifest and wait for playback
  2. Change resolution

What did you expect to happen? To give me normal playback after change of resolution

What actually happened? The playback stutters and gets stuck in a short loop and never recovers https://github.com/shaka-project/shaka-player/assets/22000298/4e778a92-e47a-4ec9-8f89-944e3159267d

Are you planning send a PR to fix it?

avelad commented 6 days ago

It's a problem with the transmuxer and the data that Safari accepts. The code that fails is at https://github.com/shaka-project/shaka-player/blob/main/lib/transmuxer/ts_transmuxer.js#L857. I won't be able to work on this, but if you want to fix it the problem would be there. By the way, in hls.js the stream works perfectly.