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
381 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
  • 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
 
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jQuery Animation faster 5 42
jquery add something to a div 4 38
Capture logon name 13 31
How to generate a JSON response in coldfusion 4 20
Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
The viewer will learn how to dynamically set the form action using jQuery.
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…

910 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now