Search code examples
javascriptmedia-player

Does any knows how to control an Odysee embedded video?


Can I keep track of the time the Odysee's embedded video? I can embbed the video but I'd like to play where the user left off next time the page is opened. But I didn't tind any offical Odysee's API nor how I can do that usin g pure Javascript, due to cross-origin. I have no code to show because I didn't find any workaround. Are there any? any help is very appreciated.


Solution

  • You can do this easily, instead of using the embed just put the link to the video in your own video tag

    e.G

    <video width="200" controls src="https://player.odycdn.....mp4#t=50">
    

    then you can refer to all solutions available for doing this with the video tag (You will easily find how to get and set the position), look in my example i set the position to second 50 using Media fragments url

    e.g

    current/duration time of html5 video?

    Start HTML5 video at a particular position when loading?