I try to play videos one after the other via button or automatically at the end of the video. by this code:
//automatically play
$(\"#videoPlayer\").bind(\'ended
$('#videoPlayer')
gives you a jQuery object and the jQuery object does not have a play
method. The play method you are looking for is in the native dom element inside the jQuery object. To get access to the element inside just use array syntax or .get()
. e.g. $('#videoPlayer')[0].play();
or $('#videoPlayer').get(0).play();