Ask Java Expert


Home >> Java

Assignment

This assignment will give you a chance to exercise your knowledge of extending jQuery and of multimedia players like the JWPlayer. We're building on the "divide-text-into-spans" example we started in Homework #3a, and will finish this with a fully-working example.

You will use jQuery and JWPlayer to to add a video to this page, and make the transcript interactive with the video. The file at js/transcript.js has a framework "stubbed out" with a few key code segments for you to fill in.

At the bottom of this page is a block of text which is the transcript from a public-domain video produced by NASA. (Sorry for the hokey video - I needed something public domain, brief, and for which there was a timed transcript available). If you look at the source code, you'll see that this seemingly single block of text is actually broken up into many separate SPANs, similar to the ones you made in Homework #3a.

The HTML source code looks something like this:

Hey this is Dwayne Johnson. While playing astronaut Chuck Baker in the film Planet

51

I gained a lot of respect for our nation's space program. NASA makes new

The code in the js/transcript.js file provides the framework for the solution which is a jQuery plugin called 'playerConnect()'. In usage, it looks like this: $('.words').playerConnect(player);, where the jQuery selector is returning the collection of SPAN elements, and player is the jwplayer instance we've added to the page.

The resulting behavior is twofold:

As the video plays, the relevant part of the transcript highlights.

If the user clicks on the transcript, the video seeks to the relevant segment.

A video showing the desired behavior is on the assignment page in Canvas.

Much of the code is provided for you in a well-commented framework, but the solution will require you to add code in four three places, each marked by a comment line like this: "YOUR CODE TO ADD #n":

YOUR CODE TO ADD #1: The first one is near the end of the JS file, where you'll create the jwplayer and load it into the page (this one is already done for you ... you're welcome!)

YOUR CODE TO ADD #2: Next you'll move into the jQuery plugin itself, where you'll get the current position of the video playback from the jwplayer's event object

YOUR CODE TO ADD #3: Third, you'll write the loop that compares the current player time with the time described in each element, and apply a style if the times match up.

YOUR CODE TO ADD #4: Finally, the click handler for each element is created, but the logic inside is missing. You'll add the code that causes a click to make the player seek to the right moment.

If this sounds scary, don't despair! The code already includes most of the heavy lifting, detailed instructions, and pseudo-code is provided in several places.

We will cover JWPlayer next week (4/29) in great detail and walk through some examples very similar to this one.

As usual, submit your project as a zip file, with a folder named like [lastname_firstname].hw4 zipped into a file called [lastname_firstname].hw4.zip.

Video Will Appear Here

Hey this is Dwayne Johnson. While playing astronaut Chuck Baker in the film Planet 51 I gained a lot of respect for our nation's space program. NASA makes new discoveries about our universe every day but one of the coolest things about nasa is the technologies that it creates for exploring space are also improving life here on earth. NASA technologies can be found everywherefrom the soles of the shoes to the freeze dried fruit in your cereal. These technologies, called spinoffs, help doctors heal patients with heart problems, scientists track rare animals, and firefighters and police officers and soldiers stay safe on the job. Space technology has even helped Olympic swimmers win gold medals. All of these the spinoffs began as innovations for nasa missions like the space shuttle, the Hubble Space Telescope, and the International Space Station. You don't have to be an astronaut to trace space back to where you live. Visit nasa.gov to learn more about how nasa technologies play a role in your life. After all, there's no space like home.

Java, Programming

  • Category:- Java
  • Reference No.:- M92075305
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Java

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As