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

iOS 16.1.1 MEDIA_ERR_DECODE #181

Open
BakurL opened this issue Nov 17, 2022 · 14 comments
Open

iOS 16.1.1 MEDIA_ERR_DECODE #181

BakurL opened this issue Nov 17, 2022 · 14 comments

Comments

@BakurL
Copy link

BakurL commented Nov 17, 2022

We are seeing MEDIA_ERR_DECODE - this problem on devices with iOS 16.1.1 (recent update). Anyone has any idea on fix/what to do with it?

@rudemateo
Copy link

we are seeing this as well. troubleshooting now

@BakurL
Copy link
Author

BakurL commented Nov 17, 2022

I have weird untested solution. Don't know what changed, but SPC gets SPACES after conversion into Base64 (weird). We tried removing spaces, but this didn't work. We swapped spaces to + symbols and in native implementation (without videojs) were able to playback the content on iOS 16.1.1. Checking videojs+contrib-eme now

@BakurL
Copy link
Author

BakurL commented Nov 17, 2022

Doesn't work with videojs/contrib-eme

@rudemateo
Copy link

@BakurL would you be able to share your "native implementation" that worked in mobile safari with us? (note: it doesn't need real streaming urls, we have those of our own) if we can get DRM working in Safari with raw html / js (i.e. no videojs code) this would help us to see if there is a problem in the contrib-eme implementation.

@BakurL
Copy link
Author

BakurL commented Nov 17, 2022

@rudemateo Sure, it's standard Apple Faiplay implementation that comes with FPS package. But, here's codeshare https://codeshare.io/contib-eme . What we discovered, this implementation generates spaces in SPC somehow (after base64 conversion). Which was working before iOS 16.1.1, but somehow does not work now. So for our License Server (fairplay one), which generates CKC, we had to replace spaces in SPC to plus symbols. This we tested and it works on iOS 16.1.1, as well as older versions of iOS (we tested 15.5). Hope this helps. Please share patch for contrib-eme if you fix it

@rudemateo
Copy link

we used the apple fairplay example code you attached in the codeshare, and confirmed that it works in safari on iOS 16.1.x devices. so this does appear to be an issue with the videojs-contrib-eme implementation.

@rudemateo
Copy link

I was given guidance on the video-dev slack to downgrade to a 3.x version of this library, and indeed, that fixed this issue :-(

@BakurL
Copy link
Author

BakurL commented Nov 18, 2022

Thanks a lot for the tip! We tested too, works surprisingly

@kumaavi
Copy link

kumaavi commented Nov 21, 2022

We have tried downgrading to 3.10.1 but it did not fix the FairPlay issues for us on iOS 16.1.x.

@kumaavi
Copy link

kumaavi commented Nov 21, 2022

Update:- It worked for us too.

We had to change the way getContentId works, some additional transformation was needed.

@BakurL
Copy link
Author

BakurL commented Nov 21, 2022

There was one more bug, we were struggling with - with multi-bitrate/stream manifests (hls), contrib-eme was playing back inconsistently (about 50% of the time issuing MEDIA_ERR_DECODE). This problem got solved with older contrib-eme also

cfra added a commit to PicturePipe/videojs-contrib-eme that referenced this issue Feb 18, 2023
As described in videojs#181
using standards based EME on iOS >= 16 doesn't currently work with
videojs-contrib-eme. (Downgrading videojs-contrib-eme to 3.x basically
prefers WebKitMediaKeys over MediaKeys)

So guard the usage of MediaKeys by the IOS version and use
WebKitMediaKeys for IOS 16 and above.
cfra added a commit to PicturePipe/videojs-contrib-eme that referenced this issue Feb 18, 2023
As described in videojs#181
using standards based EME on iOS >= 16 doesn't currently work with
videojs-contrib-eme. (Downgrading videojs-contrib-eme to 3.x basically
prefers WebKitMediaKeys over MediaKeys)

So guard the usage of MediaKeys by the IOS version and use
WebKitMediaKeys for IOS 16 and above.
@cfra
Copy link

cfra commented Feb 18, 2023

I can confirm that this issue affects us with version 5.0 as well.

While using standard EME seems to work well for iOS 15 and was apparantly in fact required - compare #140 - it breaks iOS 16.

What you are basically doing by downgrading to 3.x is to back out 5897655 which prefers standard EME over the vendor specific API.

In our tree, I used PicturePipe@49701d3 to achive the same effect without downgrading the whole plugin and still using standard EME on iOS 15.

This still seems more like a workaround than a proper fix.

The proper fix would be researching why the implementation using standards based EME fails on iOS 16 and fixing it.

@vykhanh3012
Copy link

vykhanh3012 commented Feb 23, 2023

Hi @cfra , after we upgrade IOS to 16.1 ++ have the same issue

  • I have tried downgrading to 3.x but it did not fix the FairPlay issues for us on iOS 16.1.x.
  • Currenly version 5.0.1 .
  • Have any idea fix issue?

VIDEOJS: – "ERROR:" – "(CODE:3 MEDIA_ERR_DECODE)" – "The media playback was aborted due to a corruption problem or because the media used features your browser did not support."

  • Update : Resolved Issues

@aaronabf
Copy link

Seeing this on iOS 17 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants