Compare commits

..

2 Commits

Author SHA1 Message Date
David Siaw 3d8314e2b2
Merge 868d3a4b68 into adc0ea27a9 2024-05-30 06:56:12 +00:00
Honore Doktorr adc0ea27a9 Add player integration code removed from the dailymotion js sdk
Restores https://github.com/dailymotion/dailymotion-sdk-js commit 75b4102
2024-05-26 17:30:11 -07:00
1 changed files with 6 additions and 1 deletions

View File

@ -18,7 +18,12 @@ window.DailymotionPlayer = class DailymotionPlayer extends Player
if quality != 'auto'
params.quality = quality
@dm = DM.player('ytapiplayer',
@element = DM.$('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
width: parseInt(VWIDTH, 10)
height: parseInt(VHEIGHT, 10)