Compare commits

..

1 Commits

Author SHA1 Message Date
David Siaw aebdc801d8
Merge 868d3a4b68 into 4c437efb5d 2024-05-20 15:14:07 +00:00
1 changed files with 1 additions and 6 deletions

View File

@ -18,12 +18,7 @@ window.DailymotionPlayer = class DailymotionPlayer extends Player
if quality != 'auto' if quality != 'auto'
params.quality = quality params.quality = quality
@element = DM.$('ytapiplayer') @dm = DM.player('ytapiplayer',
if not @element or @element.nodeType != Node.ELEMENT_NODE
throw new Error("Invalid player element in DailymotionPlayer(), requires an existing HTML element: " + @element)
if DM.Player._INSTANCES[@element.id] != undefined
@element = DM.Player.destroy(@element.id)
@dm = DM.Player.create(@element,
video: data.id video: data.id
width: parseInt(VWIDTH, 10) width: parseInt(VWIDTH, 10)
height: parseInt(VHEIGHT, 10) height: parseInt(VHEIGHT, 10)