3

I'm building a captive portal for free wifi access. When user connects, the CNA pops up in the screen where my portal is loaded.

Problem: HTML5 video is not being displayed in OS X desktop. Even iPhone can show it, desktop doesn't. I cannot even inspect anything in this evil browser (can it be called a browser? I don't think so).

My video code:

<video id="promo-video" height="100%" width="100%" preload="auto" autoplay="" muted="" webkit-playsinline="" playsinline="">
  <source src="externalUrlToVideo" type="video/mp4">
</video>

Remember, this very same code shows video on iOS (but doesn't autoplay... for now it's a minor problem).

Some screenshots* that may help some. Video should be played in the right column: CNA doesn't loads video CNA doesn't loads video

What happens when I right-click video then  click "Show controls" What happens when I right-click video then click "Show controls"

Also, when I right-click then click "Open video in a new window", it shows only a video player, but nothing to be showed in it. Obviously, play button doesn't make it work...

Canta
  • 1,319
  • 10
  • 24

1 Answers1

1

You could try adding the type="" attribute to the source. Include the video MIME-type there, e.g.

type="video/mp4" 

Also, I don't think video will autoplay on iOS. Historically it has prevented auto-playing because of data charges for downloading video content. I'm not sure if I recently read somewhere that was changing. From a user perspective it's arguably unfair to hammer their data allowance with auto-playing videos even if the aesthetic or UX is improved by it.

Taintedmedialtd
  • 746
  • 4
  • 10
  • Safari and other webkit browser are now able to do autoplay on iOS. In android, some browsers are able to autoplay if video is muted. I'm using user gesture when it's not possible. Thanks for the answer, I'm gonna test it and feedback you. – Canta Mar 09 '17 at 16:34
  • Did not work =( But it was well observed, just updated my code and my question, thank you. Ps.: can you upvote the question? ty @Taintedmedialtd – Canta Mar 09 '17 at 16:40
  • OK, sounds like the browser doesn't support the video format. Few questions: What browser is it and what version? Is video/mp4 the correct file format? Can you tell me where the video is streaming from? E.g. YouTube, Vimeo, locally hosted etc? How does your browser fare on the "caniuse" support tables for the correct file format: http://caniuse.com/#feat=video - if you go there and look at the sub-features you'll see 4 video formats. Most modern browsers have aligned on mp4 but historically you had to provide more than 1 source to satisfy them all. – Taintedmedialtd Mar 09 '17 at 16:47
  • Video isn't hosted locally, but in another amazon server that I use. It's not a regular browser... it's a captive window where user can login and start using free wifi... It's called CNA (Captive Network Assistant) if I'm not wrong. Strange fact is that iOS has also a CNA, and there the video can be played... same thing in Android native browser. Desktop OS X doesn't – Canta Mar 09 '17 at 16:58
  • Then I'm out of my depth, never had the pleasure. Did a quick search and found someone with a similar problem: https://forums.developer.apple.com/thread/9981 Someone suggested loading it in an iframe but I don't see that working to be honest. – Taintedmedialtd Mar 09 '17 at 17:01