CIS 136 Building Mobile Apps

Slides:



Advertisements
Similar presentations
Russell Taylor. Sampling Sampled a file from an on-line/on-board source Edited that file by Deleting a section of the original file Added a Fade-in section.
Advertisements

Using Multimedia on the Web Enhancing a Web Site with Sound, Video, and Applets.
CNIT 132 – Week 9 Multimedia. Working with Multimedia Bandwidth is a measure of the amount of data that can be sent through a communication pipeline each.
More CSS - Page layout + HTML5 new features Boriana Koleva Room: C54
STEM 123 – UX Design Red Sun LLC Andrew Greeness Kris Koford Lavinder Singh Note: STEM is an acronym for Science Technology Engineering Math.
Chapter 9 Integrating Video. Digital video is a series of bitmap images that, when played back, create the illusion of movement. The quality and overall.
FunctionsFunctions Systems Programming. Systems Programming: Functions 2 Functions   Simple Function Example   Function Prototype and Declaration.
Animations & Transitions
Advanced Windows 8 Apps Using JavaScript Jump Start Exam Prep Advanced Windows 8 Apps Using JavaScript Jeremy Foster Microsoft Developer Evangelist.
Creating Mobile Apps with App Inventor! Day 5 Google search Kris Gordon Ludlow for links.
CHAPTER 18 INTEGRATING AUDIO AND VIDEO. LEARNING OBJECTIVES How the HTML 5 and tag pair can be used to include a video file within a webpage How video.
It is helpful to break up the word ‘multimedia’ in order to gain a better understanding of its meaning. “Multi” means more than one e.g. a multi storey.
Working With Images, Sound, and Video Mark Grabe.
 Parts of the OnSync environment  Can be moved or closed  Each have their own purpose and provide moderator (or attendees) with additional functionality.
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
Uploading Image Files. Introduction – Click on Control Panel Button Typically, most instructors will post the majority of their images under the “Course.
Unit F1KS 11 Digital Media Elements for Applications First Steps.
3. Multimedia Systems Technology
Audio and Video Recording in Harford County Public Schools Information for Field Observation Students, Student Interns, and HCPS Host Teachers.
CS378 - Mobile Computing Persistence. Saving State We have already seen saving app state into a Bundle on orientation changes or when an app is killed.
Creating Multimedia Interaction with Windows Media Technologies 7.
Your Metro style app, video and audio, Part 1
REQUIREMENTS CAPTURE 1 ASU Course Registration System Use-case Model Actor.
Standard Grade Presentations & Multimedia. Presentation & Multimedia Software Allows the user to set up exciting and attractive documents which helps.
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
Bullet-Proofing your Excel Spreadsheets Tech Day 2013 Presentation.
By James Braunsberg. What are Modules? Modules are files containing Python definitions and statements (ex. name.py) A module’s definitions can be imported.
File Sizes & Storage Requirements.  An image has a width in pixels and a height in pixels  Start by calculating the number of pixels all up  640 x.
For additional assistance, please call the Help Desk Searching 1. If a Search window does not appear after logging into the system, click the Search icon.
Phonegap Bridge – File System CIS 136 Building Mobile Apps 1.
OCR Nationals: Unit 22 – Creating Sound using ICT AO4 – Testing the audio clip.
242/102/49 0/51/59 181/172/166 Primary colors 248/152/29 PMS 172 PMS 137 PMS 546 PMS /206/ /227/ /129/123 Secondary colors 114/181/204.
Multimedia Capture & storage. Introduction A rich set of API for recording of audio & video. A developer has two choices  launch the built-in app using.
Learners Support Publications Working with Files.
Video 2 Subject:T0934 / Multimedia Programming Foundation Session:11 Tahun:2009 Versi:1/0.
JQuery form submission CIS 136 Building Mobile Apps 1.
Animations & Multimedia LESSON 9 #2.09 USING ANIMATION AND MULTIMEDIA.
CS371m - Mobile Computing Intents 1. Allow us to use applications and components that are already part of Android System – start activities – start services.
MediaStream ● Overview ● Definitions ● getUserMedia() ● Recording ● Cloning/composition.
MediaStream ● Definitions ● Common operations with example code (recording, cloning,...) ● Topics for discussion ● I prepared a few ● Suggestions from.
Web Engineering Lecture-08.
Mobile Applications (Android Programming)
Lesson 6: Enhancing Presentations
How to link a test to a launcher (in this case a shell launcher)
Chap 3. Audio/Video api.
HTTP – An overview.
Phonegap Bridge – File System and File Transfer
Data Virtualization Tutorial… CORS and CIS
CIS 136 Building Mobile Apps
Binary 4 File Sizes.
Web Design and Development
Inserting Graphics, Media, and Objects
Global Standard Video Conference System User Guide.
1. Vicky has been on holiday and has taken lots of photos
This pointer, Dynamic memory allocation, Constructors and Destructor
Transaction & Record Scoping
File System and File Transfer
This presentation has been prepared by Vault Intelligence Limited (“Vault") and is intended for off line demonstration, presentation and educational purposes.
CIS 136 Building Mobile Apps
Geolocation using Google maps
jQuery form submission
CIS 136 Building Mobile Apps
Timelapse with the Veho VMS-001 Microscope
MUMT611: Music Information Acquisition, Preservation, and Retrieval
Using Animation and Multimedia
Animations & Transitions
PRODUCTION PHASES CHANGES
Device,Network, Vibration, Console, Accelerometer
CIS 136 Building Mobile Apps
Geolocation using Google maps
Presentation transcript:

CIS 136 Building Mobile Apps Media Capture CIS 136 Building Mobile Apps

Multimedia Camera Media Media Capture

Media-Capture API Provides access to the device's audio, image, and video capture capabilities Assigned to the navigator.device.capture object therefore has global scope but not available until deviceready Three methods: navigator.device.capture.captureAudio(success,error,options) navigator.device.capture.captureVideo(success,error,options) navigator.device.capture.captureImage(success,error,options)

SUCCESS CALLBACK FUNCTIONS Invoked upon a successful media capture operation Each successful callback passes back a mediaFiles object which may be a list(array) Each MediaFiles object describes the captured media file Properties name: The name of the file, without path information. (DOMString) fullPath: The full path of the file, including the name. (DOMString) type: The file's mime type (DOMString) lastModifiedDate: The date and time when the file was last modified. (Date) size: The size of the file, in bytes. (Number) Method getFormatData(): Retrieves the format information of the media file.

ERROR CALLBACKS Examine error.code for one of these constant values: Failure scenarios include when the capture application is busy a capture operation is already taking place the user cancels the operation before any media files are captured Examine error.code for one of these constant values: CaptureError.CAPTURE_INTERNAL_ERR The camera or microphone failed to capture image or sound CaptureError.CAPTURE_APPLICATION_BUSY The camera or audio capture application is currently serving another capture request CaptureError.CAPTURE_INVALID_ARGUMENT Invalid use of the API (e.g., the value of limit is less than one) CaptureError.CAPTURE_NO_MEDIA_FILES The user exits the camera or audio capture application before capturing anything CaptureError.CAPTURE_PERMISSION_DENIED The user denied a permission required to perform the given capture request. CaptureError.CAPTURE_NOT_SUPPORTED The requested capture operation is not supported

capture.captureAudio Starts an asynchronous operation to capture audio recordings using the device's default audio recording application allows the user to capture multiple recordings in a single session capture operation ends when either the user exits the audio recording application, or the maximum number of recordings is reached navigator.device.capture.captureAudio(success,fail,options); captureAudio(…) takes three arguments: the name of the function to run when audio is successfully recorded the name of a function to run when an attempt to record audio fails some optional arguments Limit: maximum number of recordings (default:1) Duration: maximum number of seconds for audio/video recording

capture.captureImage Starts an asynchronous operation to capture images using the device's camera application allows the user to capture multiple images in a single session capture operation ends when either the user closes the camera, or the maximum number of recordings is reached navigator.device.capture.captureImage(success,fail,options); captureImage(…) takes three arguments: the name of the function to run when the image is successfully taken the name of a function to run when an attempt to take the image fails some optional arguments Limit: maximum number of image recordings

capture.captureVideo Starts an asynchronous operation to capture video recordings using the device's default video recording application allows the user to capture multiple recordings in a single session capture operation ends when either the user exits the video recording application, or the maximum number of recordings is reached navigator.device.capture.captureVideo(success,fail,options); captureVideo(…) takes three arguments: the name of the function to run when video is successfully recorded the name of a function to run when an attempt to record video fails some optional arguments Limit: maximum number of recordings Duration: maximum number of seconds for audio/video recording

Capture Audio Example function captureAudio() { navigator.device.capture.captureAudio(captureSuccess, captureError, {limit: 2}); } function captureSuccess(mediaFiles) { var i; var len = mediaFiles.length; for (i = 0; i < len; i ++) { path = mediaFiles[i].fullPath; // do something interesting with the file and check if another file exists } function captureError(error) { var msg = 'An error occurred during capture: ' + error.code; navigator.notification.alert(msg);

Capture Image Example function captureImage() { navigator.device.capture.captureImage(captureSuccess, captureError, {limit: 2}); } function captureSuccess(mediaFiles) { var I; var len = mediaFiles.length; for (i = 0; i < len; i += 1) { imgName = mediaFiles[i].name; // do something interesting with the file } function captureError(error) { var msg = 'An error occurred during capture: ' + error.code; navigator.notification.alert(msg);

Capture Video Example function captureVideo() { var options = { limit: 3, duration: 10 }; navigator.device.capture.captureVideo(captureSuccess, captureError, options); } function captureSuccess(mediaFiles) { var I; var len = mediaFiles.length; for (i = 0; i < len; i += 1) { mediaFiles[i].getFormatData(successCallback,errorCallback); function captureError(error) { var msg = 'An error occurred during capture: ' + error.code; navigator.notification.alert(msg);

Mediafiles object method: Get Format Data Retrieves format information about the media capture file. Example: mediaFiles.getFormatData(successCallback,errorCallback); function successCallback(MediaFileData) { var imgHeight=MediaFileData.height; } MediaFileData properties codecs: The actual format of the audio and video content. (DOMString) bitrate: The average bitrate of the content. The value is zero for images. (Number) height: The height of the image or video in pixels. The value is zero for audio clips. (Number) width: The width of the image or video in pixels. The value is zero for audio clips. (Number) duration: The length of the video or sound clip in seconds. The value is zero for images. (Number)