Vicky
Vicky

Reputation: 1235

How to play video through java script code?

I know, I am asking stupid question but your experience will help me to improve my java script knowledge. Now a days, I am trying to learn advance concept in java script. So please help me to develop this small application. I want to play a video on button click event...Would be grateful for help.

Upvotes: 0

Views: 611

Answers (3)

Milindu Sanoj Kumarage
Milindu Sanoj Kumarage

Reputation: 2774

You can use HTML5 player or a flash player

  1. videojs HTML5 player
  2. Flowplayer demo
  3. and you can use Youtubbe and controll ti using JS YouTube JavaScript Player API

Upvotes: 0

user671253
user671253

Reputation:

you can building HTML5 video controls with JavaScript

HTML5

<video>
  <source src="filename.mp4">
  <source src="filename.webm">
  <source src="filename.ogg">
</video>

check this link and Demo

Upvotes: 1

HellishHeat
HellishHeat

Reputation: 2491

There are a few ways to skin this cat. May I suggest spending some time to get acquainted with JavaFx:

http://docs.oracle.com/javafx/2.0/media/jfxpub-media.htm

http://docs.oracle.com/javafx/1.2/tutorials/javafx-javascript/index.html

I haven't done this myself, but I've been looking for an opportunity.

Upvotes: 0

Related Questions