Autoplaying video backgrounds

Discussion in 'Web Design and Development' started by Rab Simpson, Jun 14, 2017.

  1. Rab Simpson macrumors regular

    Rab Simpson

    Joined:
    Feb 10, 2006
    Location:
    Glasgow, Scotland
    #1
    Hi folks,

    On the off-chance there's someone in the know, will the new Safari coming with High Sierra kill silent background videos? I'm using one with a few of my clients and I'm concerned that I'm going to have to switch them to static image carousels.

    For anyone concerned about battery life and data caps, I only display the background videos on Macs and other desktops machines. Nobody likes a dead phone/tablet and getting a huge phone bill.


    Cheers,
    Rab
     
  2. 960design macrumors 68000

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #2
    I have not checked that, but will test it with my High Sierra test machine on Monday morning.
     
  3. Rab Simpson thread starter macrumors regular

    Rab Simpson

    Joined:
    Feb 10, 2006
    Location:
    Glasgow, Scotland
    #3
    Excellent. I'll look forward to seeing your results :)
     
  4. jtara macrumors 65816

    Joined:
    Mar 23, 2009
    #4
    Handwriting. Wall.

    I can't image it would make a difference if it has sound or not. An annoyance is an annoyance is an annoyance.

    The latest one I hate are the picket-fence ads. Bloomberg is using the in their iOS news app. They are EXTREMELY annoying, and make it almost impossible to read the article.

    For those who haven't seen these, you will scroll down a bit, and there is a horizontal "slot" with a partial view of an ad, sometimes animated, sometimes not, that changes perspective as you scroll. You read a paragraph, and there's another *&^%$ annoying "slot". The overall appearance is as if you are looking through some narrow windows with the ad in the background.
     
  5. Rab Simpson thread starter macrumors regular

    Rab Simpson

    Joined:
    Feb 10, 2006
    Location:
    Glasgow, Scotland
    #5
    Um, ok. I take it you find carousels just as annoying? That's effectively all it is in this case.

    I agree that pages which autoplay video with audio which is either difficult to find or designed to be difficult to stop playing is a nightmare, but those aren't what I'm asking about here and it's not a question about anyone's personal preferences.
     
  6. 960design macrumors 68000

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #6
    Setup
    • iMac 27" 5k ( late 2015 )
    • MacOS Version 10.13 Beta ( 17A264c )
    • Safari Version 11.0 ( 13604.1.21.7 )
    Background video autoplayed with no issues. Used a tag similar to:
    Code:
    <video width="1280" height="720" autoplay>
      <source src="video/location/on/server/videoname.mp4" type="video/mp4">
      "Please update your internet browser."
    </video>
     
  7. Rab Simpson thread starter macrumors regular

    Rab Simpson

    Joined:
    Feb 10, 2006
    Location:
    Glasgow, Scotland
    #7
    That's excellent :)

    Could you try it with this?
    Code:
    <script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js" type="text/javascript"></script>
    <div class="container">
        <div id="ytiframe"></div>
    </div>
    <script>
        jQuery( '#ytiframe' ).hide();
        var tag = document.createElement( 'script' );
        tag.src = 'https://www.youtube.com/iframe_api';
        var firstScriptTag = document.getElementsByTagName( 'script' )[0];
        firstScriptTag.parentNode.insertBefore( tag, firstScriptTag );
        function onYouTubeIframeAPIReady() {
            var player;player = new YT.Player( 'ytiframe', {
                videoId: 'ff3Etpube2E',
                width: '800',
                height: '450',
                playerVars: {
                    autohide: 0,
                    autoplay: 1,
                    cc_load_policy: 0,
                    controls: 0,
                    disablekb: 1,
                    enablejsapi: 1,
                    fs: 0,
                    iv_load_policy: 3,
                    modestbranding: 1,
                    playsinline: 1,
                    rel: 0,
                    showinfo: 0
                },
                events: {
                    onReady: function( e ) {
                        e.target.mute();
                        e.target.setLoop( 1 );
                        e.target.setPlaybackQuality( 'hd1080' );
                    },
                    onStateChange: function( e ) {
                        if( e.data === YT.PlayerState.PLAYING ) { jQuery( '#ytiframe' ).show(); }
                        else if( e.data === YT.PlayerState.ENDED ) { e.target.playVideo(); }
                    }
                }
            });
        }
    </script>
     
  8. jtara macrumors 65816

    Joined:
    Mar 23, 2009
    #8
    Yes, I find carousels equally annoying.

    And what is SAD about them is that sometimes I actually see something on a carousel that I am interested in, and there is a button to get more information, but the carousel has moved-on by the time I go to click on it. And, so, they are often self-defeating.

    What is relevant, though, is not my personal preference, but the trend. This may work now, but it is quite likely it will not work in the future.

    Browsers increasing will be both preventing auto-play videos, as well as limiting looping. If they had a checkbox to prevent carousels, I would check the box. Unfortunately, that's not very technically feasible, as the browser would have to analyze the Javascript on the page and determine that it implements a carousel, and know how to disable it.

    Carousels aren't an HTML feature. But video (at least in modern implementations) is, and you can expect greater user control and more-restrictive defaults.
     
  9. Rab Simpson thread starter macrumors regular

    Rab Simpson

    Joined:
    Feb 10, 2006
    Location:
    Glasgow, Scotland
    #9
    That's just poor implementation.
    Based on what? It's not as if they're using proprietary plugins.
    Limiting looping, maybe, but preventing auto-play videos isn't going to happen on any large scale so long as Google don't want to cripple YouTube. Last I checked, Google's browser was very popular...
     

Share This Page