Comments (5)
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.
- 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>
- Are you serving this file as HTML? I assume so, since you're seeing a JS exception.
from presentation-api.
Hi @hbmangal, I maintain the implementation in Chrome, and am happy to help.
- What browser / web engine are you using?
- 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.
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.
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.
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)
- One prompt for both PresentationRequest and RemotePlayback HOT 3
- Presentation reconnection with an implementation specific mechanism? HOT 2
- send request stuck on presentationRequest.getAvailability() Method HOT 1
- PresentationRequest is not defined? HOT 2
- Same-screen presentation HOT 9
- Requesting enhancements to the presentation API HOT 7
- HTTP header customization when fetching the presentation page
- reconnect after termination HOT 2
- Possibility for UA to close the connection when it is no longer operational HOT 3
- Publish a Candidate Recommendation Draft HOT 6
- Presentation-api cast file working good on Chrome version 87, but it is not work on Chrome version 88 HOT 13
- Presentation API cast app ID's broken on chromium 95 HOT 2
- update status for issue #347 (Local Presentation API to enable child-window presentation documents) HOT 1
- Presentation of objects prototyping HOT 2
- Update spec language around 1-UA mode to reflect Multi-Screen Window Placement HOT 1
- PresentationRequest.getAvailability() could always return a new Promise
- Update spec language to refer to child navigables instead of nested browing contexts?
- Cannot find name 'PresentationRequest' HOT 2
- "Deploy Pages" GitHub action is timing out HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from presentation-api.