Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Video.js reuse ID - destroy()

I'm retrieving my video source using ajax. All works fine unless I try to retrieve and play the same video twice.

http://jsfiddle.net/w3JPB/3/

You will notice that the second time you click "add" video.js doesn't work and the plain default html5 video player is shown.

It seems like I need to destroy the old video object but method described here gives me an error saying "object has no method destroy".

_V_('video1').destroy()

like image 637
bradley Avatar asked Dec 01 '22 21:12

bradley


1 Answers

Latest video.js version exposes dispose method instead. Check your updated example. Working fine for me.

like image 141
mente Avatar answered Dec 03 '22 10:12

mente