GithubHelp home page GithubHelp logo

Comments (5)

mfoltzgoogle avatar mfoltzgoogle commented on August 23, 2024 1

Hi,

Thanks for the pointer. The example code at that URL is out of date, I will try to contact the maintainers to fix that.

  1. What URL are you serving this from? I noticed you have http: IP addresses in the PresentationRequest. Those are not allowed because communicating from https: to http: is considered a mixed content situation.

Please try serving both the controlling and receiving page over https: or using Chrome's commandline flags to whitelist your origin:

--unsafely-treat-insecure-origin-as-secure=http://<host>:<port>
  1. Are you serving this file as HTML? I assume so, since you're seeing a JS exception.

from presentation-api.

mfoltzgoogle avatar mfoltzgoogle commented on August 23, 2024

Hi @hbmangal, I maintain the implementation in Chrome, and am happy to help.

  1. What browser / web engine are you using?
  2. Can you share the URL of the page you're testing, or more of the script?

Note that Presentation API is only available on secure contexts in Chrome (https: or file: URLs).

from presentation-api.

hbmangal avatar hbmangal commented on August 23, 2024

Hi @mfoltzgoogle, thanks for your reply.
Here are the details -

I am using Google Chrome & Firefox in the Ubuntu 18.04 with following versions:
Google Chrome Version 76.0.3809.132 (Official Build) (64-bit)
Firefox Quantum - 69.0 (64-bit)

I am following the reference - https://developer.mozilla.org/en-US/docs/Web/API/Presentation_API

Please see attached file I am using in my local.
present.txt

from presentation-api.

hbmangal avatar hbmangal commented on August 23, 2024

Hi @mfoltzgoogle,

Thank you for the prompt response,

I am just creating a POC to validate the Presentation API for integrating into a project.

Yes, I am serving the file as HTML, for now, to check whether it works or not.

I have uploaded it to a secure origin and PresentationRequest worked.

Will you please tell me what are the browsers and versions the Presentation API would work smoothly?

Also, It would be very helpful if you can provide latest doc reference to refer.

from presentation-api.

mfoltzgoogle avatar mfoltzgoogle commented on August 23, 2024

Will you please tell me what are the browsers and versions the Presentation API would work smoothly?

Chrome has supported the Presentation API with normal HTML URLs since Chrome 59 (for desktop):

https://chromestatus.com/feature/5414209298890752

You can see support in other browsers on MDN, note I have not exhaustively tested this on all other browsers:

https://developer.mozilla.org/en-US/docs/Web/API/Presentation_API

Note, I'm planning on refreshing the mozilla.org documentation as it's a little behind the current spec.

Also, It would be very helpful if you can provide latest doc reference to refer.

The examples in the Presentation API spec should reflect the latest shipping implementation in Chrome: https://w3c.github.io/presentation-api/#examples

We also have a couple of sample apps if that would be helpful:

https://github.com/googlechrome/samples/tree/gh-pages/presentation-api
https://github.com/GoogleChromeLabs/presentation-api-samples

If you run into what looks like a bug with the Chrome implementation you can file a bug here and assign it to [email protected]:

https://bugs.chromium.org/p/chromium/issues/entry

Hope this helps. I'm going to close out this issue as it's not directly related to the spec itself.

from presentation-api.

Related Issues (20)

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.