Giter Club home page Giter Club logo

Comments (7)

Gullfaxi171 avatar Gullfaxi171 commented on July 24, 2024

Hi !

This is a CORS issue.
I will fix this in the next version (in 2-3 weeks)

For now you can make it work by adding this line of code :

<script>THREE.ImageUtils.crossOrigin = 'use-credential';</script>

between the call of three.js and photosphere.min.js (like that :

<script  src="//code.angularjs.org/1.4.0-rc.2/angular.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/threejs/r69/three.min.js"></script>
<script>THREE.ImageUtils.crossOrigin = 'use-credential';</script>
<script src="http://rawgit.com/Gullfaxi171/angular-photosphere-directive/master/dist/photosphere.min.js"></script>

from angular-photosphere-directive.

saifullahalamin avatar saifullahalamin commented on July 24, 2024

Hi Gullfaxi171,

I get error like this:
Redirect at origin 'https://docs.google.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.

I will wait your next version.

from angular-photosphere-directive.

Gullfaxi171 avatar Gullfaxi171 commented on July 24, 2024

Hi,

this is because CORS also has to be enabled server-side. You can't use this link :
https://docs.google.com/uc?&id=0B9O7qe_nas1JZlVKQ2d6X3ViVU0

but you have to use this one :
https://doc-10-1o-docs.googleusercontent.com/docs/securesc/1tb1h8grn2jn4dd5j3vcqrk6lm15shbp/iainh1g3v7nku2mnhd2nsm7l92758o1u/1433095200000/11470150606268658201/10076177599681084246/0B9O7qe_nas1JZlVKQ2d6X3ViVU0?nonce=v4pne02v22jk4&user=10076177599681084246&hash=1ke3esoptd30romh5pfrrev7gc4fhrtv

from angular-photosphere-directive.

saifullahalamin avatar saifullahalamin commented on July 24, 2024

I get it,

could you let me ask one more question?
can I re-render the photosphere by clicking button?, I mean what is the code to re-render it?

from angular-photosphere-directive.

Gullfaxi171 avatar Gullfaxi171 commented on July 24, 2024

This is not possible right now, but I'll try to add this feature in the next version

do you mean re-rendering with the same picture, or rendering in order to switch to another photosphere ?

from angular-photosphere-directive.

saifullahalamin avatar saifullahalamin commented on July 24, 2024
"<photosphere src="path/img.jpg"  width="1024" height="768"  speed="10" resolution="40" controls="all"> </photosphere>"

if I have this html tag, I update the src attribute via javascript, then re-render it.

Thanks for spending your time.

from angular-photosphere-directive.

Gullfaxi171 avatar Gullfaxi171 commented on July 24, 2024

I have corrected the CORS issue, but I also believe your link is not yet correct
you need to follow this tutorial : https://support.google.com/drive/answer/2881970?hl=en

you can use this version of photosphere.min.js :

http://rawgit.com/Gullfaxi171/angular-photosphere-directive/master/photosphere/dist/photosphere.min.js

Can you tell me if you manage to make it work ?

from angular-photosphere-directive.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.