Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

144
Views
Videoplayer.Markers is Not a function error

I want to add markers to my videojs player dynamically. I am trying to videojs-markers plugin. but I get error

Videoplayer.markers is not a function

 <video id="vEpisodePlayer"
               class="video-js vjs-default-skin vjs-big-play-centered "
               controls="controls"
               preload="auto">
 </video>
 @section Scripts{
<script src="~/js/video.js" defer="defer"></script>
@*<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-ads/6.9.0/videojs.ads.min.js" integrity="sha512-ff4Rc39SC+LyUOUEKUvQ5VW/BMtzy+p3/zN+zB/VloiEfFpkY4JseoJC2TtwJTnn2PrSsm+dvSW6S4yV6uADUA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>*@
<script src="~/js/videojs-seek-buttons.min.js" defer="defer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-markers/0.7.0/videojs-markers.js"></script>
<script src="~/js/Development/videoPlayer.js" asp-append-version="true"></script>
<script src="~/js/Development/videoDetail.js" asp-append-version="true"></script>
}

javascript:

Videoplayer = videojs("#vEpisodePlayer", options, function onPlayerReady() {
    this.fill(false);
    this.seekButtons({
        forward: 10,
        back: 10
    });
    

});

Videoplayer.src({ type: 'video/mp4', src: source });

Videoplayer.markers({
    markerStyle: {
        'width': '190px',
        'border-radius': '2px',
        'background-color': 'orange'
    }
});

How can I fix this error and add markers to my videojs player?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The error means the Video.js plugin has not been registered. You have used defer on some scripts but not the markers plugin script. You should defer that one too, otherwise it is executing before videojs exists and it's not possible to register a plugin against it.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!