-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[object ArrayBufferConstructor] is not a function #1022
Comments
First, can you try with the uncompiled library? It would be helpful to see a stack trace of this, the stack trace in the screenshot doesn't look right (or in the library). Also, how are you loading Shaka Player? The top-level object doesn't look familiar, is it a wrapped error from some other library or the platform? Is |
Thank you for your reply, @TheModMaker . Yes, you are right! Stack trace is appeared when I inject the uncompiled library. I was importing the compiled.debug.js (it seems it is a bad idea).
Also, yes it is a wrapper from our application. It doesn't override the functions. It just initializes the shaka-player. Now, I am able to trace the bug. After some investigation, I will share the result. Thanks a lot again. |
After I dug into this bug more, I found out WebKit browser partially does not support ArrayBuffer.slice() method. Specifically, slice method exists but only takes one parameter. The second parameter was causing this error. So, I had to override the ArrayBuffer.slice method based on Claudiu's answer from this link ArrayBuffer.slice override This topic can be closed unless you want to add this support for old browsers. Thank you for your help again. |
If that is the only bug here, I think we can work around it. It would be nice to be able to support this browser. |
@TheModMaker, I have been facing another issue. This might be more likely a StackOverflow question, but I will really appreciate any help. Because I am really desperate at this point. As I said above, this application works on latest browsers and not working in this WebKit browser. Problem is that video is not playing and there is no error (also listened 'uncaught errors' in case of missing promise catch blocks). That's why I do not know how to troubleshoot. So far, I realized video blob file is created and video source is loaded into video element as well. Please check screenshots. The question is here is it possible that browser cannot detect the video codecs or video type somehow? Or what are the other possibilities that I can look for? Please accept my apologies for the unrelated question in this topic. |
Here are some things to check:
What is the value of var b = [];
for (var i = 0; i < video.buffered.length; i++)
b.push([video.buffered.start(i), video.buffered.end(i)]); If you are using the uncompiled library, you can also set the log level to get more info. This could be used to see if something stalls or if we append segments successfully. shaka.log.setLevel(shaka.log.Level.DEBUG);
shaka.log.setLevel(shaka.log.Level.V1);
shaka.log.setLevel(shaka.log.Level.V2); |
@TheModMaker. Thank you so much for the reply. Actually, I checked some of them before, but it does not still explain what's the problem for me.
Do you have any idea why buffered length is 0? Because, I checked the working version. That one's buffered length is 1. What may it cause this? Or what else can I check? When video is first loaded (loadedmetadata event): After forced to play and pause (waiting event): |
I was actually referring to checking the network tab to see if we are actually downloading them.
A length of 0 means no content is buffered. This can happen before we download segments, or if the content is not supported. Media error 4 is MEDIA_ERR_SRC_NOT_SUPPORTED. It looks like the browser doesn't like the MSE source. I see there is a |
Oh, sorry. That's my bad. You are right. It does not download all contents. It stops downloading after 5 chunks (see screenshot). The working one keeps downloading each segment while its playing. However, it does not make sense to me if it is content is unavailable issue. Because, same urls are requested on Chrome one and TV browser one. It should download all contents. Plus, this problems are exists at all different contents (live or VOD).
Could you expand "the content is not supported" issue a little bit? Does it mean content is simply unavailable(which is unlikely since I can play the content) or content may not be encrypted in the browser?
MediaKeys object is different than chrome's. I realized that as well, then I thought this must be added by samsung since webkit(safari) does not support playready natively. Yes, I am able to play clear contents, but I cannot play widevine or playready contents. Regarding this topic 771 , I am having the same issue for the demo app as well. I cannot play any content except first one in the demo app. I see samsung documentation has the playready DRM playready . Do you think this issue may be an encryption issue? Since I am new at shaka-player, I do not know how to trace it from this point if this is the issue. Thank you so much for your help. |
From issue #771 it looks like Tizen 2.4 doesn't implement the APIs we need to use PlayReady. The documentation you linked to shows that it uses a custom API to use PlayReady, which we don't support. So it looks like that browser isn't supported for protected content, you can follow #771 to get updates. |
Hmm, I never thought playready is only supported in their custom API. I will follow the #771 . However, I will ask Samsung about playready support. Thank you! |
ArrayBuffer.slice isn't supported with two arguments on Tizen 2016. This is a temporary fix that can be cherry-picked to v2.2. A better fix will be handled in a follow-up change. Issue #1022 Change-Id: Iae6a0b2ef0cf17843f42f22f0ea0962a56e8be68
ArrayBuffer.slice isn't supported with two arguments on Tizen 2016. This is a temporary fix that can be cherry-picked to v2.2. A better fix will be handled in a follow-up change. Issue #1022 Change-Id: Iae6a0b2ef0cf17843f42f22f0ea0962a56e8be68
The first part of the fix has been cherry-picked to v2.2.x and will be released in v2.2.2. A deeper refactor is coming, which will land in v2.3.0 due to small API changes. |
Instead of taking Uint8Array for media segments and ArrayBuffer for init segments, take Uint8Array for everything. Clean-up after #1022, discovered while preparing the upgrade guide for v2.3. Change-Id: I1f284f6f51f345e663c06d96d788bd9cfb941c52
Have you read the FAQ and checked for duplicate issues:
Yes
What version of Shaka Player are you using:
2.2.0
Can you reproduce the issue with our latest release version:
Yes
Can you reproduce the issue with the latest code from
master
:Yes
Are you using the demo app or your own custom app:
Custom app.
If custom app, can you reproduce the issue using our demo app:
No.
What browser and OS are you using:
Samsung 2016 Tv. User-agent: Mozilla/5.0 (SMART-TV; Linux; Tizen 2.4.0) AppleWebKit/538.1 (KHTML, like Gecko) Version/2.4.0 TV
What are the manifest and license server URIs:
(you can send the URIs to [email protected] instead, but please use GitHub and the template for the rest)
It only occurs in Samsung 2016 TV. If you have 2016 Samsung TV to test(also you would need Tizen Studio), I would be happy to share it. Otherwise, it is not reproducible.
What did you do?
When I try to load manifest into shaka.Player.load function, it throws this error.
What did you expect to happen?
It should not throw the error.
What actually happened?
First of all, this application works on latest browsers and 2017 Samsung TV as well. This error is only caught in 2016 TV. So, it is hard to test it. Honestly, I would not even say this is a valid bug since 2016 TV has very old version of WebKit browser. However, I am stuck at this point and I am wondering do you have any idea what it may cause this error. I will appreciate any help. Please check the screenshot. You will notice it does not even show the error line. Also, yes I checked ArrayBuffer is supported by the webkit browser. Thank you.
The text was updated successfully, but these errors were encountered: