html5-video

Displaying vertical videos with html5 on chrome

放肆的年华 提交于 2019-12-05 16:45:05
I'm building a simple page to display videos uploaded from my iphone using the html5 video tag. if you're watching it with chrome you probably see this video is presented horizontal, although it's not- try to download it or watching it from safari (haven't tried another browsers). I havne't found anything on the net mention this problem, is it a known chrome bug? does this tag any attribute that I can change to display it properly? Thanks. Edit: looks like this also happen in IE It's an encoding issue from iPhones. I downloaded the video and it was still displayed horizontally using mplayer.

Detect aspect ratio - HTML5 video

旧巷老猫 提交于 2019-12-05 15:16:32
Is it possible to detect the aspect ratio of an HTML5 video element? I know the video will just shrink to fit in the <video> element's dimensions, but I want to detect the aspect ratio of the source video. That way you could remove any black bars. Sorry I don't see this answered anywhere else. Sebastian Job Bjørnager Jensen Pasting from another StackOverflow answer: https://stackoverflow.com/a/4129189/1353189 <video id="foo" src="foo.mp4"></video> var vid = document.getElementById("foo"); vid.videoHeight; // returns the intrinsic height of the video vid.videoWidth; // returns the intrinsic

Selecting the HTML5 Video Object with jQuery

天大地大妈咪最大 提交于 2019-12-05 15:06:12
问题 Im having problems getting at the HTML5 video tag with jQuery. Here is my code: HTML code: <video id="vid" height="400" width="550"> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogv" type="video/ogg"> </video> Javascript code: function playVid(){ console.log($('#vid')); console.log($('#vid')[0]); $('#vid')[0].currentTime=5; $('#vid')[0].play() } $(document).ready(){ playVid(); } The code breaks on the .currentTime line with the following error: InvalidStateError: An attempt

Android webview doesn't playing mp4 video in same page

女生的网名这么多〃 提交于 2019-12-05 13:48:11
I'm trying to show one local html file contains code for playing video and try to show that html file in android webview. I've used following code to for playing video: WebViewLoadVideoActivity.java //DECLARE webview variable outside of onCreate function so we can access it in other functions (menu) @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); WebView webView = (WebView) findViewById(R.id.webView1); WebSettings webSettings = webView.getSettings(); // Fetches the // WebSettings // import WebViewClient

Safari html5 video mp4 not playing in htaccess folder, [duplicate]

一笑奈何 提交于 2019-12-05 12:58:03
This question already has answers here : mp4 in safari fails with htaccess authentication (6 answers) Closed 6 years ago . i m just working on a private page with some videos, which should only be accessible through htaccess. all videos are html5 encoded, and the site works fine for every browser without the htaccess file. after putting the htaccess file to my server, safari fails to load the mp4-videos. in charles i get an "401 Authorization Required". i checked several posts here to the same topic, but didn't found a solution yet. if someone can push m in the right direction, go ahead! some

HTML5: Placing a canvas on a video with controls

最后都变了- 提交于 2019-12-05 12:28:40
I want to draw things on HTML5 video. For that I am trying to place a canvas on the HTML5 video element. But there is a problem when I place the canvas on the video element the video controls do not work. Since canvas getting all the mouseover and click events. Is there a way to delegate the events to video controls or show the controls in somewhere else? Any help/idea would be great. Variant What you should do is implement your own controls (or use an existing set such as videojs ) You can read my answer to this question: Html5 video overlay architecture You can capture the click events in

add or remove controls attribute from html5 <video> tag

寵の児 提交于 2019-12-05 12:25:41
I am looking for a method to add the controls attribute to a video tag based upon the user agent string. I do not wish to have the controls attribute present on any browser or device other than Ipad and Android. So i thought that user agent was the best way to identify because the words ipad and android are present in their respective UA header. What is the best way to accomplish my goal? I've tried this with no luck: <script type="text/javascript"> var myVideo = document.getElementById("myVideo"); var agent = navigator.userAgent.toLowerCase(); var addAttr = (agent.indexOf('ipad')!=-1) ||

Unable to take photo from webcam using HTML5 and getUserMedia() in Google Chrome on first page load

主宰稳场 提交于 2019-12-05 10:35:32
Taking reference from this article on HTML5Rocks I am trying to build a utility to take photo from webcam. Below is my HTML code snippet: <button type="button" name="btnCapture" id="btnCapture">Start my camera</button><br /> <video autoplay="true" id="video" style="height:240px;width:320px"></video><canvas id="canvas" style="display: none; height:240px;width:320px"></canvas><br /> <img id="capturedImage" src="/blank.gif" style="height:240px;width:320px"><input type="hidden" id="hdnImageBase64" name="hdnImageBase64"><br /> On click of button btnCapture I start my webcam and clicking it again It

JQuery Mobile Open Video link inside page

守給你的承諾、 提交于 2019-12-05 10:15:25
问题 I am using JQuery Mobile version 1.1.1 I have a list of links when link to youTube videos. <ul> <li><a href="link to youtube video">See Video</a></li> </ul> My problem is that when it opens the video page I cannot get back to the page as there's no Back button and it's no longer inside a JQM page. How can I open it so that it either has a back button to return to the page of has a way of closing so I can return to the app without restarting it? 回答1: I'd suggest using the IFRAME embed method

Best way to implement HTML5 video

十年热恋 提交于 2019-12-05 09:45:33
I understand that HTML5 video is way more complicated than its proponents would like us to believe. Safari uses the proprietary H.264 codec, whereas Firefox, Chrome and Opera all support the open-source Theora. Internet Explorer doesn't support either, so needs a fallback, such as .mov or Flash. I found a superb guide somewhere that put together a step-by-step guide for HTML5 on all these browsers, but I can't find it anywhere. Very annoying :( What's the best way to implement HTML5 video so that all these browsers are covered? (Unfortunately, Flash is not an option.) Edit: Ok, from what I've