electron-cast 0.3.1 → 0.5.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +340 -0
- package/CONTRIBUTING.md +305 -0
- package/README.md +215 -60
- package/SECURITY.md +324 -0
- package/dist/cjs/client/auth/build-time.d.ts +7 -0
- package/dist/cjs/client/auth/build-time.js +11 -0
- package/dist/cjs/client/auth/build-time.js.map +1 -0
- package/dist/cjs/client/auth/cast-auth.d.ts +46 -0
- package/dist/cjs/client/auth/cast-auth.js +145 -0
- package/dist/cjs/client/auth/cast-auth.js.map +1 -0
- package/dist/cjs/client/auth/cast-cert-validator.d.ts +34 -0
- package/dist/cjs/client/auth/cast-cert-validator.js +89 -0
- package/dist/cjs/client/auth/cast-cert-validator.js.map +1 -0
- package/dist/cjs/client/auth/crl.d.ts +45 -0
- package/dist/cjs/client/auth/crl.js +227 -0
- package/dist/cjs/client/auth/crl.js.map +1 -0
- package/dist/cjs/client/auth/der.d.ts +62 -0
- package/dist/cjs/client/auth/der.js +208 -0
- package/dist/cjs/client/auth/der.js.map +1 -0
- package/dist/cjs/client/auth/names.d.ts +52 -0
- package/dist/cjs/client/auth/names.js +447 -0
- package/dist/cjs/client/auth/names.js.map +1 -0
- package/dist/cjs/client/auth/path-validator.d.ts +29 -0
- package/dist/cjs/client/auth/path-validator.js +421 -0
- package/dist/cjs/client/auth/path-validator.js.map +1 -0
- package/dist/cjs/client/auth/trust-data.d.ts +24 -0
- package/dist/cjs/client/auth/trust-data.js +97 -0
- package/dist/cjs/client/auth/trust-data.js.map +1 -0
- package/dist/cjs/client/auth/x509.d.ts +109 -0
- package/dist/cjs/client/auth/x509.js +442 -0
- package/dist/cjs/client/auth/x509.js.map +1 -0
- package/dist/cjs/client/cast-client.d.ts +111 -0
- package/dist/cjs/client/cast-client.js +505 -0
- package/dist/cjs/client/cast-client.js.map +1 -0
- package/dist/cjs/client/errors.d.ts +28 -0
- package/dist/cjs/client/errors.js +50 -0
- package/dist/cjs/client/errors.js.map +1 -0
- package/dist/cjs/client/index.d.ts +6 -0
- package/dist/cjs/client/index.js +21 -0
- package/dist/cjs/client/index.js.map +1 -0
- package/dist/cjs/client/namespaces.d.ts +9 -0
- package/dist/cjs/client/namespaces.js +13 -0
- package/dist/cjs/client/namespaces.js.map +1 -0
- package/dist/cjs/client/types.d.ts +27 -0
- package/dist/cjs/client/types.js +3 -0
- package/dist/cjs/client/types.js.map +1 -0
- package/dist/cjs/dial/dial-registry.d.ts +104 -0
- package/dist/cjs/dial/dial-registry.js +301 -0
- package/dist/cjs/dial/dial-registry.js.map +1 -0
- package/dist/cjs/dial/dial-sink-service.d.ts +108 -0
- package/dist/cjs/dial/dial-sink-service.js +314 -0
- package/dist/cjs/dial/dial-sink-service.js.map +1 -0
- package/dist/cjs/dial/http.d.ts +40 -0
- package/dist/cjs/dial/http.js +172 -0
- package/dist/cjs/dial/http.js.map +1 -0
- package/dist/cjs/dial/index.d.ts +63 -0
- package/dist/cjs/dial/index.js +134 -0
- package/dist/cjs/dial/index.js.map +1 -0
- package/dist/cjs/dial/origins.d.ts +4 -0
- package/dist/cjs/dial/origins.js +36 -0
- package/dist/cjs/dial/origins.js.map +1 -0
- package/dist/cjs/dial/parse.d.ts +101 -0
- package/dist/cjs/dial/parse.js +296 -0
- package/dist/cjs/dial/parse.js.map +1 -0
- package/dist/cjs/dial/route-provider.d.ts +96 -0
- package/dist/cjs/dial/route-provider.js +376 -0
- package/dist/cjs/dial/route-provider.js.map +1 -0
- package/dist/cjs/dial/ssdp-socket.d.ts +34 -0
- package/dist/cjs/dial/ssdp-socket.js +72 -0
- package/dist/cjs/dial/ssdp-socket.js.map +1 -0
- package/dist/cjs/dial/xml.d.ts +13 -0
- package/dist/cjs/dial/xml.js +208 -0
- package/dist/cjs/dial/xml.js.map +1 -0
- package/dist/cjs/discovery/cast-discovery.d.ts +105 -0
- package/dist/cjs/discovery/cast-discovery.js +323 -0
- package/dist/cjs/discovery/cast-discovery.js.map +1 -0
- package/dist/cjs/discovery/device-cache.d.ts +54 -0
- package/dist/cjs/discovery/device-cache.js +240 -0
- package/dist/cjs/discovery/device-cache.js.map +1 -0
- package/dist/cjs/discovery/dns-packet.d.ts +70 -0
- package/dist/cjs/discovery/dns-packet.js +251 -0
- package/dist/cjs/discovery/dns-packet.js.map +1 -0
- package/dist/cjs/discovery/index.d.ts +5 -0
- package/dist/cjs/discovery/index.js +22 -0
- package/dist/cjs/discovery/index.js.map +1 -0
- package/dist/cjs/discovery/ip-policy.d.ts +20 -0
- package/dist/cjs/discovery/ip-policy.js +109 -0
- package/dist/cjs/discovery/ip-policy.js.map +1 -0
- package/dist/cjs/discovery/udp-socket.d.ts +19 -0
- package/dist/cjs/discovery/udp-socket.js +166 -0
- package/dist/cjs/discovery/udp-socket.js.map +1 -0
- package/dist/cjs/electron/access-code.d.ts +221 -0
- package/dist/cjs/electron/access-code.js +586 -0
- package/dist/cjs/electron/access-code.js.map +1 -0
- package/dist/cjs/electron/app-discovery.d.ts +82 -0
- package/dist/cjs/electron/app-discovery.js +219 -0
- package/dist/cjs/electron/app-discovery.js.map +1 -0
- package/dist/cjs/electron/default-presentation.d.ts +38 -0
- package/dist/cjs/electron/default-presentation.js +88 -0
- package/dist/cjs/electron/default-presentation.js.map +1 -0
- package/dist/cjs/electron/main.d.ts +173 -0
- package/dist/cjs/electron/main.js +990 -0
- package/dist/cjs/electron/main.js.map +1 -0
- package/dist/cjs/electron/manager-api.d.ts +314 -0
- package/dist/cjs/electron/manager-api.js +402 -0
- package/dist/cjs/electron/manager-api.js.map +1 -0
- package/dist/cjs/electron/media-controller.d.ts +79 -0
- package/dist/cjs/electron/media-controller.js +251 -0
- package/dist/cjs/electron/media-controller.js.map +1 -0
- package/dist/cjs/electron/network-monitor.d.ts +61 -0
- package/dist/cjs/electron/network-monitor.js +124 -0
- package/dist/cjs/electron/network-monitor.js.map +1 -0
- package/dist/cjs/electron/preload.d.ts +39 -0
- package/dist/cjs/electron/preload.js +96 -0
- package/dist/cjs/electron/preload.js.map +1 -0
- package/dist/cjs/electron/presentation-envelope.d.ts +60 -0
- package/dist/cjs/electron/presentation-envelope.js +318 -0
- package/dist/cjs/electron/presentation-envelope.js.map +1 -0
- package/dist/cjs/electron/presentation-handler.d.ts +135 -0
- package/dist/cjs/electron/presentation-handler.js +643 -0
- package/dist/cjs/electron/presentation-handler.js.map +1 -0
- package/dist/cjs/electron/presentation-source.d.ts +76 -0
- package/dist/cjs/electron/presentation-source.js +132 -0
- package/dist/cjs/electron/presentation-source.js.map +1 -0
- package/dist/cjs/electron/session-service.d.ts +348 -0
- package/dist/cjs/electron/session-service.js +1273 -0
- package/dist/cjs/electron/session-service.js.map +1 -0
- package/dist/cjs/electron/session-tracker.d.ts +82 -0
- package/dist/cjs/electron/session-tracker.js +225 -0
- package/dist/cjs/electron/session-tracker.js.map +1 -0
- package/dist/cjs/electron/sink-service.d.ts +246 -0
- package/dist/cjs/electron/sink-service.js +606 -0
- package/dist/cjs/electron/sink-service.js.map +1 -0
- package/dist/cjs/electron/wired-display/controller.d.ts +76 -0
- package/dist/cjs/electron/wired-display/controller.js +198 -0
- package/dist/cjs/electron/wired-display/controller.js.map +1 -0
- package/dist/cjs/electron/wired-display/displays.d.ts +44 -0
- package/dist/cjs/electron/wired-display/displays.js +98 -0
- package/dist/cjs/electron/wired-display/displays.js.map +1 -0
- package/dist/cjs/electron/wired-display/electron-windows.d.ts +111 -0
- package/dist/cjs/electron/wired-display/electron-windows.js +306 -0
- package/dist/cjs/electron/wired-display/electron-windows.js.map +1 -0
- package/dist/cjs/electron/wired-display/index.d.ts +90 -0
- package/dist/cjs/electron/wired-display/index.js +115 -0
- package/dist/cjs/electron/wired-display/index.js.map +1 -0
- package/dist/cjs/electron/wired-display/local-presentation.d.ts +98 -0
- package/dist/cjs/electron/wired-display/local-presentation.js +234 -0
- package/dist/cjs/electron/wired-display/local-presentation.js.map +1 -0
- package/dist/cjs/electron/wired-display/provider.d.ts +112 -0
- package/dist/cjs/electron/wired-display/provider.js +202 -0
- package/dist/cjs/electron/wired-display/provider.js.map +1 -0
- package/dist/cjs/index.d.ts +9 -0
- package/dist/cjs/index.js +27 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/mirroring/backend.d.ts +76 -0
- package/dist/cjs/mirroring/backend.js +21 -0
- package/dist/cjs/mirroring/backend.js.map +1 -0
- package/dist/cjs/mirroring/electron/agent-protocol.d.ts +158 -0
- package/dist/cjs/mirroring/electron/agent-protocol.js +11 -0
- package/dist/cjs/mirroring/electron/agent-protocol.js.map +1 -0
- package/dist/cjs/mirroring/electron/agent-source.d.ts +20 -0
- package/dist/cjs/mirroring/electron/agent-source.js +621 -0
- package/dist/cjs/mirroring/electron/agent-source.js.map +1 -0
- package/dist/cjs/mirroring/electron/engine-process.d.ts +87 -0
- package/dist/cjs/mirroring/electron/engine-process.js +81 -0
- package/dist/cjs/mirroring/electron/engine-process.js.map +1 -0
- package/dist/cjs/mirroring/electron/host.d.ts +89 -0
- package/dist/cjs/mirroring/electron/host.js +321 -0
- package/dist/cjs/mirroring/electron/host.js.map +1 -0
- package/dist/cjs/mirroring/electron/port-backend.d.ts +107 -0
- package/dist/cjs/mirroring/electron/port-backend.js +446 -0
- package/dist/cjs/mirroring/electron/port-backend.js.map +1 -0
- package/dist/cjs/mirroring/encoding-support.d.ts +66 -0
- package/dist/cjs/mirroring/encoding-support.js +89 -0
- package/dist/cjs/mirroring/encoding-support.js.map +1 -0
- package/dist/cjs/mirroring/engine.d.ts +16 -0
- package/dist/cjs/mirroring/engine.js +78 -0
- package/dist/cjs/mirroring/engine.js.map +1 -0
- package/dist/cjs/mirroring/mirror-settings.d.ts +101 -0
- package/dist/cjs/mirroring/mirror-settings.js +140 -0
- package/dist/cjs/mirroring/mirror-settings.js.map +1 -0
- package/dist/cjs/mirroring/mirroring-activity.d.ts +207 -0
- package/dist/cjs/mirroring/mirroring-activity.js +367 -0
- package/dist/cjs/mirroring/mirroring-activity.js.map +1 -0
- package/dist/cjs/mirroring/mirroring-manager.d.ts +134 -0
- package/dist/cjs/mirroring/mirroring-manager.js +286 -0
- package/dist/cjs/mirroring/mirroring-manager.js.map +1 -0
- package/dist/cjs/mirroring/protocol/answer.d.ts +87 -0
- package/dist/cjs/mirroring/protocol/answer.js +233 -0
- package/dist/cjs/mirroring/protocol/answer.js.map +1 -0
- package/dist/cjs/mirroring/protocol/constants.d.ts +64 -0
- package/dist/cjs/mirroring/protocol/constants.js +70 -0
- package/dist/cjs/mirroring/protocol/constants.js.map +1 -0
- package/dist/cjs/mirroring/protocol/errors.d.ts +25 -0
- package/dist/cjs/mirroring/protocol/errors.js +34 -0
- package/dist/cjs/mirroring/protocol/errors.js.map +1 -0
- package/dist/cjs/mirroring/protocol/frame-id.d.ts +9 -0
- package/dist/cjs/mirroring/protocol/frame-id.js +24 -0
- package/dist/cjs/mirroring/protocol/frame-id.js.map +1 -0
- package/dist/cjs/mirroring/protocol/messenger.d.ts +42 -0
- package/dist/cjs/mirroring/protocol/messenger.js +122 -0
- package/dist/cjs/mirroring/protocol/messenger.js.map +1 -0
- package/dist/cjs/mirroring/protocol/offer.d.ts +109 -0
- package/dist/cjs/mirroring/protocol/offer.js +192 -0
- package/dist/cjs/mirroring/protocol/offer.js.map +1 -0
- package/dist/cjs/mirroring/protocol/recommendations.d.ts +28 -0
- package/dist/cjs/mirroring/protocol/recommendations.js +103 -0
- package/dist/cjs/mirroring/protocol/recommendations.js.map +1 -0
- package/dist/cjs/mirroring/routing.d.ts +60 -0
- package/dist/cjs/mirroring/routing.js +147 -0
- package/dist/cjs/mirroring/routing.js.map +1 -0
- package/dist/cjs/mirroring/rtcp/ntp.d.ts +27 -0
- package/dist/cjs/mirroring/rtcp/ntp.js +62 -0
- package/dist/cjs/mirroring/rtcp/ntp.js.map +1 -0
- package/dist/cjs/mirroring/rtcp/parser.d.ts +50 -0
- package/dist/cjs/mirroring/rtcp/parser.js +270 -0
- package/dist/cjs/mirroring/rtcp/parser.js.map +1 -0
- package/dist/cjs/mirroring/rtcp/sender-report.d.ts +32 -0
- package/dist/cjs/mirroring/rtcp/sender-report.js +56 -0
- package/dist/cjs/mirroring/rtcp/sender-report.js.map +1 -0
- package/dist/cjs/mirroring/rtcp/wire.d.ts +54 -0
- package/dist/cjs/mirroring/rtcp/wire.js +73 -0
- package/dist/cjs/mirroring/rtcp/wire.js.map +1 -0
- package/dist/cjs/mirroring/rtp/frame-crypto.d.ts +11 -0
- package/dist/cjs/mirroring/rtp/frame-crypto.js +39 -0
- package/dist/cjs/mirroring/rtp/frame-crypto.js.map +1 -0
- package/dist/cjs/mirroring/rtp/frame.d.ts +23 -0
- package/dist/cjs/mirroring/rtp/frame.js +3 -0
- package/dist/cjs/mirroring/rtp/frame.js.map +1 -0
- package/dist/cjs/mirroring/rtp/packetizer.d.ts +27 -0
- package/dist/cjs/mirroring/rtp/packetizer.js +92 -0
- package/dist/cjs/mirroring/rtp/packetizer.js.map +1 -0
- package/dist/cjs/mirroring/sender/audio-sender.d.ts +23 -0
- package/dist/cjs/mirroring/sender/audio-sender.js +52 -0
- package/dist/cjs/mirroring/sender/audio-sender.js.map +1 -0
- package/dist/cjs/mirroring/sender/bandwidth-estimator.d.ts +26 -0
- package/dist/cjs/mirroring/sender/bandwidth-estimator.js +107 -0
- package/dist/cjs/mirroring/sender/bandwidth-estimator.js.map +1 -0
- package/dist/cjs/mirroring/sender/capture-size-oracle.d.ts +121 -0
- package/dist/cjs/mirroring/sender/capture-size-oracle.js +440 -0
- package/dist/cjs/mirroring/sender/capture-size-oracle.js.map +1 -0
- package/dist/cjs/mirroring/sender/frame-sender.d.ts +103 -0
- package/dist/cjs/mirroring/sender/frame-sender.js +217 -0
- package/dist/cjs/mirroring/sender/frame-sender.js.map +1 -0
- package/dist/cjs/mirroring/sender/packet-router.d.ts +74 -0
- package/dist/cjs/mirroring/sender/packet-router.js +196 -0
- package/dist/cjs/mirroring/sender/packet-router.js.map +1 -0
- package/dist/cjs/mirroring/sender/sender-session.d.ts +85 -0
- package/dist/cjs/mirroring/sender/sender-session.js +240 -0
- package/dist/cjs/mirroring/sender/sender-session.js.map +1 -0
- package/dist/cjs/mirroring/sender/sender.d.ts +120 -0
- package/dist/cjs/mirroring/sender/sender.js +457 -0
- package/dist/cjs/mirroring/sender/sender.js.map +1 -0
- package/dist/cjs/mirroring/sender/video-encoder-metrics.d.ts +29 -0
- package/dist/cjs/mirroring/sender/video-encoder-metrics.js +64 -0
- package/dist/cjs/mirroring/sender/video-encoder-metrics.js.map +1 -0
- package/dist/cjs/mirroring/sender/video-sender.d.ts +95 -0
- package/dist/cjs/mirroring/sender/video-sender.js +183 -0
- package/dist/cjs/mirroring/sender/video-sender.js.map +1 -0
- package/dist/cjs/mirroring/session-host.d.ts +185 -0
- package/dist/cjs/mirroring/session-host.js +630 -0
- package/dist/cjs/mirroring/session-host.js.map +1 -0
- package/dist/cjs/mirroring/stats/clock-offset-estimator.d.ts +11 -0
- package/dist/cjs/mirroring/stats/clock-offset-estimator.js +123 -0
- package/dist/cjs/mirroring/stats/clock-offset-estimator.js.map +1 -0
- package/dist/cjs/mirroring/stats/openscreen-stats-client.d.ts +12 -0
- package/dist/cjs/mirroring/stats/openscreen-stats-client.js +21 -0
- package/dist/cjs/mirroring/stats/openscreen-stats-client.js.map +1 -0
- package/dist/cjs/mirroring/stats/sorted-map.d.ts +23 -0
- package/dist/cjs/mirroring/stats/sorted-map.js +70 -0
- package/dist/cjs/mirroring/stats/sorted-map.js.map +1 -0
- package/dist/cjs/mirroring/stats/statistics-analyzer.d.ts +50 -0
- package/dist/cjs/mirroring/stats/statistics-analyzer.js +339 -0
- package/dist/cjs/mirroring/stats/statistics-analyzer.js.map +1 -0
- package/dist/cjs/mirroring/stats/statistics-collector.d.ts +29 -0
- package/dist/cjs/mirroring/stats/statistics-collector.js +53 -0
- package/dist/cjs/mirroring/stats/statistics-collector.js.map +1 -0
- package/dist/cjs/mirroring/stats/statistics-common.d.ts +61 -0
- package/dist/cjs/mirroring/stats/statistics-common.js +45 -0
- package/dist/cjs/mirroring/stats/statistics-common.js.map +1 -0
- package/dist/cjs/mirroring/stats/statistics-dispatcher.d.ts +28 -0
- package/dist/cjs/mirroring/stats/statistics-dispatcher.js +104 -0
- package/dist/cjs/mirroring/stats/statistics-dispatcher.js.map +1 -0
- package/dist/cjs/mirroring/stats/statistics.d.ts +84 -0
- package/dist/cjs/mirroring/stats/statistics.js +147 -0
- package/dist/cjs/mirroring/stats/statistics.js.map +1 -0
- package/dist/cjs/mirroring/transport/udp-environment.d.ts +40 -0
- package/dist/cjs/mirroring/transport/udp-environment.js +97 -0
- package/dist/cjs/mirroring/transport/udp-environment.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/polyfill/bridge-types.d.ts +97 -0
- package/dist/cjs/polyfill/bridge-types.js +3 -0
- package/dist/cjs/polyfill/bridge-types.js.map +1 -0
- package/dist/cjs/polyfill/install.d.ts +12 -0
- package/dist/cjs/polyfill/install.js +1569 -0
- package/dist/cjs/polyfill/install.js.map +1 -0
- package/dist/cjs/polyfill/presentation-receiver.d.ts +12 -0
- package/dist/cjs/polyfill/presentation-receiver.js +369 -0
- package/dist/cjs/polyfill/presentation-receiver.js.map +1 -0
- package/dist/cjs/polyfill/presentation-standin.d.ts +13 -0
- package/dist/cjs/polyfill/presentation-standin.js +421 -0
- package/dist/cjs/polyfill/presentation-standin.js.map +1 -0
- package/dist/cjs/protocol/cast-message.d.ts +20 -0
- package/dist/cjs/protocol/cast-message.js +171 -0
- package/dist/cjs/protocol/cast-message.js.map +1 -0
- package/dist/cjs/protocol/device-auth.d.ts +61 -0
- package/dist/cjs/protocol/device-auth.js +113 -0
- package/dist/cjs/protocol/device-auth.js.map +1 -0
- package/dist/cjs/protocol/errors.d.ts +4 -0
- package/dist/cjs/protocol/errors.js +12 -0
- package/dist/cjs/protocol/errors.js.map +1 -0
- package/dist/cjs/protocol/framing.d.ts +18 -0
- package/dist/cjs/protocol/framing.js +100 -0
- package/dist/cjs/protocol/framing.js.map +1 -0
- package/dist/cjs/protocol/index.d.ts +4 -0
- package/dist/cjs/protocol/index.js +21 -0
- package/dist/cjs/protocol/index.js.map +1 -0
- package/dist/cjs/protocol/proto-wire.d.ts +11 -0
- package/dist/cjs/protocol/proto-wire.js +64 -0
- package/dist/cjs/protocol/proto-wire.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +56 -0
- package/dist/cli.js.map +1 -0
- package/dist/client/auth/build-time.d.ts +7 -0
- package/dist/client/auth/build-time.js +8 -0
- package/dist/client/auth/build-time.js.map +1 -0
- package/dist/client/auth/cast-auth.d.ts +46 -0
- package/dist/client/auth/cast-auth.js +141 -0
- package/dist/client/auth/cast-auth.js.map +1 -0
- package/dist/client/auth/cast-cert-validator.d.ts +34 -0
- package/dist/client/auth/cast-cert-validator.js +86 -0
- package/dist/client/auth/cast-cert-validator.js.map +1 -0
- package/dist/client/auth/crl.d.ts +45 -0
- package/dist/client/auth/crl.js +221 -0
- package/dist/client/auth/crl.js.map +1 -0
- package/dist/client/auth/der.d.ts +62 -0
- package/dist/client/auth/der.js +196 -0
- package/dist/client/auth/der.js.map +1 -0
- package/dist/client/auth/names.d.ts +52 -0
- package/dist/client/auth/names.js +438 -0
- package/dist/client/auth/names.js.map +1 -0
- package/dist/client/auth/path-validator.d.ts +29 -0
- package/dist/client/auth/path-validator.js +417 -0
- package/dist/client/auth/path-validator.js.map +1 -0
- package/dist/client/auth/trust-data.d.ts +24 -0
- package/dist/client/auth/trust-data.js +94 -0
- package/dist/client/auth/trust-data.js.map +1 -0
- package/dist/client/auth/x509.d.ts +109 -0
- package/dist/client/auth/x509.js +430 -0
- package/dist/client/auth/x509.js.map +1 -0
- package/dist/client/cast-client.d.ts +20 -1
- package/dist/client/cast-client.js +74 -3
- package/dist/client/cast-client.js.map +1 -1
- package/dist/client/errors.d.ts +11 -0
- package/dist/client/errors.js +13 -0
- package/dist/client/errors.js.map +1 -1
- package/dist/client/index.d.ts +2 -0
- package/dist/dial/dial-registry.d.ts +104 -0
- package/dist/dial/dial-registry.js +297 -0
- package/dist/dial/dial-registry.js.map +1 -0
- package/dist/dial/dial-sink-service.d.ts +108 -0
- package/dist/dial/dial-sink-service.js +310 -0
- package/dist/dial/dial-sink-service.js.map +1 -0
- package/dist/dial/http.d.ts +40 -0
- package/dist/dial/http.js +165 -0
- package/dist/dial/http.js.map +1 -0
- package/dist/dial/index.d.ts +63 -0
- package/dist/dial/index.js +115 -0
- package/dist/dial/index.js.map +1 -0
- package/dist/dial/origins.d.ts +4 -0
- package/dist/dial/origins.js +32 -0
- package/dist/dial/origins.js.map +1 -0
- package/dist/dial/parse.d.ts +101 -0
- package/dist/dial/parse.js +281 -0
- package/dist/dial/parse.js.map +1 -0
- package/dist/dial/route-provider.d.ts +96 -0
- package/dist/dial/route-provider.js +369 -0
- package/dist/dial/route-provider.js.map +1 -0
- package/dist/dial/ssdp-socket.d.ts +34 -0
- package/dist/dial/ssdp-socket.js +65 -0
- package/dist/dial/ssdp-socket.js.map +1 -0
- package/dist/dial/xml.d.ts +13 -0
- package/dist/dial/xml.js +204 -0
- package/dist/dial/xml.js.map +1 -0
- package/dist/dial-test/cli-main.d.ts +17 -0
- package/dist/dial-test/cli-main.js +130 -0
- package/dist/dial-test/cli-main.js.map +1 -0
- package/dist/dial-test/report.d.ts +55 -0
- package/dist/dial-test/report.js +77 -0
- package/dist/dial-test/report.js.map +1 -0
- package/dist/dial-test/runner.d.ts +42 -0
- package/dist/dial-test/runner.js +566 -0
- package/dist/dial-test/runner.js.map +1 -0
- package/dist/dial-test/scrub.d.ts +14 -0
- package/dist/dial-test/scrub.js +73 -0
- package/dist/dial-test/scrub.js.map +1 -0
- package/dist/discovery/cast-discovery.d.ts +23 -2
- package/dist/discovery/cast-discovery.js +94 -14
- package/dist/discovery/cast-discovery.js.map +1 -1
- package/dist/discovery/device-cache.d.ts +15 -1
- package/dist/discovery/device-cache.js +31 -7
- package/dist/discovery/device-cache.js.map +1 -1
- package/dist/discovery/index.d.ts +1 -0
- package/dist/discovery/index.js +1 -0
- package/dist/discovery/index.js.map +1 -1
- package/dist/discovery/ip-policy.d.ts +20 -0
- package/dist/discovery/ip-policy.js +103 -0
- package/dist/discovery/ip-policy.js.map +1 -0
- package/dist/discovery/udp-socket.d.ts +8 -1
- package/dist/discovery/udp-socket.js +59 -5
- package/dist/discovery/udp-socket.js.map +1 -1
- package/dist/electron/access-code.d.ts +221 -0
- package/dist/electron/access-code.js +577 -0
- package/dist/electron/access-code.js.map +1 -0
- package/dist/electron/app-discovery.d.ts +82 -0
- package/dist/electron/app-discovery.js +215 -0
- package/dist/electron/app-discovery.js.map +1 -0
- package/dist/electron/default-presentation.d.ts +38 -0
- package/dist/electron/default-presentation.js +83 -0
- package/dist/electron/default-presentation.js.map +1 -0
- package/dist/electron/main.d.ts +122 -13
- package/dist/electron/main.js +776 -63
- package/dist/electron/main.js.map +1 -1
- package/dist/electron/manager-api.d.ts +314 -0
- package/dist/electron/manager-api.js +390 -0
- package/dist/electron/manager-api.js.map +1 -0
- package/dist/electron/media-controller.d.ts +79 -0
- package/dist/electron/media-controller.js +248 -0
- package/dist/electron/media-controller.js.map +1 -0
- package/dist/electron/network-monitor.d.ts +61 -0
- package/dist/electron/network-monitor.js +117 -0
- package/dist/electron/network-monitor.js.map +1 -0
- package/dist/electron/preload.d.ts +5 -0
- package/dist/electron/preload.js +9 -1
- package/dist/electron/preload.js.map +1 -1
- package/dist/electron/presentation-envelope.js +7 -1
- package/dist/electron/presentation-envelope.js.map +1 -1
- package/dist/electron/presentation-handler.d.ts +39 -4
- package/dist/electron/presentation-handler.js +208 -57
- package/dist/electron/presentation-handler.js.map +1 -1
- package/dist/electron/presentation-source.d.ts +76 -0
- package/dist/electron/presentation-source.js +125 -0
- package/dist/electron/presentation-source.js.map +1 -0
- package/dist/electron/session-service.d.ts +225 -10
- package/dist/electron/session-service.js +735 -151
- package/dist/electron/session-service.js.map +1 -1
- package/dist/electron/session-tracker.d.ts +82 -0
- package/dist/electron/session-tracker.js +219 -0
- package/dist/electron/session-tracker.js.map +1 -0
- package/dist/electron/sink-service.d.ts +246 -0
- package/dist/electron/sink-service.js +602 -0
- package/dist/electron/sink-service.js.map +1 -0
- package/dist/electron/wired-display/controller.d.ts +76 -0
- package/dist/electron/wired-display/controller.js +194 -0
- package/dist/electron/wired-display/controller.js.map +1 -0
- package/dist/electron/wired-display/displays.d.ts +44 -0
- package/dist/electron/wired-display/displays.js +91 -0
- package/dist/electron/wired-display/displays.js.map +1 -0
- package/dist/electron/wired-display/electron-windows.d.ts +111 -0
- package/dist/electron/wired-display/electron-windows.js +301 -0
- package/dist/electron/wired-display/electron-windows.js.map +1 -0
- package/dist/electron/wired-display/index.d.ts +90 -0
- package/dist/electron/wired-display/index.js +99 -0
- package/dist/electron/wired-display/index.js.map +1 -0
- package/dist/electron/wired-display/local-presentation.d.ts +98 -0
- package/dist/electron/wired-display/local-presentation.js +228 -0
- package/dist/electron/wired-display/local-presentation.js.map +1 -0
- package/dist/electron/wired-display/provider.d.ts +112 -0
- package/dist/electron/wired-display/provider.js +197 -0
- package/dist/electron/wired-display/provider.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mirroring/backend.d.ts +76 -0
- package/dist/mirroring/backend.js +18 -0
- package/dist/mirroring/backend.js.map +1 -0
- package/dist/mirroring/electron/agent-protocol.d.ts +158 -0
- package/dist/mirroring/electron/agent-protocol.js +10 -0
- package/dist/mirroring/electron/agent-protocol.js.map +1 -0
- package/dist/mirroring/electron/agent-source.d.ts +20 -0
- package/dist/mirroring/electron/agent-source.js +618 -0
- package/dist/mirroring/electron/agent-source.js.map +1 -0
- package/dist/mirroring/electron/engine-process.d.ts +87 -0
- package/dist/mirroring/electron/engine-process.js +78 -0
- package/dist/mirroring/electron/engine-process.js.map +1 -0
- package/dist/mirroring/electron/host.d.ts +89 -0
- package/dist/mirroring/electron/host.js +318 -0
- package/dist/mirroring/electron/host.js.map +1 -0
- package/dist/mirroring/electron/port-backend.d.ts +107 -0
- package/dist/mirroring/electron/port-backend.js +441 -0
- package/dist/mirroring/electron/port-backend.js.map +1 -0
- package/dist/mirroring/encoding-support.d.ts +66 -0
- package/dist/mirroring/encoding-support.js +81 -0
- package/dist/mirroring/encoding-support.js.map +1 -0
- package/dist/mirroring/engine.d.ts +16 -0
- package/dist/mirroring/engine.js +75 -0
- package/dist/mirroring/engine.js.map +1 -0
- package/dist/mirroring/mirror-settings.d.ts +101 -0
- package/dist/mirroring/mirror-settings.js +134 -0
- package/dist/mirroring/mirror-settings.js.map +1 -0
- package/dist/mirroring/mirroring-activity.d.ts +207 -0
- package/dist/mirroring/mirroring-activity.js +362 -0
- package/dist/mirroring/mirroring-activity.js.map +1 -0
- package/dist/mirroring/mirroring-manager.d.ts +134 -0
- package/dist/mirroring/mirroring-manager.js +281 -0
- package/dist/mirroring/mirroring-manager.js.map +1 -0
- package/dist/mirroring/protocol/answer.d.ts +87 -0
- package/dist/mirroring/protocol/answer.js +226 -0
- package/dist/mirroring/protocol/answer.js.map +1 -0
- package/dist/mirroring/protocol/constants.d.ts +64 -0
- package/dist/mirroring/protocol/constants.js +66 -0
- package/dist/mirroring/protocol/constants.js.map +1 -0
- package/dist/mirroring/protocol/errors.d.ts +25 -0
- package/dist/mirroring/protocol/errors.js +29 -0
- package/dist/mirroring/protocol/errors.js.map +1 -0
- package/dist/mirroring/protocol/frame-id.d.ts +9 -0
- package/dist/mirroring/protocol/frame-id.js +20 -0
- package/dist/mirroring/protocol/frame-id.js.map +1 -0
- package/dist/mirroring/protocol/messenger.d.ts +42 -0
- package/dist/mirroring/protocol/messenger.js +118 -0
- package/dist/mirroring/protocol/messenger.js.map +1 -0
- package/dist/mirroring/protocol/offer.d.ts +109 -0
- package/dist/mirroring/protocol/offer.js +176 -0
- package/dist/mirroring/protocol/offer.js.map +1 -0
- package/dist/mirroring/protocol/recommendations.d.ts +28 -0
- package/dist/mirroring/protocol/recommendations.js +99 -0
- package/dist/mirroring/protocol/recommendations.js.map +1 -0
- package/dist/mirroring/routing.d.ts +60 -0
- package/dist/mirroring/routing.js +130 -0
- package/dist/mirroring/routing.js.map +1 -0
- package/dist/mirroring/rtcp/ntp.d.ts +27 -0
- package/dist/mirroring/rtcp/ntp.js +57 -0
- package/dist/mirroring/rtcp/ntp.js.map +1 -0
- package/dist/mirroring/rtcp/parser.d.ts +50 -0
- package/dist/mirroring/rtcp/parser.js +265 -0
- package/dist/mirroring/rtcp/parser.js.map +1 -0
- package/dist/mirroring/rtcp/sender-report.d.ts +32 -0
- package/dist/mirroring/rtcp/sender-report.js +51 -0
- package/dist/mirroring/rtcp/sender-report.js.map +1 -0
- package/dist/mirroring/rtcp/wire.d.ts +54 -0
- package/dist/mirroring/rtcp/wire.js +68 -0
- package/dist/mirroring/rtcp/wire.js.map +1 -0
- package/dist/mirroring/rtp/frame-crypto.d.ts +11 -0
- package/dist/mirroring/rtp/frame-crypto.js +35 -0
- package/dist/mirroring/rtp/frame-crypto.js.map +1 -0
- package/dist/mirroring/rtp/frame.d.ts +23 -0
- package/dist/mirroring/rtp/frame.js +2 -0
- package/dist/mirroring/rtp/frame.js.map +1 -0
- package/dist/mirroring/rtp/packetizer.d.ts +27 -0
- package/dist/mirroring/rtp/packetizer.js +88 -0
- package/dist/mirroring/rtp/packetizer.js.map +1 -0
- package/dist/mirroring/sender/audio-sender.d.ts +23 -0
- package/dist/mirroring/sender/audio-sender.js +54 -0
- package/dist/mirroring/sender/audio-sender.js.map +1 -0
- package/dist/mirroring/sender/bandwidth-estimator.d.ts +26 -0
- package/dist/mirroring/sender/bandwidth-estimator.js +103 -0
- package/dist/mirroring/sender/bandwidth-estimator.js.map +1 -0
- package/dist/mirroring/sender/capture-size-oracle.d.ts +121 -0
- package/dist/mirroring/sender/capture-size-oracle.js +433 -0
- package/dist/mirroring/sender/capture-size-oracle.js.map +1 -0
- package/dist/mirroring/sender/frame-sender.d.ts +103 -0
- package/dist/mirroring/sender/frame-sender.js +212 -0
- package/dist/mirroring/sender/frame-sender.js.map +1 -0
- package/dist/mirroring/sender/packet-router.d.ts +74 -0
- package/dist/mirroring/sender/packet-router.js +191 -0
- package/dist/mirroring/sender/packet-router.js.map +1 -0
- package/dist/mirroring/sender/sender-session.d.ts +85 -0
- package/dist/mirroring/sender/sender-session.js +235 -0
- package/dist/mirroring/sender/sender-session.js.map +1 -0
- package/dist/mirroring/sender/sender.d.ts +120 -0
- package/dist/mirroring/sender/sender.js +452 -0
- package/dist/mirroring/sender/sender.js.map +1 -0
- package/dist/mirroring/sender/video-encoder-metrics.d.ts +29 -0
- package/dist/mirroring/sender/video-encoder-metrics.js +58 -0
- package/dist/mirroring/sender/video-encoder-metrics.js.map +1 -0
- package/dist/mirroring/sender/video-sender.d.ts +95 -0
- package/dist/mirroring/sender/video-sender.js +190 -0
- package/dist/mirroring/sender/video-sender.js.map +1 -0
- package/dist/mirroring/session-host.d.ts +185 -0
- package/dist/mirroring/session-host.js +625 -0
- package/dist/mirroring/session-host.js.map +1 -0
- package/dist/mirroring/stats/clock-offset-estimator.d.ts +11 -0
- package/dist/mirroring/stats/clock-offset-estimator.js +120 -0
- package/dist/mirroring/stats/clock-offset-estimator.js.map +1 -0
- package/dist/mirroring/stats/openscreen-stats-client.d.ts +12 -0
- package/dist/mirroring/stats/openscreen-stats-client.js +17 -0
- package/dist/mirroring/stats/openscreen-stats-client.js.map +1 -0
- package/dist/mirroring/stats/sorted-map.d.ts +23 -0
- package/dist/mirroring/stats/sorted-map.js +66 -0
- package/dist/mirroring/stats/sorted-map.js.map +1 -0
- package/dist/mirroring/stats/statistics-analyzer.d.ts +50 -0
- package/dist/mirroring/stats/statistics-analyzer.js +335 -0
- package/dist/mirroring/stats/statistics-analyzer.js.map +1 -0
- package/dist/mirroring/stats/statistics-collector.d.ts +29 -0
- package/dist/mirroring/stats/statistics-collector.js +49 -0
- package/dist/mirroring/stats/statistics-collector.js.map +1 -0
- package/dist/mirroring/stats/statistics-common.d.ts +61 -0
- package/dist/mirroring/stats/statistics-common.js +39 -0
- package/dist/mirroring/stats/statistics-common.js.map +1 -0
- package/dist/mirroring/stats/statistics-dispatcher.d.ts +28 -0
- package/dist/mirroring/stats/statistics-dispatcher.js +100 -0
- package/dist/mirroring/stats/statistics-dispatcher.js.map +1 -0
- package/dist/mirroring/stats/statistics.d.ts +84 -0
- package/dist/mirroring/stats/statistics.js +141 -0
- package/dist/mirroring/stats/statistics.js.map +1 -0
- package/dist/mirroring/transport/udp-environment.d.ts +40 -0
- package/dist/mirroring/transport/udp-environment.js +93 -0
- package/dist/mirroring/transport/udp-environment.js.map +1 -0
- package/dist/polyfill/bridge-types.d.ts +11 -0
- package/dist/polyfill/presentation-receiver.d.ts +12 -0
- package/dist/polyfill/presentation-receiver.js +366 -0
- package/dist/polyfill/presentation-receiver.js.map +1 -0
- package/dist/polyfill/presentation-standin.js +160 -17
- package/dist/polyfill/presentation-standin.js.map +1 -1
- package/dist/protocol/device-auth.d.ts +61 -0
- package/dist/protocol/device-auth.js +106 -0
- package/dist/protocol/device-auth.js.map +1 -0
- package/dist/protocol/framing.d.ts +1 -1
- package/dist/protocol/framing.js +1 -1
- package/dist/protocol/framing.js.map +1 -1
- package/dist/protocol/index.d.ts +1 -0
- package/dist/protocol/index.js +1 -0
- package/dist/protocol/index.js.map +1 -1
- package/dist/protocol/proto-wire.d.ts +11 -0
- package/dist/protocol/proto-wire.js +60 -0
- package/dist/protocol/proto-wire.js.map +1 -0
- package/docs/API.md +724 -0
- package/docs/ARCHITECTURE.md +242 -0
- package/docs/CHROMIUM-MAP.md +176 -0
- package/docs/DESIGN.md +1189 -0
- package/docs/FAQ.md +123 -0
- package/docs/GETTING-STARTED.md +248 -0
- package/docs/MAIN-API.md +524 -0
- package/docs/TROUBLESHOOTING.md +283 -0
- package/docs/guides/audio-and-groups.md +75 -0
- package/docs/guides/custom-receivers.md +109 -0
- package/docs/guides/device-authentication.md +145 -0
- package/docs/guides/device-picker.md +176 -0
- package/docs/guides/index.md +17 -0
- package/docs/guides/low-level-client.md +103 -0
- package/docs/guides/restart-rejoin.md +172 -0
- package/docs/guides/testing.md +162 -0
- package/docs/guides/windows-and-iframes.md +116 -0
- package/docs/readme/badges/dependencies.svg +1 -0
- package/docs/readme/badges/electron.svg +1 -0
- package/docs/readme/badges/license.svg +1 -0
- package/docs/readme/badges/node.svg +1 -0
- package/docs/readme/board.jpg +0 -0
- package/docs/readme/hero-dark.jpg +0 -0
- package/docs/readme/hero-light.jpg +0 -0
- package/docs/readme/nosignal.jpg +0 -0
- package/docs/readme/parity.jpg +0 -0
- package/docs/readme/trace.svg +22 -0
- package/package.json +67 -16
- package/src/cli.ts +57 -0
- package/src/client/auth/build-time.ts +7 -0
- package/src/client/auth/cast-auth.ts +186 -0
- package/src/client/auth/cast-cert-validator.ts +133 -0
- package/src/client/auth/crl.ts +228 -0
- package/src/client/auth/der.ts +193 -0
- package/src/client/auth/names.ts +411 -0
- package/src/client/auth/path-validator.ts +449 -0
- package/src/client/auth/trust-data.ts +95 -0
- package/src/client/auth/x509.ts +488 -0
- package/src/client/cast-client.ts +85 -3
- package/src/client/errors.ts +29 -0
- package/src/client/index.ts +2 -0
- package/src/dial/dial-registry.ts +316 -0
- package/src/dial/dial-sink-service.ts +343 -0
- package/src/dial/http.ts +200 -0
- package/src/dial/index.ts +135 -0
- package/src/dial/origins.ts +31 -0
- package/src/dial/parse.ts +319 -0
- package/src/dial/route-provider.ts +429 -0
- package/src/dial/ssdp-socket.ts +79 -0
- package/src/dial/xml.ts +180 -0
- package/src/dial-test/cli-main.ts +146 -0
- package/src/dial-test/report.ts +109 -0
- package/src/dial-test/runner.ts +615 -0
- package/src/dial-test/scrub.ts +74 -0
- package/src/discovery/cast-discovery.ts +106 -19
- package/src/discovery/device-cache.ts +43 -8
- package/src/discovery/index.ts +1 -0
- package/src/discovery/ip-policy.ts +97 -0
- package/src/discovery/udp-socket.ts +66 -4
- package/src/electron/access-code.ts +681 -0
- package/src/electron/app-discovery.ts +244 -0
- package/src/electron/default-presentation.ts +104 -0
- package/src/electron/main.ts +866 -72
- package/src/electron/manager-api.ts +664 -0
- package/src/electron/media-controller.ts +313 -0
- package/src/electron/network-monitor.ts +140 -0
- package/src/electron/preload.ts +16 -2
- package/src/electron/presentation-envelope.ts +7 -1
- package/src/electron/presentation-handler.ts +211 -58
- package/src/electron/presentation-source.ts +155 -0
- package/src/electron/session-service.ts +808 -149
- package/src/electron/session-tracker.ts +248 -0
- package/src/electron/sink-service.ts +726 -0
- package/src/electron/wired-display/controller.ts +212 -0
- package/src/electron/wired-display/displays.ts +107 -0
- package/src/electron/wired-display/electron-windows.ts +386 -0
- package/src/electron/wired-display/index.ts +181 -0
- package/src/electron/wired-display/local-presentation.ts +286 -0
- package/src/electron/wired-display/provider.ts +276 -0
- package/src/index.ts +1 -0
- package/src/mirroring/backend.ts +103 -0
- package/src/mirroring/electron/agent-protocol.ts +84 -0
- package/src/mirroring/electron/agent-source.ts +619 -0
- package/src/mirroring/electron/engine-process.ts +131 -0
- package/src/mirroring/electron/host.ts +361 -0
- package/src/mirroring/electron/port-backend.ts +466 -0
- package/src/mirroring/encoding-support.ts +146 -0
- package/src/mirroring/engine.ts +91 -0
- package/src/mirroring/mirror-settings.ts +174 -0
- package/src/mirroring/mirroring-activity.ts +466 -0
- package/src/mirroring/mirroring-manager.ts +342 -0
- package/src/mirroring/protocol/answer.ts +285 -0
- package/src/mirroring/protocol/constants.ts +75 -0
- package/src/mirroring/protocol/errors.ts +36 -0
- package/src/mirroring/protocol/frame-id.ts +20 -0
- package/src/mirroring/protocol/messenger.ts +128 -0
- package/src/mirroring/protocol/offer.ts +275 -0
- package/src/mirroring/protocol/recommendations.ts +135 -0
- package/src/mirroring/routing.ts +160 -0
- package/src/mirroring/rtcp/ntp.ts +61 -0
- package/src/mirroring/rtcp/parser.ts +292 -0
- package/src/mirroring/rtcp/sender-report.ts +88 -0
- package/src/mirroring/rtcp/wire.ts +76 -0
- package/src/mirroring/rtp/frame-crypto.ts +38 -0
- package/src/mirroring/rtp/frame.ts +25 -0
- package/src/mirroring/rtp/packetizer.ts +95 -0
- package/src/mirroring/sender/audio-sender.ts +59 -0
- package/src/mirroring/sender/bandwidth-estimator.ts +111 -0
- package/src/mirroring/sender/capture-size-oracle.ts +476 -0
- package/src/mirroring/sender/frame-sender.ts +293 -0
- package/src/mirroring/sender/packet-router.ts +228 -0
- package/src/mirroring/sender/sender-session.ts +306 -0
- package/src/mirroring/sender/sender.ts +497 -0
- package/src/mirroring/sender/video-encoder-metrics.ts +64 -0
- package/src/mirroring/sender/video-sender.ts +243 -0
- package/src/mirroring/session-host.ts +725 -0
- package/src/mirroring/stats/clock-offset-estimator.ts +139 -0
- package/src/mirroring/stats/openscreen-stats-client.ts +19 -0
- package/src/mirroring/stats/sorted-map.ts +68 -0
- package/src/mirroring/stats/statistics-analyzer.ts +388 -0
- package/src/mirroring/stats/statistics-collector.ts +69 -0
- package/src/mirroring/stats/statistics-common.ts +112 -0
- package/src/mirroring/stats/statistics-dispatcher.ts +133 -0
- package/src/mirroring/stats/statistics.ts +170 -0
- package/src/mirroring/transport/udp-environment.ts +100 -0
- package/src/polyfill/bridge-types.ts +11 -0
- package/src/polyfill/presentation-receiver.ts +350 -0
- package/src/polyfill/presentation-standin.ts +150 -17
- package/src/protocol/device-auth.ts +126 -0
- package/src/protocol/framing.ts +1 -1
- package/src/protocol/index.ts +1 -0
- package/src/protocol/proto-wire.ts +55 -0
package/docs/FAQ.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# FAQ
|
|
2
|
+
|
|
3
|
+
Short answers to the questions people ask first, with links to the page that has the detail.
|
|
4
|
+
|
|
5
|
+
## What is electron-cast, in one paragraph?
|
|
6
|
+
|
|
7
|
+
Chrome can cast because it has a Media Router behind the Presentation API. Electron has the API but no router, so Google's Cast
|
|
8
|
+
sender SDK finds no devices. electron-cast supplies the missing router: a stand-in Presentation API in the page, and in your main
|
|
9
|
+
process mDNS discovery, a picker hook, the Cast v2 channel, device authentication and the message envelope Chrome's Media Router
|
|
10
|
+
speaks to the SDK. The page runs Google's own, unmodified SDK. [Architecture](ARCHITECTURE.md) draws it.
|
|
11
|
+
|
|
12
|
+
## Does the page need electron-cast code or a special SDK?
|
|
13
|
+
|
|
14
|
+
No. The page loads Google's `cast_sender.js` from `www.gstatic.com` as it would in Chrome. electron-cast never replaces or bundles
|
|
15
|
+
Google's SDK; it only provides what the SDK expects to find. That also means the SDK needs internet access, and your
|
|
16
|
+
[CSP](GETTING-STARTED.md#5-content-security-policy) has to allow it.
|
|
17
|
+
|
|
18
|
+
## Does it only work for YouTube Music?
|
|
19
|
+
|
|
20
|
+
No, and nothing YouTube-specific is in the library. Casting was tested end to end in an Electron 45 app that loads
|
|
21
|
+
YouTube Music; the example app casts to the Default Media Receiver from its own page. Any page that uses Google's Cast
|
|
22
|
+
SDK should work ([custom receivers](guides/custom-receivers.md)); what has been tested is stated in the [README](../README.md#platforms-and-what-was-tested).
|
|
23
|
+
|
|
24
|
+
## Which Electron, Node and operating systems?
|
|
25
|
+
|
|
26
|
+
Electron 35 or later (the preload needs `contextBridge.executeInMainWorld`), Node 20 or later. Real devices have been used end
|
|
27
|
+
to end from Windows and from Linux (Ubuntu under WSL2 with mirrored networking), with Electron 45: casting, rejoin after the app
|
|
28
|
+
was force-killed, and stop, in dev and packaged builds. macOS has not been tried against a real device. The [README](../README.md#platforms-and-what-was-tested) lists exactly what was
|
|
29
|
+
run.
|
|
30
|
+
|
|
31
|
+
## Does it work with `sandbox: true` and `contextIsolation: true`?
|
|
32
|
+
|
|
33
|
+
Yes, that is the supported configuration. The page never gets Node, sockets or an IPC handle. A sandboxed preload cannot load
|
|
34
|
+
other files, so you have to bundle `electron-cast/preload` into it ([how](GETTING-STARTED.md#2-the-preload)).
|
|
35
|
+
|
|
36
|
+
## What network access does it use?
|
|
37
|
+
|
|
38
|
+
Multicast DNS queries on your local networks (UDP 5353) to find devices, and, as in Chrome, one TLS connection (usually port 8009)
|
|
39
|
+
to each device found at a private or link-local address, kept open with a ping every 5 s, so the device can be authenticated
|
|
40
|
+
before it is listed and its sessions followed. Device authentication needs no network: Google's Cast roots and a fallback revocation list ship in the package. It
|
|
41
|
+
makes no other connection, advertises nothing, and answers no queries. `manager.start()` is what opens the sockets; nothing
|
|
42
|
+
happens before it. See [SECURITY.md](../SECURITY.md#mdns-exposure).
|
|
43
|
+
|
|
44
|
+
## Can I start a cast from my app's menu or tray?
|
|
45
|
+
|
|
46
|
+
Yes, the way Chrome's Cast dialog does it: when the page has set `navigator.presentation.defaultRequest`, the app calls
|
|
47
|
+
`manager.startCasting(sinkId, { webContentsId })` from its menu or tray, with no picker and no user gesture, and the page gets
|
|
48
|
+
`connectionavailable` (Google's SDK adopts the session). A page that sets no default request has nothing to start; tell it to
|
|
49
|
+
press its own Cast button instead. See the [main-process API](MAIN-API.md#casting-from-the-apps-own-ui).
|
|
50
|
+
|
|
51
|
+
## Can I control playback (play, pause, seek) from the main process?
|
|
52
|
+
|
|
53
|
+
Yes. `manager.getMediaController(routeId, observer?)` is Chrome's `MediaController` for a route: `play`, `pause`, `seek`,
|
|
54
|
+
`nextTrack`, `previousTrack`, `setVolume`, `setMute`, and the media status (title, play state, position, what the media can do).
|
|
55
|
+
It works on sessions other senders started too. That is also how to build your own version of Chrome's toolbar media panel
|
|
56
|
+
(Global Media Controls, browser UI that electron-cast leaves to the app): `registerMediaRoutesObserver` for the list,
|
|
57
|
+
`getMediaController` for each route, `terminateRoute` for Stop. See [MAIN-API](MAIN-API.md#media-control).
|
|
58
|
+
|
|
59
|
+
## Can it mirror a tab or the desktop?
|
|
60
|
+
|
|
61
|
+
Not yet. Mirroring is in progress; until it lands, a mirroring source is reported unavailable. The Remote Playback API
|
|
62
|
+
(`video.remote`) needs support in Electron itself, so `remote-playback:` sources are reported unavailable. See the
|
|
63
|
+
[parity table](../README.md#chrome-parity).
|
|
64
|
+
|
|
65
|
+
## Why is the device list empty right after `start()`?
|
|
66
|
+
|
|
67
|
+
As in Chrome, a device is listed only once a channel to it is open and has passed device authentication. Channels open after a
|
|
68
|
+
random delay of up to 5 s, and the list is reported once it has been quiet for 3 s, so it fills in a few seconds after
|
|
69
|
+
`start()`. A device that is not Google-certified, or has been revoked, is never listed. A picker that
|
|
70
|
+
[updates live](guides/device-picker.md#a-picker-window-with-live-updates) shows devices as they come. See [Device authentication](guides/device-authentication.md).
|
|
71
|
+
|
|
72
|
+
## The app restarted and the cast was still playing. Why did it not come back by itself?
|
|
73
|
+
|
|
74
|
+
Like Chrome, auto-join only joins sessions this run started. The session is listed as a non-local route as soon as its device's
|
|
75
|
+
channel is open, but the page has to ask for it: after a restart the app gives the page the old session id and the page calls
|
|
76
|
+
`chrome.cast.requestSessionById`. [Recipe](guides/restart-rejoin.md), with a worked example.
|
|
77
|
+
|
|
78
|
+
## What is `mode: "chromecast"`?
|
|
79
|
+
|
|
80
|
+
The original design, kept as a **frozen** fallback: electron-cast's own implementation of `chrome.cast`, `chrome.cast.media` and
|
|
81
|
+
`cast.framework`, which blocks Google's loader scripts so they cannot replace it. It gets no new features and is not recommended
|
|
82
|
+
for new code. Use it only for a page that calls `chrome.cast` without loading Google's script, or if Google's script ever stops
|
|
83
|
+
working on the stand-in.
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
import { contextBridge, ipcRenderer } from "electron";
|
|
87
|
+
import { installCastBridge } from "electron-cast/preload";
|
|
88
|
+
|
|
89
|
+
installCastBridge({ contextBridge, ipcRenderer, mode: "chromecast" });
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
How it differs from the default: no user-gesture check, main frame only (a call from an iframe is refused), no rejoin by id after a
|
|
93
|
+
restart, and its errors are `chrome.cast.ErrorCode` values. It was tested end to end with a Chromecast (YouTube Music) and with
|
|
94
|
+
`cast.framework` media on a Nest Hub (load, play, pause, seek, volume, and stopping from the picker). The manager serves both modes;
|
|
95
|
+
`createCastManager({ presentation: false })` serves only this one. The [API reference](API.md#installchromecastbridgekey) documents
|
|
96
|
+
what it installs.
|
|
97
|
+
|
|
98
|
+
## How do I know electron-cast matches Chrome?
|
|
99
|
+
|
|
100
|
+
Where it copies a rule, the code and the docs cite the Chromium source it comes from, and the citations are checked against the
|
|
101
|
+
Chromium tree. [The Chromium map](CHROMIUM-MAP.md) lists each module with the files and functions it mirrors, and the places it
|
|
102
|
+
differs on purpose.
|
|
103
|
+
|
|
104
|
+
## What happens when Google changes the SDK?
|
|
105
|
+
|
|
106
|
+
The page runs Google's SDK, which Google can change per Chrome major without an electron-cast release. A weekly job (`npm run canary`)
|
|
107
|
+
downloads the SDK for Chrome stable, beta and dev, and the Chromium in Electron 45, and checks as text, without running it, that it
|
|
108
|
+
still uses what electron-cast translates. A failure opens an issue. See [CONTRIBUTING](../CONTRIBUTING.md#the-sdk-canary).
|
|
109
|
+
|
|
110
|
+
## Is it safe to let a page cast?
|
|
111
|
+
|
|
112
|
+
The model is: the page is not trusted, the main process is. A page can only use a narrow bridge; it cannot choose a device, host or
|
|
113
|
+
port; only a device your `selectDevice` returned can be connected to; and a device must prove it is Google-certified first. Set
|
|
114
|
+
`allowOrigin`. Read [SECURITY.md](../SECURITY.md).
|
|
115
|
+
|
|
116
|
+
## What does it cost to add?
|
|
117
|
+
|
|
118
|
+
No runtime dependencies and no native modules. The package ships TypeScript sources, ES module and CommonJS builds and type
|
|
119
|
+
declarations.
|
|
120
|
+
|
|
121
|
+
## It does not work. Where do I start?
|
|
122
|
+
|
|
123
|
+
[Troubleshooting](TROUBLESHOOTING.md), beginning with the script that lists what discovery sees.
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
# Getting started
|
|
2
|
+
|
|
3
|
+
A step-by-step setup of electron-cast in an Electron app, from install to a packaged build on Windows, macOS and Linux.
|
|
4
|
+
|
|
5
|
+
If you would rather read a working app first, [examples/electron-app](../examples/electron-app) is the same setup in
|
|
6
|
+
about 100 lines: a manager, a bundled sandboxed preload, and a page that loads Google's Cast SDK.
|
|
7
|
+
|
|
8
|
+
## 0. Before you start
|
|
9
|
+
|
|
10
|
+
- **Electron 35 or later.** The preload uses `contextBridge.executeInMainWorld`, added in Electron 35 (the preload
|
|
11
|
+
fails on 34). Electron is an optional peer dependency: electron-cast never imports it, you pass `ipcMain`,
|
|
12
|
+
`contextBridge` and `ipcRenderer` in.
|
|
13
|
+
- **Node 20 or later.** No native modules and no runtime dependencies, so there is nothing to rebuild per platform.
|
|
14
|
+
- **A page that uses Google's Cast sender SDK.** That is a site you load (YouTube Music, say) or your own page. electron-cast
|
|
15
|
+
does not ship a cast button or UI; the SDK's `<google-cast-launcher>` is the button and you supply the device picker.
|
|
16
|
+
- **A Cast device on the same network** to try it. Without one the SDK's button stays hidden.
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
npm install electron-cast
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The package ships an ES module build and a CommonJS build. `import` and `require` both work for every entry point
|
|
23
|
+
(`electron-cast/main`, `electron-cast/preload`, `electron-cast/polyfill` and the root).
|
|
24
|
+
|
|
25
|
+
## 1. The main process
|
|
26
|
+
|
|
27
|
+
Create one manager per app, before any window that should cast. It registers the IPC handlers and creates discovery;
|
|
28
|
+
nothing touches the network until you call `start()`.
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { app, ipcMain, Menu } from "electron";
|
|
32
|
+
import { createCastManager } from "electron-cast/main";
|
|
33
|
+
|
|
34
|
+
const cast = createCastManager({
|
|
35
|
+
ipcMain,
|
|
36
|
+
allowOrigin: (origin) => origin === "https://music.youtube.com",
|
|
37
|
+
selectDevice: (devices) =>
|
|
38
|
+
new Promise((resolve) => {
|
|
39
|
+
let picked = false;
|
|
40
|
+
Menu.buildFromTemplate(
|
|
41
|
+
devices.map((d) => ({ label: d.name, sublabel: d.model, click: () => ((picked = true), resolve(d)) })),
|
|
42
|
+
).popup({ callback: () => setTimeout(() => picked || resolve(null), 100) });
|
|
43
|
+
}),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
app.whenReady().then(async () => {
|
|
47
|
+
await cast.start();
|
|
48
|
+
// create your windows
|
|
49
|
+
});
|
|
50
|
+
app.on("will-quit", () => void cast.dispose());
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Three decisions are yours here:
|
|
54
|
+
|
|
55
|
+
- **Which pages may cast: `allowOrigin`.** It is checked on every call from a page, with the origin of the calling
|
|
56
|
+
frame. Without it every page in a window that has the preload can cast. Compare exact origins, never `endsWith` or
|
|
57
|
+
`includes` ([SECURITY.md](../SECURITY.md#alloworigin)). A page loaded from `file:` has an opaque origin that
|
|
58
|
+
`allowOrigin` cannot name usefully; serve it over `http://127.0.0.1` or a custom standard scheme, as the example app
|
|
59
|
+
does.
|
|
60
|
+
- **How the user picks a device: `selectDevice`.** Called when the page asks to start a session, with the devices that
|
|
61
|
+
can serve the request. Resolve a `CastDevice`, `null` to cancel, or `"stop"` to stop the sender's current session.
|
|
62
|
+
The menu above is the smallest possible picker; [Building your own device picker](guides/device-picker.md) shows a
|
|
63
|
+
window with live updates.
|
|
64
|
+
- **When discovery runs.** `await cast.start()` opens an mDNS socket on each network interface, then, as in Chrome, a
|
|
65
|
+
kept-open channel to each device found; a device is listed once its channel is open and authenticated, so the list
|
|
66
|
+
fills in a few seconds after `start()`. Call it at startup, or later if casting is a setting that is off by default. `await cast.dispose()` stops everything and cannot be undone;
|
|
67
|
+
create a new manager to turn casting back on.
|
|
68
|
+
|
|
69
|
+
Do not write a top-level `await app.whenReady()` in an ES module main process: on Electron 45 it never resolves
|
|
70
|
+
([why](TROUBLESHOOTING.md#the-app-hangs-at-top-level-await-appwhenready-electron-45)). Use `.then(...)` as above.
|
|
71
|
+
|
|
72
|
+
A CommonJS main works the same way:
|
|
73
|
+
|
|
74
|
+
```js
|
|
75
|
+
const { app, ipcMain } = require("electron");
|
|
76
|
+
const { createCastManager } = require("electron-cast/main");
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## 2. The preload
|
|
80
|
+
|
|
81
|
+
The preload is the page's only way to reach the main process. Call `installCastBridge` once:
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
import { contextBridge, ipcRenderer } from "electron";
|
|
85
|
+
import { installCastBridge } from "electron-cast/preload";
|
|
86
|
+
|
|
87
|
+
installCastBridge({ contextBridge, ipcRenderer });
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
It exposes a small bridge object to the page's main world and, before the page's scripts run, installs a stand-in
|
|
91
|
+
Presentation API (`PresentationRequest`, `PresentationConnection`, `PresentationAvailability`,
|
|
92
|
+
`navigator.presentation`) backed by that bridge. Google's `cast_sender.js` then finds what it finds in Chrome.
|
|
93
|
+
|
|
94
|
+
Three rules:
|
|
95
|
+
|
|
96
|
+
1. **Import `electron-cast/preload`, never the package root.** The root also exports the main-process code, which needs
|
|
97
|
+
Node's `tls` and `dgram`; a sandboxed preload cannot load those.
|
|
98
|
+
2. **Bundle the preload if it is sandboxed.** A sandboxed preload can `require` only a few built-in modules
|
|
99
|
+
(`electron`, `events`, `timers`, `url`) and cannot load other files, so `import "electron-cast/preload"` has to be
|
|
100
|
+
inlined into your preload file. esbuild does it in one command; leave `electron` external:
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
esbuild preload.ts --bundle --platform=node --format=cjs --external:electron --outfile=preload.bundle.cjs
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
The repository's [smoke/build-preloads.mjs](../smoke/build-preloads.mjs) and the example app's `build:preload` script
|
|
107
|
+
do the same.
|
|
108
|
+
3. **A non-sandboxed CommonJS preload can `require("electron-cast/preload")` directly.** The package ships a CommonJS
|
|
109
|
+
build for that.
|
|
110
|
+
|
|
111
|
+
## 3. The page
|
|
112
|
+
|
|
113
|
+
The page loads Google's SDK exactly as it would in Chrome. There is nothing to import from electron-cast:
|
|
114
|
+
|
|
115
|
+
```html
|
|
116
|
+
<google-cast-launcher></google-cast-launcher>
|
|
117
|
+
<script>
|
|
118
|
+
window.__onGCastApiAvailable = (available) => {
|
|
119
|
+
if (!available) return;
|
|
120
|
+
cast.framework.CastContext.getInstance().setOptions({
|
|
121
|
+
receiverApplicationId: chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,
|
|
122
|
+
autoJoinPolicy: chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED,
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
</script>
|
|
126
|
+
<script src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"></script>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Casting starts from a user gesture, as in Chrome: the click on the launcher. The preload reads
|
|
130
|
+
`navigator.userActivation.isActive` itself when the page asks to start, and the main process refuses a start without it
|
|
131
|
+
([SECURITY.md](../SECURITY.md#user-gesture)). Loading media afterwards needs no gesture.
|
|
132
|
+
|
|
133
|
+
## 4. Window settings
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
import { BrowserWindow } from "electron";
|
|
137
|
+
|
|
138
|
+
const win = new BrowserWindow({
|
|
139
|
+
webPreferences: {
|
|
140
|
+
preload: "/absolute/path/to/preload.bundle.cjs",
|
|
141
|
+
sandbox: true,
|
|
142
|
+
contextIsolation: true,
|
|
143
|
+
nodeIntegration: false,
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
- **`sandbox: true` and `contextIsolation: true` are supported and recommended.** The page never gets Node, sockets or an
|
|
149
|
+
IPC handle; it only sees the Presentation API stand-in and a bridge object. `contextIsolation: false` is not a
|
|
150
|
+
configuration electron-cast is designed for: it uses `contextBridge`, which needs isolation.
|
|
151
|
+
- **Install the preload only in windows and views that show pages that should cast.** A window without the preload has
|
|
152
|
+
no way to reach the IPC channels.
|
|
153
|
+
- **`nodeIntegrationInSubFrames: true` makes it work in iframes.** Electron runs a preload in subframes only if the app
|
|
154
|
+
opts in. With it, the preload (and so the cast bridge) runs in every iframe of every origin, so keep `allowOrigin`
|
|
155
|
+
strict. `nodeIntegration` stays `false`, so an iframe's page still gets no Node. Without it nothing changes: the
|
|
156
|
+
preload runs only in the main frame and an iframe's SDK finds no devices. See
|
|
157
|
+
[Multiple windows and iframes](guides/windows-and-iframes.md).
|
|
158
|
+
- **`BrowserView` and `WebContentsView` work like a window** as long as the preload is in their `webPreferences` and
|
|
159
|
+
`allowOrigin` names the page they show. The library only needs `webContents`, which they all have.
|
|
160
|
+
|
|
161
|
+
## 5. Content Security Policy
|
|
162
|
+
|
|
163
|
+
electron-cast adds no `<script>` element and no inline script to your page: the preload installs the stand-in with
|
|
164
|
+
`contextBridge.executeInMainWorld`. What your CSP has to allow is Google's SDK, which loads from `www.gstatic.com`
|
|
165
|
+
(the loader at `/cv/js/sender/v1/cast_sender.js`, then the Presentation API based SDK from `/eureka/clank/<chrome
|
|
166
|
+
major>/` and `cast_framework.js`). The example app's page uses
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
default-src 'self'; script-src 'self' https://www.gstatic.com http://www.gstatic.com;
|
|
170
|
+
style-src 'self' 'unsafe-inline'; img-src * data:; connect-src *; media-src *; frame-src *
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
and works. That policy is permissive on purpose, and it has not been reduced to a minimum. Google's SDK pulls in scripts
|
|
174
|
+
over `http` as well as `https` (the example lists both), and the launcher and receiver icons come from other hosts. Tighten
|
|
175
|
+
it for your site, test with a real device, and expect to find a few more hosts. A site you do not control (YouTube Music)
|
|
176
|
+
already has its own CSP, and casting works with it.
|
|
177
|
+
|
|
178
|
+
## 6. Run it
|
|
179
|
+
|
|
180
|
+
Start the app and open the page. The launcher appears when a device that has the page's receiver app is listed, a few
|
|
181
|
+
seconds after `start()`. Click it, pick a device from
|
|
182
|
+
your `selectDevice`, and the receiver app launches. For the first run, the default media receiver (`CC1AD845`, the
|
|
183
|
+
`DEFAULT_MEDIA_RECEIVER_APP_ID` above) plays any media URL the device can reach; see
|
|
184
|
+
[Custom receivers](guides/custom-receivers.md).
|
|
185
|
+
|
|
186
|
+
If nothing shows, the [troubleshooting guide](TROUBLESHOOTING.md#no-devices-found) has the checks in order, starting with a
|
|
187
|
+
three-line script that lists what discovery sees.
|
|
188
|
+
|
|
189
|
+
## 7. Packaging
|
|
190
|
+
|
|
191
|
+
electron-cast is plain JavaScript, so it packs like any dependency: inside an ASAR archive, with no `asarUnpack` entry and
|
|
192
|
+
nothing to rebuild per platform. The OS decides whether the packaged app may use the local network.
|
|
193
|
+
|
|
194
|
+
### Windows
|
|
195
|
+
|
|
196
|
+
Windows Defender Firewall may ask the first time the app opens a UDP socket. If the user denies it, discovery finds
|
|
197
|
+
nothing. The fix is Windows Security, Firewall, "Allow an app through firewall", with the app ticked for the network
|
|
198
|
+
profile in use (a network classified Public is the usual blocker; see
|
|
199
|
+
[Troubleshooting](TROUBLESHOOTING.md#windows)). An installer can add a rule instead, with administrator rights:
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
netsh advfirewall firewall add rule name="MyApp mDNS" dir=in action=allow program="C:\Program Files\MyApp\MyApp.exe" protocol=UDP localport=5353 profile=private
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Windows is the platform casting was tested end to end on, in a packaged build.
|
|
206
|
+
|
|
207
|
+
### macOS
|
|
208
|
+
|
|
209
|
+
**Not tested by the author.** CI loads the package in a real Electron on macOS with a fake device, so the code runs; no
|
|
210
|
+
real device has been discovered from a Mac. What follows is Apple's documented requirement for local network access,
|
|
211
|
+
which you should verify with a packaged, signed build on a real network.
|
|
212
|
+
|
|
213
|
+
macOS 15 and later show a Local Network privacy prompt, and Apple asks apps that browse Bonjour services to declare them
|
|
214
|
+
in `Info.plist`. Declare Cast's service type and a usage string:
|
|
215
|
+
|
|
216
|
+
```xml
|
|
217
|
+
<key>NSLocalNetworkUsageDescription</key>
|
|
218
|
+
<string>MyApp finds Chromecast devices on your network so you can cast to them.</string>
|
|
219
|
+
<key>NSBonjourServices</key>
|
|
220
|
+
<array>
|
|
221
|
+
<string>_googlecast._tcp</string>
|
|
222
|
+
</array>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
With electron-builder these go in `mac.extendInfo`; with Electron Forge in `packagerConfig.extendInfo`; with
|
|
226
|
+
`@electron/packager` in the `extendInfo` option. electron-cast uses its own UDP multicast socket on port 5353 rather than
|
|
227
|
+
the system's Bonjour browser. Whether macOS requires anything beyond the keys above for that is the open question; if
|
|
228
|
+
discovery finds nothing in a packaged build, check System Settings, Privacy and Security, Local Network for your app,
|
|
229
|
+
and report what you find.
|
|
230
|
+
|
|
231
|
+
### Linux
|
|
232
|
+
|
|
233
|
+
No special packaging. `.deb`, `.rpm`, AppImage and Snap all work as far as electron-cast is concerned, except where the
|
|
234
|
+
package format confines network access (a confined Snap or Flatpak needs network permissions for multicast; that is
|
|
235
|
+
your package's policy, not the library's).
|
|
236
|
+
|
|
237
|
+
**Coexisting with avahi.** electron-cast binds UDP 5353 with address reuse, which is how a second mDNS client shares the
|
|
238
|
+
port with `avahi-daemon` or `systemd-resolved`. If that bind fails it falls back to a socket on an ephemeral port that
|
|
239
|
+
receives unicast replies (mDNS "legacy unicast"). electron-cast only asks: it never advertises and never answers mDNS queries. Discovery, device authentication and casting end to end were tested from
|
|
240
|
+
Ubuntu under WSL2 with mirrored networking (see [Platforms](../README.md#platforms-and-what-was-tested)); they were not
|
|
241
|
+
tested next to a running `avahi-daemon`. If a host firewall (`ufw`, `firewalld`) drops inbound multicast, devices will not
|
|
242
|
+
appear; [Troubleshooting](TROUBLESHOOTING.md#linux) lists the commands.
|
|
243
|
+
|
|
244
|
+
## Next
|
|
245
|
+
|
|
246
|
+
- [Guides](guides/index.md): a custom picker, restart rejoin, iframes, custom receivers, testing your app.
|
|
247
|
+
- [API reference](API.md): every option and type.
|
|
248
|
+
- [Troubleshooting](TROUBLESHOOTING.md) when something does not work.
|