phpvideo.jsdailymotion-api

How to make custom player to play Dailymotion videos?


I have created Custom Youtube Player using VideoJS. But I did not find out how can I create custom player to play Dailymotion videos?

I have read everything here but does not get any help. https://developer.dailymotion.com/player

I have tried video.js-dailymotion as @misterben suggest but issue is still there.

My Code

<!DOCTYPE html>
<html>
<head>
<title>Video.js | Dailymotion HTML5 Video Player</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<link href="http://vjs.zencdn.net/5.0/video-js.min.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/5.0/video.min.js"></script>
<script src="dailymotion.js"></script>
</head>
<body>
<video id="vid1" class="video-js vjs-default-skin" controls preload="auto" width="640" height="360"
       data-setup='{ "techOrder": ["dailymotion"], "dmControls" : "1", "src": "http://www.dailymotion.com/video/xg3b7m_meetbuck_creation" }'></video>
</body>
</html>

Error in console

TypeError: videojs.MediaTechController is undefined

videojs.Dailymotion = videojs.MediaTechController.extend({


Solution

  • There is a video.js plugin to play Dailymotion videos along the same lines as the You Tube plugin you must be using. Note this almost certainly will work with video.js version 4 only, not version 5.

    https://github.com/benjipott/video.js-dailymotion