Reputation: 81
i came a crosss very different problem, in fullscreen
mode my plyrjs
is not playing video to fullscreen
i tried to reproduce the problem with same code in codepen but it works in codepen why?.
Question: why same code produces fullscreen
in codepen but not in my project, in any browser.
here is screen shot (played in fullscreen
mode in my project):
**
var videoPlayer = new Plyr('#plyr-video');
var src = 'https://vjs.zencdn.net/v/oceans.mp4';
videoPlayer.source = {
type: 'video',
title: 'Example title',
sources: [
{
src: src,
type: 'video/mp4',
size: 720
}
],
poster: ''
};
<link href="https://cdn.plyr.io/3.4.7/plyr.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdn.plyr.io/3.4.7/plyr.polyfilled.js"></script>
<video controls crossorigin playsinline id="plyr-video" controlsList="download" controls style="max-width: 533px;max-height: 300px;">
<source src="" type="video/mp4">
<source src="" type="video/webm">
<track kind="captions" label="English captions" src="" srclang="en" default>
</video>
Codepen demo:https://codepen.io/eabangalore/pen/wRdGGB
Upvotes: 5
Views: 3098
Reputation: 21
Make sure your <link
and <script
import statements are declared early on in your code.
<link rel="stylesheet" href="https://cdn.plyr.io/3.4.7/plyr.css" />
<script src="https://cdn.plyr.io/3.4.7/plyr.polyfilled.js"></script >
Upvotes: 2