最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Video.js reuse ID - destroy() - Stack Overflow

programmeradmin3浏览0评论

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

/

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()

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()

Share Improve this question asked May 13, 2013 at 15:46 bradleybradley 7762 gold badges11 silver badges30 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 20

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

发布评论

评论列表(0)

  1. 暂无评论