0
votes

I want to force the Dailymotion player to always show the highest resolution available for any given embedded video. If you manually set the player to 1080p during a video with that resolution available, and the next video in the playlist is only available in 240,380,480 then you get 380p (so you need to click 480, again, manually). If you manually set the playback to "optimal", then you often get a truly suboptimal resolution.

The old player API supported setting the playback quality via setPlaybackQuality (as per the player on many other sites). The new player doesn't seem to support this anymore.

How to either:

a) set the playback quality via JavaScript?, or

b) configure the embedded player to always play the highest available resolution?

1

1 Answers

2
votes

Have you tried the quality parameter in the player API to set the playback quality? The description of this parameter is as follows:

Determines the quality that must be played by default if available. Valid values are: 240, 380, 480, 720, 1080 (defaults to 380)

(source: http://www.dailymotion.com/doc/api/player.html)

Hence if you set the quality to 1080, if will play this quality if it is available, otherwise it fallbacks to 380.

edit: if you want to know the highest available quality before setting it in the player, you can perform an API request to the available_formats fields. Test with:

https://api.dailymotion.com/video/VIDEO_ID?fields=available_formats