We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I encountered a situation where the video cannot play with the following error.
Domain: XCDYouTubeVideoErrorDomain Code: -2 User Info: { }
It seems that sometimes YouTube returns some pattern of HTML that makes the parser fails.
videoInfo
ytInitialPlayerResponse = {...}
};
<script nonce="tZD2YtPt7fxsKqPJwe7GAw">var ytInitialPlayerResponse = { ... // This "privateDoNotAccessOrElseSafeScriptWrappedValue" key contains the JavaScript source code which contains `};` "privateDoNotAccessOrElseSafeScriptWrappedValue": "(function(){function u(x){return x}var X=this||self,C=function(x,O,W,R,J){if(R=(J=X.trustedTypes,W),!J||!J.createPolicy)return R;try{R=J.createPolicy(O,{createHTML:y,createScript:y,createScriptURL:y})}catch(z){if(X.console)X.console[x](z.message)}return R},y=function(x){return u.call(this,x)}; ...", ... }}}};var meta = document.createElement('meta'); meta.name = 'referrer'; meta.content = 'origin-when-cross-origin'; document.getElementsByTagName('head')[0].appendChild(meta);</script>
Is there anybody who encountered the same issue? How do we fix this problem?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I encountered a situation where the video cannot play with the following error.
It seems that sometimes YouTube returns some pattern of HTML that makes the parser fails.
videoInfo
from YouTube's HTML, find a string that matchesytInitialPlayerResponse = {...}
by using this regex and deserialize it to json};
inside JSON, which makes it fail to deserializeIs there anybody who encountered the same issue? How do we fix this problem?
The text was updated successfully, but these errors were encountered: