background preloader

Capturing Audio & Video in HTML5

Capturing Audio & Video in HTML5
Many browsers now have the ability to access video and audio input from the user. However, depending on the browser it might be a full dynamic and inline experience, or it could be delegated to another app on the user's device. On top of that, not every device even has a camera. So how can you create an experience that uses a user generated image that works well everywhere? Start simple and progressively If you want to progressively enhance your experience, you need to start with something that works everywhere. Ask for a URL This is the best supported but least satisfying option. Though, if you want to manipulate the image in any way, things are a bit more complicated. File input You can also use a simple file input element, including an accept filter that indicates you only want image files. This method works on all platforms. <input type="file" accept="image/*" id="file-input"><script> const fileInput = document.getElementById('file-input'); Drag and drop Paste from clipboard if (file ! Tips Related:  kazooskiy

Exploring the HTML5 Web Audio: visualizing sound If you've read some of my other articles on this blog you probably know I'm a fan of HTML5. With HTML5 we get all this interesting functionality, directly in the browser, in a way that, eventually, is standard across browsers. One of the new HTML5 APIs that is slowly moving through the standardization process is the Web Audio API. Update 30-11-2013: Firefox also has support for this API but a couple of API elements have changed. So why do I start with visualizations? There are many interesting examples that use this API. Create a signal volume meterVisualize the frequencies using a spectrum analyzerAnd show a time based spectrogram We start with the basic setup that we can use as the basis for the components we'll create. Setting up the basic If we want to experiment with sound, we need some sound source. Load the dataRead it in a buffer node and play the sound Load the data With the web audio we can use different types of audio sources. In this example you can see a couple of functions.

Moqups · Mockups, Wireframes & Prototyping The HTML5 test - How well does your browser support HTML5? How to record audio in Chrome with native HTML5 APIs Two weeks ago a new version of Chrome was released. Google switched from the default Adobe’s Flash Player to an in-house developed version called “Pepper Flash”. Unfortunately Pepper Flash has a problem with audio recording, resulting in distorted audio on almost all Macs. This happened right in the middle of our efforts to build the Dubjoy Editor, a browser-based, easy to use tool for translating (dubbing) online videos. We started researching the space and checked a lot of sample code out there, but had limited success. From what you can find on html5rocks, capturing audio seems to be well supported. Everything seems easy and pretty straightforward, right? When clicking the “start recording” button, a permission request to use the microphone appears. Looks like the problem lies in assigning the recorded stream to the native audio source as it’s done in the video sample on html5rocks: audio.src = window.URL.createObjectURL(stream); mediaStreamSource.connect(context.destination);

A Simple Trip Meter using the Geolocation API Introduction The Geolocation API lets you find out where the user is and keep tabs on them as they move around, always with the user's consent. This functionality could be used as part of user queries, e.g. to guide someone to a destination point. It could also be used for "geo-tagging" some content the user has created, e.g. to mark where a photo was taken. The API is device-agnostic; it doesn't care how the browser determines location, so long as clients can request and receive location data in a standard way. The underlying mechanism might be via GPS, wifi, or simply asking the user to enter their location manually. The example here is a trip meter showing the initial location and maintaining a display of the distance they have travelled since the page was loaded. Step 1. You can easily check for compatibility by testing for the presence of the geolocation object: // check for Geolocation supportif (navigator.geolocation) { console.log('Geolocation is supported!') Step 2. Step 3.

Building a Touch-Friendly HTML5 Site | Clarity Blogs It Looks and Acts like an App…but it’s a Website Over the past month I have been doing some experiments with html5 and JavaScript. Specifically, I wanted to see exactly how close I could come to making a website ‘feel’ like a native app. In a recent post I made a claim that “websites can take a lesson from apps”. Avoiding jQuery has some perf benefits for mobile devicesAdding Touch support, and handling the default behaviors Getting around the lack of native scrolling in a fixed layout on iOS. Demo Site & Code If you’re like me and don’t have the patience to read the full post, I’ll cut to the chase. Avoiding the use of jQuery for optimized perf on mobile devices Adding touch capabilites to screen elements Using hardware accelerated css animationsDetecting browser capabilities with Modernizr An inertial scroller to workaround the lack of native scrolling in a fixed layout on iOS Avoiding jQuery for Better Performance Adding Touch Support [gist id=1104360] This isn’t really a new thing. Enjoy

Las nuevas API de audio en HTML5 Hello Backbone.js Tutorial Shameless advertisement: Don't forget to check out Agility.js, a simpler alternative to Backbone.js. Hello Backbone is a simple Backbone.js tutorial comprised of self-explanatory "hello world" examples of increasing complexity. It was designed to provide a smoother transition from zero to the popular Todos example. Backbone.js offers a lean MVC framework for organizing your Javascript application. The tutorial starts with a minimalist View object, and progressively introduces event binding/handling, Models, and Collections. Start the tutorial Once in the tutorial, use the navigation menu in the top-right corner to view other examples. Copyright © Artur Adib [ arturadib.com ]

Free Scripts! Download 2016 Oscar Contenders 'Inside Out, Some of the year's best screenplays are now available to download. READ MORE: Indiewire's Ultimate Guide For Screenwriters For aspiring screenwriters, there are few things more valuable than reading scripts. Reading scripts after you’ve seen the film can also shed light on how the director interpreted the story and added her or his own layers and perspective. We'll continue to update this list throughout awards season, so keep checking back for more free scripts. "Spotlight," screenplay by Josh Singer & Tom McCarthy (courtesy of Open Road) "Inside Out," screenplay by Pete Docter, Meg LeFauve, and Josh Cooley, story by Pete Docter and Ronnie Del Carmen (courtesy of Walt Disney Studios) "Room," screenplay by Emma Donoghue, based on her novel (courtesy of A24) "Carol," screenplay by Phyllis Nagy, based on the book The Price of Salt by Patricia Highsmith (courtesy of The Weinstein Company) "Woman in Gold," written by Alexi Kaye Campbell (courtesy of The Weinstein Company)

Vuze Bittorrent Client - The Most Powerful Bittorrent Software on Earth How to Find Dedicated Cast & Crew, Even When You Have No Budget — The Filmmaker's Process When making a feature film, countless things can go wrong, and they do go wrong. Murphy’s Law really is the name of the game. With that being the case, don’t you want folks who have your back? I did. And it made all the difference. These are people who will fight for you, staying up until 2AM to get that perfect take. But where do you find them? Other people’s film sets, film meetup groups, classmates, friends with a casual interest in what you do and want that first chance. Long story short, these guys are your backbone. This goes both ways.

Get Started with Backbone.js We can’t discuss JavaScript frameworks without featuring Backbone.js. Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface. Backbone certainly won’t give you any superpowers. It’s still JavaScript, so you can’t do anything with it that you couldn’t do with JavaScript. All it does give you is some convenience and a bit of structure so that when you’re working a project that involves a lot of data or a lot of processing you have a little bit more flexibility without having to spend hours trying to figure a way to put together, model, and render out a list item. What are your thoughts on Backbone? JGB: I’m here with Louis Simoneau, who is a web developer at Flippa, and he’s going to tell us all about Backbone JavaScript today. Louis: I’ve touched on this a little.

position In order to make more complex layouts, we need to discuss the position property. It has a bunch of possible values, and their names make no sense and are impossible to remember. Let's go through them one by one, but maybe you should bookmark this page too. static static is the default value. relative relative behaves the same as static unless you add some extra properties. Setting the top, right, bottom, and left properties of a relatively-positioned element will cause it to be adjusted away from its normal position. fixed Hello! A fixed element is positioned relative to the viewport, which means it always stays in the same place even if the page is scrolled. I'm sure you've noticed that fixed element in the lower-right hand corner of the page. A fixed element does not leave a gap in the page where it would normally have been located. Mobile browsers have surprisingly shaky support for fixed. absolute Here is a simple example: This element is relatively-positioned.

Related: