2

I want to get Current progress of a video played using dailymotion iframe. I have tried multiple things but nothing has worked so far.

I need to get this functnality implemented using Dailymotion Iframe

My current code looks like

<iframe id="myVideo" style="width:300px;height:300px;position:absolute;left:100px;top:0px;overflow:hidden"
frameborder="0" type="text/html" src="https://geo.dailymotion.com/player/{Player_id}.html?video=x84sh87&startTime=10"
allow="autoplay; fullscreen; picture-in-picture" allowfullscreen frameborder="0" width="640" height="360"
width=" 100%" height="100%" allowfullscreen allow="autoplay">
<script pe="text/javascript">
function getCurTime() {
  var x = document.querySelector("iframe");
  alert(x);}

</script><button type="button" onclick="getCurTime()">ClickMe</button>

1 Answers1

1

You must use our Player API in order to get access to player data such as current videoTime.

It is required you embed the player using one of the dedicated SDKs.
You can see the list of available options here: Dailymotion Integration-methods

VC.One
  • 14,790
  • 4
  • 25
  • 57
dailymotion
  • 1,546
  • 1
  • 9
  • 11