I have created video player using mat-video angular material tag.
My video has been working properly but my track tag not showing caption button on any browser.
code:
<mat-video src="../assets/video.mp4" >
<track matVideoTrack src="../assets/dw_trailer_low.vtt" kind="subtitles" srclang="en" label="English" default />
</mat-video>
Related
I have a very annoying issue.
I'm using Ionic 5 + iOS 14 to show a WebRTC stream in a tag.
I want to play the video inline, so I can put other HTML elements on top (logo, buttons etc.) but I cant find a way to achieve this.
In my config.xml I have added:
<preference name="AllowInlineMediaPlayback" value="true" />
And my video tags are like this:
<video playsinline webkit-playsinline muted autoplay></video>
So I would expect that the video would be played in the HTML instead of the native player.
The big downside is that the native player gets 'glued' to the screen and nothing goes in front of it. Even if I open a new dialog while playing the video, the video will stay on top of that.
Any ideas on what I'm missing here?
I am using angular version 6 with material design. I have created one page which uses sidenav component on material design and its stackblitz link is https://angular-pxw1qr.stackblitz.io/sidenav. When i open sidenav page in any Iphone and pull down or pull up the screen sidenav content goes behind the page content and white background is coming at top or bottom of the page.
What i can do to remove this behavior ?
You're missing the fullscreen attribute on your sidenav container:
<mat-sidenav-container fullscreen>
<mat-sidenav #sidenav>
<!-- ... -->
</mat-sidenav>
<mat-sidenav-content>
<!-- ... -->
</mat-sidenav-content>
</mat-sidenav-container>
Note that this is just used for styling and does not serve any other purpose.
See the sidenav's stylesheet, as well as the mat-fill mixin for more info.
I'm developing an ionic app in iOS, I placed the pdf inside an iframe just by simply doing the following:
<iframe src="https://docs.google.com/gview?embedded=true&url=http://example.com/resources/myfile.pdf" mozallowfullscreen marginwidth="2" marginheight="2" width="90%" scrolling="auto"></iframe>
I didn't used cordovaInAppBrowser because I ran a lot of problem like after clicking the button the InAppBrowser doesn't open unless I don't minimize the app. So I just used iframe as the workaround. But the problem now is that, after the pdf being loaded, and the user clicks on the full screen of pdf, there's no back button. Is there a way I can remove the full screen button from the pdf or add a back button on full screen mode of pdf? I tried removing the mozallowfullscreen but doesn't work since it's for the iframe not for the pdf.
P.S.
I tried accessing the div inside the iframe that holds the button for full screen, but no good, it doesn't get the div, it's probably because I'm violating the Same Origin Policy.
Here's the code on how I tried to access the div:
$('#myframe').each(function(){
console.log($("div[role='toolbar']"));
});
The document has a number of divs only one of which is visible at any one time (others are display:none).
When a div which was visible is hidden and then made visible again the videos within the div don't play any more.
However this is only a problem on iPad.
Any suggestions as to how to re-initialise them?
thanks
Derek
Having searched in every possible way for a solution it does seem that videos using video.js in a container that is hidden after video.js has initialised them become unplayable when made visible again.
So for now, when my pages detect that the browser is on iPad/iPhone they use the native video player.
To do this I place the includes for the video.js inside a javascript block in the head of the page so they are not loaded if iPad or iPhone is detected.
<script type="text/javascript">
if(!navigator.userAgent.match(/iPad/i) && !navigator.userAgent.match(/iPhone/i)) {
document.write('<link href=\"\/\/vjs.zencdn.net/c/video-js.css\" rel=\"stylesheet\" type=\"text/css\" \/\>');
document.write('<script src=\"\/\/vjs.zencdn.net/c/video.js\" type=\"text/javascript\"\>\<\/script\>');
}
</script>
I had this problem on firefox but it was because I was trying to stop the video after move its container div to a hidden div. I removed the "stop" code, the player seems to reinitalize?(and stop by itself) after being moved from one div to another on chrome, firefox and opera.
Before this simple solution, I thought to just re-add the video original html via javascript, it probably can be done after the div is hidden or before it is shown.
I have problem with html page with <object><embeded> video and lightbox2 plugin for pictures. These two component not going very well on the iPad, because when I click on thumb image and lightbox2 comes up, lightbox is under embeded video.
How can it be fixed?
Ofcourse the right version could be that embeded video will under lightbox.
I see on lightbox.css file and z-index: 100;
Already trying <param name="wmode" value="transparent"></param> for embeded video.(youtube video), but no success
And one very important note. In computer desktop browser it's going good. So only on the iPad it's showing bad.