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

Add Audio to page #1

Merged
merged 1 commit into from
Nov 3, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Shane-Casey-Kate/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
*HTML5 as a platform
+### A project for Code Fellows B25 by Kate Fleming, Casey Holly, and Shane Kalles.
+
+Our build of HTML5-as-a-platform.
+
+Capturing photos with the camera access was pretty simple, but being able to capture video is really difficult, since the new file would need to be stored somewhere and local storage doesn't work for this type of information.
+
+Our form layout is simple and we made sure to include....
+
+Adding the video element is very simple and the controls available to you in HTML5 make for an easy addition to any page with the playback results that you want
+
+Resources:
+* [UX Design](http://www.anotheruiguy.com/ux-design-dev/_book/html5/audio.html)
Binary file added Shane-Casey-Kate/Yakety_Sax_-_Benny_Hill.mp3
Binary file not shown.
30 changes: 30 additions & 0 deletions Shane-Casey-Kate/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,33 @@ window.addEventListener("DOMContentLoaded", function() {

}, false);

window.onload = function(){
fname.value = localStorage.getItem(fname.id);
lname.value = localStorage.getItem(lname.id);
email.value = localStorage.getItem(email.id);
phone.value = localStorage.getItem(phone.id);
};

var fname = document.getElementById("firstname");
var lname = document.getElementById("lastname");
var email = document.getElementById("email");
var phone = document.getElementById("phone");

fname.onblur = function(){
storeData(this.id, this.value);
};
lname.onblur = function(){
storeData(this.id, this.value);
};
email.onblur = function(){
storeData(this.id, this.value);
};
phone.onblur = function(){
storeData(this.id, this.value);
};

function storeData(name, value){
localStorage.setItem(name, value);
};


5 changes: 5 additions & 0 deletions Shane-Casey-Kate/video.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
<head>
</head>
<body>
<p>Here is the audio</p>

<audio src="Yakety_Sax_-_Benny_Hill.mp3" autoplay loop preload="auto" id="page_audio"></audio>
<p>Here is the video</p>
<video poster="poster.jpg" controls="">
<source src="https://developers.google.com/web/fundamentals/documentation/introduction-to-media/video/video/chrome.webm" type="video/webm">
<source src="https://developers.google.com/web/fundamentals/documentation/introduction-to-media/video/video/chrome.mp4" type="video/mp4">
<p>This browser does not support the video element.</p>
</video>

</video>
</body>
</html>