Jump to content
Chapter 8 Cross-Origin
2 replies to this topic
Posted 19 July 2012 - 01:33 AM
I understand the need to connect to the HTML file via localHost: on my Mac to get all the effects etc to work as desired...super
I understand that when opening the HTML as file:// I will get a cross-origin error and the effects etc do not work.
I now have the entire project setup to run on an iPad (using phonegap / cordova) to create the IOS project.
This basically runs all the HTML and JS in a webview on the device and for the most part, works a treat.
However I have now discovered that the effects do not work on the IPad which I suspect is to do with the cross-origin issue.
does anyone know a work around for this?
Like I say, so far all the cool stuff I have learned in the book so far to run in browsers I have managed to port successfully to IOS and Android until now....
Posted 19 July 2012 - 04:26 PM
So, where are you serving the pages from, to the web page in the iPad? I'm assuming you're not running a local server on the iPad? If that's true, then you're serving the files from somewhere else, right? Which shouldn't cause a cross-origin issue assuming you're using the full URL as the src of the video.
If you do not use the effects are you seeing the video as expected? If so, it's definitely not a cross-origin issue.
When you play the video on the iPad, does it switch into full screen mode? I'm wondering if the iPad is somehow hijacking the video so you're not seeing the buffer canvas at all, just the original video?
Posted 21 July 2012 - 04:19 AM
Hi, the pages are served from the device, webkit loads from the devices resouces using file://
From my investigations it looks like the issue is with the canvas and the drawImage section.
So when using file:// on the desktop the error reports cross-origin with the canvas tainted.
So I presume the same thing is happening on the ipad as it too uses file://
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users