Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing Source While In Full-Screen Does Not Preserve Scaling #120

Closed
martindale opened this issue Oct 11, 2015 · 2 comments
Closed

Changing Source While In Full-Screen Does Not Preserve Scaling #120

martindale opened this issue Oct 11, 2015 · 2 comments
Assignees
Labels

Comments

@martindale
Copy link

When using the following example code, full-screening the video (if it's the item that plays, see #119) will correctly scale the video to full height and width, but on source rotation (every five seconds) the full-screen mode is preserved, but the video reduces down to a smaller size, leaving the rest of the screen black and unused.

extends layouts/media

block content
  h1 yo

  .player
    video

block scripts
  script.
    //var player = plyr.setup();
    plyr.setup();

    var player = document.getElementsByClassName('player')[0].plyr;

    var sources = [
      {
        type: 'audio',
        sources: [{
          src: 'http://inumedia.io/whalestep.mp3',
          type: 'audio/mp3'
        }],
        autoplay: true
      },
      {
        type: 'youtube',
        sources: 'SZO5QYP-GeQ',
        autoplay: true
      }
    ];

    setInterval(function() {
      player.source(sources[Math.floor(Math.random() * 2)]);
    }, 5000);

    (function(d, p){
    var a = new XMLHttpRequest(),
        b = d.body;
    a.open("GET", p, true);
    a.send();
    a.onload = function(){
        var c = d.createElement("div");
        c.style.display = "none";
        c.innerHTML = a.responseText;
        b.insertBefore(c, b.childNodes[0]);
    }
    })(document, "/img/sprite.svg");
@sampotts
Copy link
Owner

Good call. Thanks for picking up on this.

@sampotts sampotts added the Bug label Oct 12, 2015
@sampotts sampotts added this to the 1.5 milestone Oct 12, 2015
@sampotts sampotts self-assigned this Oct 12, 2015
@sampotts
Copy link
Owner

Fixed in v1.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants