Solved

Creating simple video playlist player but can't seem to be able to continue to click on images to play.

Posted on 2013-12-21
9
396 Views
Last Modified: 2013-12-27
So I'm getting the videos to load the first time but I can't seem to keep on playing videos. It will play one when you click on any playlist item but after that it won't load a new one.

http://jsfiddle.net/7bwZS/

Thanks for the help!
0
Comment
Question by:brihol44
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 23

Expert Comment

by:Roopesh Reddy
ID: 39734644
Hi,

Check this tutorial on building a HTML 5 Video player with playlist - http://www.creativebloq.com/html5/build-custom-html5-video-player-9134473

Hope it helps u...
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 39734663
basically
listen for the 'ended' event of the currently playing video
then load new video
then play()
0
 

Author Comment

by:brihol44
ID: 39734699
Ok, well I'm not sure what you mean. Can you add onto my existing code js fiddle? I don't want to start from scratch but just use my existing code.
0
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 
LVL 25

Expert Comment

by:dgrafx
ID: 39734712
Now I see you are wanting to build a YouTube player ...

Here is a link - you should work through it - it is very good and provides all you need and more to build an awesome video player.

http://tutorialzine.com/2010/07/youtube-api-custom-player-jquery-css/

my advice is to start from scratch - sorry ...
0
 

Author Comment

by:brihol44
ID: 39734800
Ok, well no disrespect but I found 100 other articles like that by searching google before I asked for help. I'm hoping for a coded solution from what I already coded. The example you sent is over-bloated for what I need. I believe I only need the event listener part at this time. I learn best by coding my own and expanding off it.
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 39734922
No disrespect to you either - but I actually knew that.
And my point (without wanting to be rude) is that what you have so far is not really too great - if you can see what I mean.

I gave you the event listener but you said you didn't know what I meant.
Then when I looked at your code I didn't see any clue on where to hook in listeners.
So I suggested starting from scratch using an example that has listeners galore!

media.addEventListener(events[ii], function(e) {
      if(e.type == 'ended') {
            $(id_of_an_element).click();
            /*            
            when this element is clicked the proper video is loaded and starts playing
            so we call the elements click event when the current video has ended
            */
      }
});

good luck ...
0
 

Accepted Solution

by:
brihol44 earned 0 total points
ID: 39735252
So why wouldn't what I figured out here work. It's exactly what I need but maybe I miss-communicated things. Sorry if I did.

http://jsfiddle.net/uY8Y8/
0
 
LVL 25

Assisted Solution

by:dgrafx
dgrafx earned 250 total points
ID: 39735253
maybe I miscommunicated - I said that I don't see where I could hook in an event listener - so that isn't of any help to I guess - sorry ...

just try what I posted - editing a bit to fit your scenario of course - that is if you can find code that is exposed enough to hook it in ...

or you could start from scratch with the example I posted ...
0
 

Author Closing Comment

by:brihol44
ID: 39741500
The other advice is good but I don't want to follow other examples that I can find just as easy on Google. I want to learn the hard way that my way sucks or fits what I need perfectly but at least I'm learning on my own than following a tutorial. I don't need experts-exchange for that.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

761 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question