O'Reilly Forums: Chapter 8 Cross-Origin - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chapter 8 Cross-Origin Cross-origin obstacle iPad

#1 User is offline   elpuerco63 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 12
  • Joined: 25-June 12

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....

In hope....
0

#2 User is offline   Beth Robson 

  • Veteran Member
  • PipPipPipPipPipPipPipPipPip
  • Group: O'Reilly Employee
  • Posts: 364
  • Joined: 17-September 08
  • Gender:Female
  • Location:Seattle, WA
  • Interests:I am interested in computer science, the Web, social media and the internet, Mac development, and adult learning.

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?
Elisabeth Robson
Co-founder, WickedlySmart.com
Author: Head First JavaScript Programming, Head First HTML5 Programming, Head First HTML and CSS, Head First Design Patterns
0

#3 User is offline   elpuerco63 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 12
  • Joined: 25-June 12

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://

DOH!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users