-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Error occurred when set perspective360Degree for 360 video. #69
Comments
Thanks for your excellent bug report @ewangke. Since the I've added a fix to the develop branch which wraps the execution of the JavaScript function in a self-executing anonymous JavaScript function to avoid the invalid return value. |
Thanks for your fix and quick response @SvenTiigi . The fix eliminates the WKError now. But I still can't update video's perspective by API I notice that the official document example works on Safari for macOS, but didn't work on mobile Safari for iOS. I know that it's most likely the iFrame API limitation. Is it possible to play 360 video via iFrame API on iOS? |
Hi @ewangke, I've tested the video perspective APIs and can confirm that the As a result I will remove the video perspective APIs from YouTubePlayerKit as there is no suitable workaround available and the official youtube-ios-player-helper also doesn't provide any kind of support for this API. Thanks for your investigations! |
@SvenTiigi, thanks for your help! |
What happened?
Hi, @SvenTiigi
I'm trying to YouTube play 360 video with the cool project, but an error occurred when set perspective360Degree. I set a breakpoint on YouTubePlayerWebView+Evaluate.swift:81, and the error message is as below:
The javascript executed is as below:
which is generated by API call like this:
What are the steps to reproduce?
Step 1:
Replace the button event with code snippets below
Replace the WWDC22 url with another 360 YouTube url: https://www.youtube.com/watch?v=s_hdc_XiXiA&t=4s
Step 2:
Build and run the Example target,I tried both the simulator and iPhone device. Tap any item within the scrollView to trigger perspective360Degree update.
What is the expected behavior?
I tried to update perspective360Degree and expect different perspective can be viewed, just like the official iframe - Controlling 360° videos demo.
Would you please look into this issue, or maybe give me some hint for debugging. Many thanks!
The text was updated successfully, but these errors were encountered: