Psijic
Psijic

Reputation: 992

HTML5: Playing HTTP streaming on HTTPS domain

Can I play HTTP streaming on HTTPS domain without browser's security errors? The browser blocks that requests by default.

I use hls.js library for .m3u8 desktop playing support. When I play content natively without it (via mobile or Mac's Safari), the browser shows warning but doesn't blocks requests. But when I play it on same devices with hls.js enabled, or via desktop browsers, the requests are blocked.

Upvotes: 2

Views: 7847

Answers (1)

user6560716
user6560716

Reputation:

You can't.

Mixed content, when you have resources served over http on a https site, can be passive or active.

Passive:

  • Images
  • Videos
  • Audio

Active:

  • Javascript
  • CSS
  • iFrames
  • Objects (flash, etc.)
  • XHR (requests made with javascript)

The problem is that your video is fetched with hls.js, which is considered active content (see that last bullet), and therefore blocked.

However, if the browser fetches it through a <video> element, it is considered passive content and allowed.

Suggestions / workarounds

Upvotes: 7

Related Questions