Stop a Vimeo Video with Jquery

前端 未结 4 1792
迷失自我
迷失自我 2021-01-20 21:26

I need to stop a Vimeo video embedded with new oembed api (universal player) but when I try to add an event I get this error:

Uncaught TypeError: Object #<         


        
4条回答
  •  一生所求
    2021-01-20 22:29

    You can't.

    • There's no DOM addEvent method.
    • You don't have cross-domain access to Vimeo, so you are not permitted to have JavaScript interface with the iframe's document or abstract view.

    If you wanted to interface with Vimeo via JavaScript, you would have to get them to implement a postMessage API that also accepts your domain.

提交回复
热议问题