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

failed to create new instance of WSAvcplayer #13

Open
Mjxa opened this issue Feb 3, 2020 · 1 comment
Open

failed to create new instance of WSAvcplayer #13

Mjxa opened this issue Feb 3, 2020 · 1 comment
Labels

Comments

@Mjxa
Copy link

Mjxa commented Feb 3, 2020

Good day!
I was trying to integrate your player into my React project, and on creating new WSAvcplayer(),
getting error Cannot read property 'slice' of null, exception trowing in minified file of your library.
exact place :function a(n){return n=n.toString().match(e).slice(1),
After few days i diceded to console.log argument n & e, so i saw that e is a regular expression, and it was very similar to one regExp seen in github issue schmich/instascan#154;
so I changed local your code to this function a(n){return n=n.toString().match(/^function[^\(](([^)]))\s*{\s*([^*]?)[\s;](?:return\s*(.?)[;\s])?}$/).slice(1)
Its working !
Hope this will help you =)

@matijagaspar
Copy link
Owner

Thank you for finding this. Would be nice to find the actual source of that function. if you have any insight would be great. otherwise I will keep this open for when I have some time to address this.

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

No branches or pull requests

2 participants