Comments (2)
(This is slightly off topic for a spec repo, but I'll try to offer some direction to help you forward.)
@abutizi Thank you for your interest toward the Presentation API!
I'm not familiar with Ionic, but it looks like the runtime (called Capacitor, using WebView) underneath the UI layer (Ionic) hosts the app files from a local HTTP server served with the http://
protocol. The reason you're hitting that error is likely two-fold: the PresentationRequest
API is only exposed if the app files are served with the https://
protocol. Secondly, the Presentation API is not enabled in WebView see e.g. https://crbug.com/521319. There seems to be a proposal in capacitor-community/proposals#139 for a Capacitor plugin to enable this API, but no movement yet, so not helping you.
All is not lost. Depending on your use case, you may want to develop a regular web app or a PWA instead. If you want to pursue this path, to get you going, please first check you are using a compatible web browser and then try this demo.
@mfoltzgoogle may be able to speak briefly on the feasibility of supporting Presentation API in Android WebView.
from presentation-api.
Hi @abutizi, you can track the progress of Presentation API on WebView in the Chromium issue tracker:
I have asked the WebView team for an update and if I hear anything I can post in the tracker I will update the ticket.
If the API is important for your application and you can't wait for possible future WebView compatibility, then I would suggest building a PWA in a compatible browser as suggested by Anssi. If you run into issues with your PWA that look like bugs or missing features then I can try to direct your inquiry.
Thanks for your question, I am closing this issue as further WebView updates can be found at the link above.
from presentation-api.
Related Issues (20)
- Uncaught ReferenceError: PresentationRequest is not defined HOT 5
- 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?
- "Deploy Pages" GitHub action is timing out HOT 2
- Cannot present on multiple devices from the same tab HOT 4
- Update the link to the HTTP spec 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.