calzoneman / sync

Node.JS Server and JavaScript/HTML Client for synchronizing online media
Other
1.45k stars 235 forks source link

Add player integration code removed from the dailymotion js sdk #983

Closed hdfssk closed 1 month ago

hdfssk commented 2 months ago

The broken dailymotion player described in https://github.com/calzoneman/sync/issues/980 was caused by Dailymotion removing direct player creation support from their js SDK. They’d set up a method to remove it a while ago, which they turned on with their commit 75b4102. The js SDK, documented here, is loaded from https://api.dmcdn.net/all.js by sync & other projects. The SDK’s github readme currently says:

⚠️ WARNING: We no longer support this SDK for Player integration on web environments. It can be used for interaction with the Platform API only. The Player should be embedded using the new default Player integration methods, info can be found here.

The new integration method they point to there seems to demand making a dailymotion account, configuring a custom player w/ a unique ID, and loading their scripts based on that ID . This is a can of worms, and it's not clear how this could work for sync in general.

Fortunately, it’s still possible to create a Dailymotion player with their js SDK’s object interface, instead of the functional interface that vanished when they decided to “Sunset player API v2". This PR does so to get Dailymotion sync support working again.

Xaekai commented 2 months ago

The new integration method they point to there seems to demand making a dailymotion account, configuring a custom player w/ a unique ID, and loading their scripts based on that ID

This is precisely why I threw my hands up in the air. This is the same reason I haven't added Rumble support. Their APIs seem geared to allowing publishers to customize embeds on their own sites and the idea of an unrelated 3rd party using their embeds is persona non grata. I appreciate your efforts to subvert their enshittifications.

Xaekai commented 1 month ago

Closes #980